0
1
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 .
Updates .

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:
Robert Griesemer
2020-12-04 13:20:06 -08:00
parent 02820d61a9
commit cd15a48036
7 changed files with 72 additions and 16 deletions
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"
)