This repository was archived by the owner on Feb 22, 2018. It is now read-only.
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
dynamic calls on some operators seems broken? #502
Closed
Description
The following Dart:
bool inRange(min, value, max) => (min <= value) && (value <= max);
void main() {
var result = inRange(2, 7, 10);
print(result);
}
generates this:
test.inRange = function(min, value, max) {
return dart.as(dart.dsend(min, '<=', value), core.bool)['&&'](dart.as(dart.dsend(value, '<=', max), core.bool));
};
test.main = function() {
let result = setteronly.inRange(2, 7, 10);
core.print(result);
};
which, at runtime, triggers:
Uncaught TypeError: dart.as(...).&& is not a function
It's fine if inRange
parameters are typed.