]> Cypherpunks repositories - gostls13.git/commitdiff
- added bug against maps
authorRobert Griesemer <gri@golang.org>
Thu, 26 Jun 2008 22:15:38 +0000 (15:15 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 26 Jun 2008 22:15:38 +0000 (15:15 -0700)
SVN=124977

test/bugs/bug058.go [new file with mode: 0644]

diff --git a/test/bugs/bug058.go b/test/bugs/bug058.go
new file mode 100644 (file)
index 0000000..19a9aa1
--- /dev/null
@@ -0,0 +1,20 @@
+// $G $D/$F.go && $L $F.$A && ./$A.out
+
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type Box struct {};
+var m map[string] *Box;
+  
+func main() {
+  m["foo"] = nil;
+}
+
+/*
+bug058.go:9: illegal types for operand: INDEX
+       (MAP[<string>*STRING]*<Box>{})
+       (<string>*STRING)
+*/