commit | 1af3edc37f02d3600caa542ae30826b6f7a44e47 | [log] [tgz] |
---|---|---|
author | Russ Cox <rsc@golang.org> | Fri Jul 03 09:45:15 2009 -0700 |
committer | Russ Cox <rsc@golang.org> | Fri Jul 03 09:45:15 2009 -0700 |
tree | 7ef7a7c352d3573a57d53c87cd3cceb0edfae0bc | |
parent | 75fe1303c1368deb092c6a109331bf0211263ccb [diff] [blame] |
maps have == so maps should work as map keys. fix tests of bad map keys to use slices instead. R=r DELTA=7 (0 added, 1 deleted, 6 changed) OCL=31123 CL=31145
diff --git a/test/convert.go b/test/convert.go index 1b933f9..3790bf1 100644 --- a/test/convert.go +++ b/test/convert.go
@@ -6,11 +6,10 @@ package main -import "unsafe" +import "reflect" func typeof(x interface{}) string { - val, typ, indir := unsafe.Reflect(x); - return typ; + return reflect.Typeof(x).String(); } func f() int {