diff options
Diffstat (limited to 'test/cmp1.go')
-rw-r--r-- | test/cmp1.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/cmp1.go b/test/cmp1.go index 82e932f45..d1a1c7a0b 100644 --- a/test/cmp1.go +++ b/test/cmp1.go @@ -41,7 +41,7 @@ func main() var ic interface{} = c; var id interface{} = d; var ie interface{} = e; - + // these comparisons are okay because // string compare is okay and the others // are comparisons where the types differ. @@ -53,6 +53,13 @@ func main() istrue(ic == id); istrue(ie == ie); + // 6g used to let this go through as true. + var g uint64 = 123; + var h int64 = 123; + var ig interface{} = g; + var ih interface{} = h; + isfalse(ig == ih); + // map of interface should use == on interface values, // not memory. // TODO: should m[c], m[d] be valid here? |