Skip to content

elements of a const List not considered const #20574

Closed
@trinarytree

Description

@trinarytree

const x = const [1, 2];
const y = x[0];

yields
"error: ... expression is not a valid compile-time constant"

looks pretty constant to me. i don't see how it's much different from
const x = 1;
const y = x + 1;
which is allowed.

Dart VM version: 1.6.0-dev.5.1 (Thu Jul 24 19:35:53 2014) on "linux_x64"

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-duplicateClosed in favor of an existing report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions