Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behavior between VM and Dart2JS #7488

Closed
gramster opened this issue Dec 18, 2012 · 1 comment
Closed

Inconsistent behavior between VM and Dart2JS #7488

gramster opened this issue Dec 18, 2012 · 1 comment
Labels
closed-duplicate Closed in favor of an existing report web-dart2js

Comments

@gramster
Copy link
Contributor

Consider the following program:

main() {
  bugbug(2.0);
}

bugbug(x) {
  print(x);
  List l = [ 0, 1, 2];
  print (l[x]);
}

With dart2js, we get:

2
2

In the VM, we get:

2.0
Exception: type 'double' is not a subtype of type 'int' of 'index'.

I'm guessing that the VM is right, so I'm putting this in the dart2js area, although I prefer the behavior of dart2js.

@peter-ahe-google
Copy link
Contributor

Added Duplicate label.
Marked as being merged into #1533.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report web-dart2js
Projects
None yet
Development

No branches or pull requests

2 participants