github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/switch13.gno (about) 1 package main 2 3 func main() { 4 var i interface{} 5 6 switch a := i.(type) { 7 case string: 8 println("string", a+" ok") 9 case i: 10 println("i is dummy") 11 default: 12 println("unknown") 13 } 14 } 15 16 // Error: 17 // main/files/switch13.gno:0#1: i<VPBlock(2,0)> is not a type