This patch by Chris Manghane fixes a bug for cases like this: switch x := v.(type) { case *x: in which the type name in the case happens to be the same as the variable name in the type switch. This is rather confusing code, but it should work. This is http://golang.org/issue/10047 . Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian