diff options
author | Ian Lance Taylor <iant@golang.org> | 2008-10-24 22:40:32 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2008-10-24 22:40:32 -0700 |
commit | 542fc817416430a52f6dce31e3147c85ab75cb2a (patch) | |
tree | c8f2b8a8cc995d57aa35fd0ab639c08548d55c05 /test/ken/interbasic.go | |
parent | 7aafab549049554f2f6222b719d9d987651ac37e (diff) | |
download | golang-542fc817416430a52f6dce31e3147c85ab75cb2a.tar.gz |
Per discussion earlier today with r and gri: when an interface
object has a value of type "int", it should not automatically
convert to type "int32". That is, the type alias "int" should
be regarded as having been defined as though "type int int32"
appeared outside of the package, and as therefore being a
different type from "int32".
R=ken
DELTA=21 (20 added, 0 deleted, 1 changed)
OCL=17587
CL=17842
Diffstat (limited to 'test/ken/interbasic.go')
-rw-r--r-- | test/ken/interbasic.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ken/interbasic.go b/test/ken/interbasic.go index 2603d2560..e4b0b79a4 100644 --- a/test/ken/interbasic.go +++ b/test/ken/interbasic.go @@ -86,7 +86,8 @@ main() u64 = 765432; ia[12] = u64; s = ia[0]; if s != "xxx" { panicln(0,s); } - i32 = ia[1]; if i32 != 12345 { panicln(1,i32); } + i32 = ia[1].(int).(int32); + if i32 != 12345 { panicln(1,i32); } b = ia[2]; if b != true { panicln(2,b); } s = ia[3]; if s != "now is" { panicln(3,s); } |