• Russ Cox's avatar
    more precise error message · 53ebd163
    Russ Cox authored
    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
    53ebd163
swt.c 14.6 KB