gc: disallow map/func equality via interface comparison
Missed when I removed direct map/func equality.
R=ken2
CC=golang-dev
https://golang.org/cl/5452052
diff --git a/src/pkg/reflect/all_test.go b/src/pkg/reflect/all_test.go
index a9e5d1c..e432601 100644
--- a/src/pkg/reflect/all_test.go
+++ b/src/pkg/reflect/all_test.go
@@ -468,8 +468,8 @@
func TestFunctionValue(t *testing.T) {
var x interface{} = func() {}
v := ValueOf(x)
- if v.Interface() != v.Interface() || v.Interface() != x {
- t.Fatalf("TestFunction != itself")
+ if fmt.Sprint(v.Interface()) != fmt.Sprint(x) {
+ t.Fatalf("TestFunction returned wrong pointer")
}
assert(t, v.Type().String(), "func()")
}