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
7package main
8
9var bits1 uint = 10
10
11const bits2 uint = 10
12
13func main() {
14	_ = make([]byte, 1<<bits1)
15	_ = make([]byte, 1<<bits2)
16	_ = make([]byte, nil)    // ERROR "non-integer.*len|nil"
17	_ = make([]byte, nil, 2) // ERROR "non-integer.*len|nil"
18	_ = make([]byte, 1, nil) // ERROR "non-integer.*cap|nil"
19	_ = make([]byte, true)   // ERROR "non-integer.*len|untyped bool"
20	_ = make([]byte, "abc")  // ERROR "non-integer.*len|untyped string"
21}
22