mirror of
https://github.com/golang/go
synced 2025-05-07 03:41:34 +00:00
[dev.typeparams] cmd/compile/internal/types2: correct error position for inherited const init expression
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>
This commit is contained in:
src/cmd/compile/internal/types2
test
@ -12,12 +12,12 @@ const (
|
||||
ok = byte(iota + 253)
|
||||
bad
|
||||
barn
|
||||
bard // ERROR "constant 256 overflows byte"
|
||||
bard // ERROR "constant 256 overflows byte|cannot convert"
|
||||
)
|
||||
|
||||
const (
|
||||
c = len([1 - iota]int{})
|
||||
d
|
||||
e // ERROR "array bound must be non-negative"
|
||||
f // ERROR "array bound must be non-negative"
|
||||
e // ERROR "array bound must be non-negative|invalid array length"
|
||||
f // ERROR "array bound must be non-negative|invalid array length"
|
||||
)
|
||||
|
Reference in New Issue
Block a user