Skip to content

Allow compile-time constant index operations on constant string, list and maps. #3059

Open
@lrhn

Description

@lrhn

With constant maps, and to a lesser degree lists, it's sometimes relevant to do refer to a constant entry of such a map.

I suggest allowing expressions on the form a[b] as compile-time constants when either a is a List or String and b is an integer, or a is a Map and b is a String.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).core-ntype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions