Skip to content

Literal symbols are not accepted as const map keys. #15445

Closed
@peter-ahe-google

Description

@peter-ahe-google

The VM rejects the program reported in issue #15442 (which is an analyzer bug):

class A {}
class B {}

main() {
  var map = const <Symbol, int>{#A:0, #B:1};
  print(map);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions