We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This program runs without signalling that isList is not bool on the first iteration. The VM signals an error.
main() { var a = 123; var isList = 0; for (int i = 0; i < 4000; i++) { isList = isList || a is List; } print('a is List == $isList'); }
The generated code for the assignment is: isList = $notnull_bool(isList || !!(a && a.is$List));
I would have expected isList = $notnull_bool(isList) || !!(a && a.is$List);
The placement of the check is even stranger with an expression like
b = b && x > 5 && x < 10;
---> b = $notnull_bool(b && x > 0) && x < 100;
The text was updated successfully, but these errors were encountered:
this was a pretty silly bug, it was converting the result of && to bool instead of the arguments. Fix incoming
Sorry, something went wrong.
Added Fixed label.
jmesserly
No branches or pull requests
This program runs without signalling that isList is not bool on the first iteration.
The VM signals an error.
main() {
var a = 123;
var isList = 0;
for (int i = 0; i < 4000; i++) {
isList = isList || a is List;
}
print('a is List == $isList');
}
The generated code for the assignment is:
isList = $notnull_bool(isList || !!(a && a.is$List));
I would have expected
isList = $notnull_bool(isList) || !!(a && a.is$List);
The placement of the check is even stranger with an expression like
b = b && x > 5 && x < 10;
--->
b = $notnull_bool(b && x > 0) && x < 100;
The text was updated successfully, but these errors were encountered: