Skip to content

cmd/compile: "0"[0] should not be a constant #11370

Closed
@griesemer

Description

@griesemer

The following program: http://play.golang.org/p/Xz1-Us2Cwl is rejected with:
/tmp/sandbox748824652/main.go:4: constant -48 overflows uint8

However, indexing a string constant with a constant index does not produce a constant, and thus the program should be valid.

See also #11368.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions