3 // Copyright 2011 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // Verify that erroneous type switches are caught be the compiler.
8 // Issue 2700, among other things.
24 case string: // ERROR "impossible"
28 // Issue 2700: if the case type is an interface, nothing is impossible
39 switch _
:= r
.(type) { // ERROR "invalid variable name _|no new variables"