From 2b8db5a4390a02c2144d414fa0403a71d40006bc Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Thu, 26 Jun 2008 15:15:38 -0700 Subject: [PATCH] - added bug against maps SVN=124977 --- test/bugs/bug058.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/bugs/bug058.go diff --git a/test/bugs/bug058.go b/test/bugs/bug058.go new file mode 100644 index 0000000000..19a9aa136b --- /dev/null +++ b/test/bugs/bug058.go @@ -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) +*/ -- 2.48.1