1// errorcheck
2
3// Copyright 2014 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
7// Issue 9083: map/chan error messages show non-explicit capacity.
8
9package main
10
11// untyped constant
12const zero = 0
13
14func main() {
15	var x int
16	_ = x
17	x = make(map[int]int)       // ERROR "cannot use make\(map\[int\]int\)|incompatible"
18	x = make(map[int]int, 0)    // ERROR "cannot use make\(map\[int\]int, 0\)|incompatible"
19	x = make(map[int]int, zero) // ERROR "cannot use make\(map\[int\]int, zero\)|incompatible"
20	x = make(chan int)          // ERROR "cannot use make\(chan int\)|incompatible"
21	x = make(chan int, 0)       // ERROR "cannot use make\(chan int, 0\)|incompatible"
22	x = make(chan int, zero)    // ERROR "cannot use make\(chan int, zero\)|incompatible"
23}
24