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

REPL freezes with par in for comprehension expression #9544

Closed
scabug opened this Issue Oct 31, 2015 · 7 comments

Comments

Projects
None yet
1 participant
@scabug
Copy link

scabug commented Oct 31, 2015

REPL freezes with par in for comprehension expression:

For example, you can type in REPL is standard mode:
var count = 0
for (i <- 1 to 10 par) count += 1 // after this line REPL freezes
println(count) // no output

But if one type this sample in :paste mode - it's OK. (see attachment)

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Oct 31, 2015

Imported From: https://issues.scala-lang.org/browse/SI-9544?orig=1
Reporter: Eduard Sinelnikov (sinedanat)
Affected Versions: 2.12.0-M3
See #8119
Attachments:

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Oct 31, 2015

@som-snytt said:
Use -Yrepl-class-based if you want to start threads in the expression, which is a member initializer.

Alternatively, put it behind a def.

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Nov 1, 2015

Eduard Sinelnikov (sinedanat) said:
Thanks for workaround!
By the way it's OK with REPL with scala version 2.11.7.
And I'd like see the same behavior for stable version 2.12. ;)

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Nov 2, 2015

@som-snytt said:
That's not a workaround, but the required technique. So this is not a bug per se. Not sure what changed for 2.12, maybe encoding of lazy vals or some other implementation detail. More at stack overflow.

Github makes adding a link so easy, jira makes it so hard.

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Nov 3, 2015

@SethTisue said:
[~apm] is this a duplicate of SI-8119?

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Nov 3, 2015

@som-snytt said:
You were just a civilian. Now you must make fatal choices like is it a duplicate or a not-a-bug. Can it be both?

@scabug scabug closed this Nov 3, 2015

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Nov 3, 2015

@SethTisue said:
duplicate sir yes sir!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment