Skip to content
New issue

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

Transforming boolean or's and and's to if else blocks to preserve lazy evaluation. #47

Merged
merged 1 commit into from
Jan 30, 2012

Conversation

nbauernfeind
Copy link

The latest merge from scala master has exposed a bug in the jribble transformation phase.

scala.collection.immutable.Range now has a construct similar to {a || b} where b() contained side effects and the common case was for a to be true.

I've tracked down the issue and attempted to implement a fix with the guidance from Lex and Grzegorz.

I also tried to add a test but couldn't figure out how to get them to happily run.

See this thread for more details:
https://groups.google.com/forum/#!topic/scalagwt/vzL-e1pE-H8

Transforming boolean or's and and's to if else blocks to preserve lazy evaluation when not already a jribble expression.
@gkossakowski
Copy link

LGTM. Verified with all samples and work beautifully.

gkossakowski added a commit that referenced this pull request Jan 30, 2012
Transforming boolean or's and and's to if else blocks to preserve lazy evaluation.
@gkossakowski gkossakowski merged commit a8313b1 into scalagwt:scalagwt Jan 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants