Skip to content

repl output incomplete when entering multiple statements at once #1854

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

Closed
smarter opened this issue Dec 23, 2016 · 4 comments
Closed

repl output incomplete when entering multiple statements at once #1854

smarter opened this issue Dec 23, 2016 · 4 comments

Comments

@smarter
Copy link
Member

smarter commented Dec 23, 2016

Scala 2:

scala> class A; 1
defined class A
res0: Int = 1

scala>

dotr:

scala> class A; 1 
defined class A
scala>
@bbarker
Copy link
Contributor

bbarker commented Jun 24, 2017

I believe I have a fix for this; will plan to clean up and submit within a day.

bbarker added a commit to bbarker/dotty that referenced this issue Jun 24, 2017
@felixmulder
Copy link
Contributor

@bbarker - thanks for having a look at this! FYI, the current REPL is being re-written from scratch. This issue still exists since we want to make sure the new REPL supports this.

Cheers and happy weekend!
Felix

@smarter
Copy link
Member Author

smarter commented Jun 24, 2017

For what it's worth, Felix's new repl is being developed at https://github.com/dotty-staging/dotty/tree/topic/new-repl. Of course we still accept PRs for the current repl that improve it; but if you want to do more work on the repl it probably makes sense to switch focus to the new one :).

@bbarker
Copy link
Contributor

bbarker commented Jun 24, 2017

Thanks, I'll ask next time! Anyway, it was interesting.

Here's what I have so far: https://github.com/bbarker/dotty/tree/testReplMultiStatements

Unfortunately, a test fails (and there are definitely problems) with my fix, since it relies on Tree.show giving back a valid Scala (dotty) statement; calling show on the Tree for def id(x: 4): 4 = x yields def id(x: 4.type): 4.type = x, which is apparently not valid dotty; was hoping to find a way to take a Tree and convert it back to valid dotty/scala.

bbarker added a commit to bbarker/dotty that referenced this issue Jul 1, 2017
@smarter smarter closed this as completed in 70260cc Jan 5, 2018
smarter added a commit that referenced this issue Jan 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants