]> Cypherpunks repositories - gostls13.git/commit
more precise error message
authorRuss Cox <rsc@golang.org>
Mon, 6 Jul 2009 23:29:28 +0000 (16:29 -0700)
committerRuss Cox <rsc@golang.org>
Mon, 6 Jul 2009 23:29:28 +0000 (16:29 -0700)
commit53ebd163c66db08e49c0925aed0713bc215882e9
treef776f5b917b51a59da526e931c0fd6216a6b64e9
parenta7b4e9f03ef3676c260aea694d0eb9f0720bee67
more precise error message

package main

func main() {
       var x interface {} = 42;
       switch x := x.(type) {
       case int:
       case foo:
       }
}

before:
x.go:7: non-type case in type switch
x.go:7: inappropriate case for a type switch

now:
x.go:7: foo: undefined

R=ken
OCL=31221
CL=31221
src/cmd/gc/go.y
src/cmd/gc/swt.c