Home | History | Annotate | Download | only in fixedbugs
      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.
      9 package foo
     10 
     11 const (
     12 	ok = byte(iota + 253)
     13 	bad
     14 	barn
     15 	bard // ERROR "constant 256 overflows byte"
     16 )
     17 
     18 const (
     19 	c = len([1 - iota]int{})
     20 	d
     21 	e // ERROR "array bound must be non-negative" "const initializer len\(composite literal\) is not a constant"
     22 	f // ERROR "array bound must be non-negative" "const initializer len\(composite literal\) is not a constant"
     23 )
     24