dart2js does no see hashCode having type int #14951
Labels
area-web
Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
web-dart2js
When running dart2js on the following program
main() {
var o = new Object();
print((1 + o.hashCode) & 0xFF);
}
I get the warning
test.dart:3:9: Warning: No operator '&' in class 'num'.
print((1 + o.hashCode) & 0xFF);
If o is types as Object the warning goes away. That is compiling the following two programs gives no warnings.
main() {
Object o = new Object();
print((1 + o.hashCode) & 0xFF);
}
main() {
print((1 + new Object().hashCode) & 0xFF);
}
The text was updated successfully, but these errors were encountered: