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

Error messages leak semicolons #439

Closed
lihaoyi opened this issue Aug 18, 2016 · 0 comments
Closed

Error messages leak semicolons #439

lihaoyi opened this issue Aug 18, 2016 · 0 comments

Comments

@lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Aug 18, 2016

Currently, given this script

println("bazz")
rintln("foooo")
println("bar")

We get awkward semi-colons that appear at the start of the error message:

haoyi-mbp:~ haoyi$ amm Foo.sc
Foo.sc:2: not found: value rintln
;val res_1 = rintln("foooo")
             ^
Compilation Failed

This is probably an artifact of the way we preprocess the scripts in order to add the val res prefixes and stuff; we should be able to do it without adding these awkward semi-colons.

lihaoyi pushed a commit that referenced this issue Aug 28, 2016
…of semicolons, to fix #439
lihaoyi pushed a commit that referenced this issue Aug 29, 2016
…oin statements, since they're no longer necessary. Fixes #439
lihaoyi pushed a commit that referenced this issue Aug 29, 2016
… join statements, since they're no longer necessary. Fixes #439

- Also fix the ImportSplitter parser that ImportHooks use, which was incorrectly marking the end location of trailing magic imports, creating incorrect preprocessed Scala code that relied on the synthetic semicolons in order to compile and run. This should also improve the accuracy of error-reporting in these cases
@lihaoyi lihaoyi closed this in 8c3248e Aug 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant