3 // Copyright 2018 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.
9 type Stringer interface {
15 switch e := e.(type) {
16 case G: // ERROR "undefined: G|undefined type .*G"
17 e.M() // ok: this error should be ignored because the case failed its typecheck
18 case E: // ERROR "undefined: E|undefined type .*E"
19 e.D() // ok: this error should be ignored because the case failed its typecheck
21 // ok: this error should not be ignored to prove that passing legs aren't left out
22 _ = e.(T) // ERROR "undefined: T|undefined type .*T"