Skip to content

go/types: wrong line numbers in errors for constant overflows involving iota #42991

Closed
@griesemer

Description

@griesemer
go test -run Check$ -files $GOROOT/test/fixedbugs/issue8183.go --errlist

produces

    check_test.go:267: .../issue8183.go:12:12: cannot convert iota + 253 (untyped int constant 256) to byte
    check_test.go:267: .../issue8183.go:19:11: invalid array length 1 - iota (untyped int constant -1)
    check_test.go:267: .../issue8183.go:19:11: invalid array length 1 - iota (untyped int constant -2)

yet the correct line numbers are 15, 21, and 22.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.release-blocker

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions