blob: 99d08a20f777d2a863304060d0d4f5f170720e1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// errchk $G -e $D/$F.go
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
type I interface {
M()
}
func main(){
var x I
switch x.(type) {
case string: // ERROR "impossible"
println("FAIL")
}
}
|