Skip to content

Repl fixes and tests #1182

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

Merged
merged 8 commits into from
Mar 31, 2016
Merged

Repl fixes and tests #1182

merged 8 commits into from
Mar 31, 2016

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Mar 18, 2016

The REPL broke in a recent merge. Nobody noticed because we don't have tests. This PR fixes the breakage and several other bugs and adds tests for the REPL.

odersky added 8 commits March 18, 2016 12:22
This broke under the recent introduction of the JS backend, because now
the context needs to be initialized before the platform can be selected.
So invoking `doti` immediately gave an IllegalStateException.

No big deal to fix, but it shows how sorely we are lacking REPL tests.
They printed as raw trees which confused the REPL
when wrapping subsequent liens with them.
It messed up parsing of multi-line strings and did not
seem to have a purpose. Error messages print fine without it.
It's used only in Resident, where it should be defined.
Central config class replaces mixture of parameters and fields.
The fields were in part in the wrong class, where they could not
easily be overridden.
@odersky
Copy link
Contributor Author

odersky commented Mar 18, 2016

rebased to master

required: String
buf += xs
^
<console>:11: error: type mismatch:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are two errors printed here?
Scalac reports only one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. I might depend on where the error is reported - same position in scalac, different ones in dotty. or some other artefact how += is compiled. But in any case dotc behaves like doti, so it's not a repl failure.

@odersky odersky merged commit 5bd08d4 into scala:master Mar 31, 2016
@allanrenucci allanrenucci deleted the repl-fixes branch December 14, 2017 19:24
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