blob: 2b97dbf7c0e7607457f6248fb06d35eabb6e4428 [file] [log] [blame]
Russ Cox2b1c9b42012-02-16 23:49:30 -05001// run
Robert Griesemer2b8db5a2008-06-26 15:15:38 -07002
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*/