diff options
Diffstat (limited to 'usr/gri/pretty/selftest2.go')
| -rw-r--r-- | usr/gri/pretty/selftest2.go | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/usr/gri/pretty/selftest2.go b/usr/gri/pretty/selftest2.go index 8fa907462..48fe33cf9 100644 --- a/usr/gri/pretty/selftest2.go +++ b/usr/gri/pretty/selftest2.go @@ -5,7 +5,7 @@ package main import ( - "array"; // not needed + "vector"; // not needed "utf8"; // not needed Fmt "fmt" ) @@ -128,6 +128,19 @@ func f3(a *[]int, m map[string] int) { } +type I interface {} + +func f3(x I) int { + switch tmp := tmp.(type) { + case S: return 1; + } + switch { + case t := x.(S): return 2; + } + return 0; +} + + func main() { // the prologue for i := 0; i <= 10 /* limit */; i++ { |
