2012-02-17 04:49:30 +00:00
|
|
|
// errorcheck
|
2009-10-29 00:09:24 +00:00
|
|
|
|
|
|
|
// 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
|
2009-11-09 07:22:06 +00:00
|
|
|
type I int
|
2009-10-29 00:09:24 +00:00
|
|
|
type S struct { f map[I]int }
|
2009-11-02 19:58:47 +00:00
|
|
|
var v1 = S{ make(map[int]int) } // ERROR "cannot|illegal|incompatible|wrong"
|
|
|
|
var v2 map[I]int = map[int]int{} // ERROR "cannot|illegal|incompatible|wrong"
|
2009-10-29 00:09:24 +00:00
|
|
|
var v3 = S{ make(map[uint]int) } // ERROR "cannot|illegal|incompatible|wrong"
|