mirror of
https://github.com/golang/go
synced 2024-11-14 21:40:21 -07:00
cd15a48036
Enabled fixedbugs/issue8183.go for run.go with new typechecker now that issue is fixed. Fixes #42992. Updates #42991. Change-Id: I23451999983b740d5f37ce3fa75ee756daf1a44f Reviewed-on: https://go-review.googlesource.com/c/go/+/275517 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
24 lines
554 B
Go
24 lines
554 B
Go
// errorcheck
|
|
|
|
// Copyright 2015 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.
|
|
|
|
// Tests correct reporting of line numbers for errors involving iota,
|
|
// Issue #8183.
|
|
package foo
|
|
|
|
const (
|
|
ok = byte(iota + 253)
|
|
bad
|
|
barn
|
|
bard // ERROR "constant 256 overflows byte|cannot convert"
|
|
)
|
|
|
|
const (
|
|
c = len([1 - iota]int{})
|
|
d
|
|
e // ERROR "array bound must be non-negative|invalid array length"
|
|
f // ERROR "array bound must be non-negative|invalid array length"
|
|
)
|