Skip to content

Const typed data (Int8List, et al.) #6378

Closed
@a-siva

Description

@a-siva

e.g:

const Int8Array int8 = const [10, 100];

does not work, instead we need to write code as follows:
Int8Array initInt8Array() {
  var list = new Int8Array(2);
  list[0] = 10;
  list[1] = 100;
  return list;
}
Int8Array int8 = initInt8Array();

We should try and make it possible to initialize constant scalar lists
similar to how we initialize all lists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).closed-not-plannedClosed as we don't intend to take action on the reported issuetype-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