language icon indicating copy to clipboard operation
language copied to clipboard

Specification special-cases static type of ~/, not .remainder.

Open lrhn opened this issue 12 years ago • 3 comments

The specification has special-cased the static type analysis of the int operators +, -, *, % and ~/ to be int if the argument is int, and double if the argument is double.

This is incorrect for ~/, which is declared as returning int in all cases (so specifying "4 ~/ 0.5" to be double is wrong), and it misses the remainder function, which should be treated just as special as the % operator.

lrhn avatar Dec 16 '13 08:12 lrhn

Ok, the ~/ case doesn't actually say that the type of "4 ~/ e2" is double if "e2" is double, but it's still unncessary and therefore confusing.

lrhn avatar Dec 16 '13 08:12 lrhn

You're just saying that ~/ is not treated specially by the typechecker, right?


Set owner to @gbracha. Added Accepted label.

gbracha avatar Aug 28 '14 23:08 gbracha

No milestone now: This will not block Dart 2.

The clarification still needs to be performed.

eernstg avatar Feb 06 '18 19:02 eernstg