Skip to content

map literals not considered constant #94

@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


What steps will reproduce the problem?
try to compile

class foo {
  Map m1 = {};
  Map m2 = { "foo": 1 };
}

What is the expected output? What do you see instead?
I would expect a class with two fields with const initializers.

Instead, I get two errors about the map literals not being constant literals.

What version of the product are you using? On what operating system?
current try-dart-lang

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-invalidClosed as we don't believe the reported issue is generally actionable

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions