1// errorcheck 2 3// Copyright 2015 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// Tests correct reporting of line numbers for errors involving iota, 8// Issue #8183. 9package foo 10 11const ( 12 ok = byte(iota + 253) 13 bad 14 barn 15 bard // ERROR "constant 256 overflows byte|integer constant overflow|cannot convert" 16) 17 18const ( 19 c = len([1 - iota]int{}) 20 d 21 e // ERROR "array bound must be non-negative|negative array bound|invalid array length" 22 f // ERROR "array bound must be non-negative|negative array bound|invalid array length" 23) 24