Skip to content

KtList (and others) has no const factories  #136

@myvaheed

Description

@myvaheed

KtList (and others) has no const factories with const initializers. For example, KtList.of(1, 2, 3). And therefore no available pass constructed list with const to const constructors:

class State {
    final KtList<int> keys;
    const State(this.keys);
}
...

final state = const State(KtList.of(1, 2, 3, 4)); //no compile

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions