blob: e2b4a241a6326123ebd3e66792a0e8a7e9033356 [file] [log] [blame]
Robert Griesemer2b8db5a2008-06-26 15:15:38 -07001// $G $D/$F.go && $L $F.$A && ./$A.out
2
3// Copyright 2009 The Go Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7package main
8
Russ Cox839a6842009-01-20 14:40:40 -08009type Box struct {};
Russ Cox08ca30b2008-12-19 03:05:37 -080010var m map[string] *Box;
11
Robert Griesemer2b8db5a2008-06-26 15:15:38 -070012func main() {
Rob Pike74dd0ab2009-08-17 13:30:22 -070013 m := make(map[string] *Box);
14 s := "foo";
15 var x *Box = nil;
16 m[s] = x;
Robert Griesemer2b8db5a2008-06-26 15:15:38 -070017}
18
19/*
20bug058.go:9: illegal types for operand: INDEX
21 (MAP[<string>*STRING]*<Box>{})
22 (<string>*STRING)
23*/