Skip to content

Dart2js translates << by 0 incorrectly. #6627

Closed
@fsc8000

Description

@fsc8000

The attached dart program fails: It seems -1 << 0 results in 4294967295 instead of -1.

foo(a) => a << 0;

main() {
  Expect.equals(-1, foo(-1));
}


Attachment:
shl-by-0.dart (60 Bytes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions