test/interface/receiver.go: expand to do dynamic

versions of static checks in receiver1.go

R=r
https://golang.org/cl/155045
This commit is contained in:
Russ Cox 2009-11-14 19:28:13 -08:00
parent 553be8427e
commit 98811f41b8

View file

@ -58,6 +58,10 @@ func main() {
v.V();
// p = t; // ERROR
var i interface{} = t;
if _, ok := i.(P); ok {
panicln("dynamic i.(P) succeeded incorrectly");
}
// println("--struct--");
var s S;
@ -76,6 +80,10 @@ func main() {
v.V();
// p = s; // ERROR
var j interface{} = s;
if _, ok := j.(P); ok {
panicln("dynamic j.(P) succeeded incorrectly");
}
// println("--struct pointer--");
var sp SP;