aboutsummaryrefslogtreecommitdiff
path: root/test/convert.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-07-03 09:45:15 -0700
committerRuss Cox <rsc@golang.org>2009-07-03 09:45:15 -0700
commit1af3edc37f02d3600caa542ae30826b6f7a44e47 (patch)
tree7ef7a7c352d3573a57d53c87cd3cceb0edfae0bc /test/convert.go
parent75fe1303c1368deb092c6a109331bf0211263ccb (diff)
downloadgo-1af3edc37f02d3600caa542ae30826b6f7a44e47.tar.gz
go-1af3edc37f02d3600caa542ae30826b6f7a44e47.zip
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
Diffstat (limited to 'test/convert.go')
-rw-r--r--test/convert.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/convert.go b/test/convert.go
index 1b933f93bf..3790bf17ed 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 {