Skip to content

Dart VM List.add should return void but returns int (array size) #1213

Closed
@DartBot

Description

@DartBot

This issue was originally filed by @butlermatt


Dart library reference indicates that List.add has a void return type. However it currently returns the new array size in the Dart VM. dartboard shows correct results.

eg:

main() {
  var list = new List();
  var x = list.add('foo');
  print(x);
}

Output: 1

Expected null.

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