summaryrefslogtreecommitdiff
path: root/test/ken/interfun.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-02-11 17:55:16 -0800
committerRuss Cox <rsc@golang.org>2009-02-11 17:55:16 -0800
commit70b2d809ec1f10ee5cebbf96c57bbb2d3a604b40 (patch)
tree3a27c60cd93482129d8beda588d769a2d7868d4d /test/ken/interfun.go
parent47cebf94596af35b46ae2d1d3c973b17dcc603a4 (diff)
downloadgo-70b2d809ec1f10ee5cebbf96c57bbb2d3a604b40.tar.gz
insert type assertions when narrowing.
R=r OCL=24349 CL=24913
Diffstat (limited to 'test/ken/interfun.go')
-rw-r--r--test/ken/interfun.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ken/interfun.go b/test/ken/interfun.go
index 97db89316..876d94128 100644
--- a/test/ken/interfun.go
+++ b/test/ken/interfun.go
@@ -49,16 +49,16 @@ main()
if s.g() != 6 { panic(12); }
i1 = s; // convert S to I1
- i2 = i1; // convert I1 to I2
+ i2 = i1.(I2); // convert I1 to I2
// call interface
if i1.f() != 5 { panic(21); }
if i2.f() != 5 { panic(22); }
if i2.g() != 6 { panic(23); }
- g = i1; // convert I1 to S
+ g = i1.(*S); // convert I1 to S
if g != s { panic(31); }
- g = i2; // convert I2 to S
+ g = i2.(*S); // convert I2 to S
if g != s { panic(32); }
}