You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nate Nystrom (nystrom) said (edited on Oct 16, 2011 3:25:24 PM UTC):
It looks like the bug is with compilation of calls to methods named toInt. The body of the App is duplicated to perform two isInstanceOf checks vs. java.lang.Number and java.lang.Character. Changing the name of the toInt method in the code above makes the problem go away.
@paulp said:
You're right, the selection is duplicated during cleanup for boxing logic incorrectly not accounting for the fact that it may be a side-effecting expression.
Commit Message Bot (anonymous) said:
(extempore in r25838) Fix for multiple evaluation in structural calls.
An interesting bug during cleanup: runtime checks on the target of a
structural invocation duplicated the selection without regard for the
fact that it might be an expression. So if the name of the method being
invoked allowed the possibility that the target was a primitive type
(such as "toInt") the expression would be evaluated three times.
For example execution of the following code will give you "hey" printed out three times instead of one.
The text was updated successfully, but these errors were encountered: