summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-06-08 15:50:53 -0700
committerRuss Cox <rsc@golang.org>2010-06-08 15:50:53 -0700
commit024af79df045101737d893a9b67b37f90d2179b7 (patch)
treef0ccd806737d5ecb59c13018ec49f559d65dc726 /test
parentbd1ec96e478cc4b1651a106ec2d1a90617910b5c (diff)
downloadgolang-024af79df045101737d893a9b67b37f90d2179b7.tar.gz
bug285: delete invalid map assignment
*T2 implements I2, but T2 does not. R=gri CC=golang-dev http://codereview.appspot.com/1613041
Diffstat (limited to 'test')
-rw-r--r--test/bugs/bug285.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/bugs/bug285.go b/test/bugs/bug285.go
index 821a5f247..df373c988 100644
--- a/test/bugs/bug285.go
+++ b/test/bugs/bug285.go
@@ -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
}
/*