aboutsummaryrefslogtreecommitdiffhomepage
path: root/testdata/interface.go
diff options
context:
space:
mode:
Diffstat (limited to 'testdata/interface.go')
-rw-r--r--testdata/interface.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/testdata/interface.go b/testdata/interface.go
index c23af4fd1..fac4dfc81 100644
--- a/testdata/interface.go
+++ b/testdata/interface.go
@@ -137,6 +137,12 @@ func printItf(val interface{}) {
}
}
+var (
+ // Test for type assert support in the interp package.
+ globalThing interface{} = Foo(3)
+ _ = globalThing.(Foo)
+)
+
func nestedSwitch(verb rune, arg interface{}) bool {
switch verb {
case 'v', 's':