]> Cypherpunks repositories - gostls13.git/commitdiff
bug285: delete invalid map assignment
authorRuss Cox <rsc@golang.org>
Tue, 8 Jun 2010 22:50:53 +0000 (15:50 -0700)
committerRuss Cox <rsc@golang.org>
Tue, 8 Jun 2010 22:50:53 +0000 (15:50 -0700)
*T2 implements I2, but T2 does not.

R=gri
CC=golang-dev
https://golang.org/cl/1613041

test/bugs/bug285.go

index 821a5f24716700f2cfa969a9e84b730056c286ad..df373c9881cdd37e1458d1597d203f83f1bac5b7 100644 (file)
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// $G $D/$F.go && $L $F.go && ./$A.out
 
 // Copyright 2010 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
@@ -95,9 +95,7 @@ func main() {
        m1[17] = 42    // this should work: 17 is assignment-compatible with I1
        m1["foo"] = 42 // this should work: "foo" is assignment-compatible with I1
 
-       var t2 T2
        m2[new(T2)] = 42 // this should work: *T2 is assignment-compatible with I2
-       m2[t2] = 42      // this should work: t2 is assignment-compatible with I2
 }
 
 /*