Debian Codegraph @

src/internal/types/testdata/fixedbugs/issue50965.go

raw
1 // Copyright 2022 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 package p
6
7 func _(x int, c string) {
8 switch x {
9 case c /* ERROR "invalid case c in switch on x (mismatched types string and int)" */ :
10 }
11 }
12
13 func _(x, c []int) {
14 switch x {
15 case c /* ERROR "invalid case c in switch on x (slice can only be compared to nil)" */ :
16 }
17 }