summaryrefslogtreecommitdiff
path: root/test/switch3.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/switch3.go')
-rw-r--r--test/switch3.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/switch3.go b/test/switch3.go
index dcb6fff20..28705e464 100644
--- a/test/switch3.go
+++ b/test/switch3.go
@@ -45,6 +45,17 @@ func bad() {
case f1: // ERROR "can only compare func f to nil|func can only be compared to nil"
default:
}
+
+ var ar, ar1 [4]func()
+ switch ar { // ERROR "cannot switch on"
+ case ar1:
+ default:
+ }
+
+ var st, st1 struct{ f func() }
+ switch st { // ERROR "cannot switch on"
+ case st1:
+ }
}
func good() {