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

Incorrect range position at end of file in files not ending with whitespace. #5385

Closed
scabug opened this issue Jan 18, 2012 · 4 comments
Closed
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Jan 18, 2012

A source file without blank/newline at the end has incorrect positions for trees that run until the end of the file.

An example: a file class A without a trailing space has the end position 6 for the PackageDef, ClassDef, Template, etc. If I insert a space at the end of the file, the positions correctly end with 7.

I have several workaround for this in the scala-refactoring library, but every few weeks I find another case where I don't handle this properly, so I'd prefer a proper fix in the compiler :-)

@scabug
Copy link
Author

scabug commented Jan 18, 2012

Imported From: https://issues.scala-lang.org/browse/SI-5385?orig=1
Reporter: Mirko Stocker (misto)
Affected Versions: 2.9.2

@scabug
Copy link
Author

scabug commented Jun 25, 2012

Mirko Stocker (misto) said:
It looks like Paul has a fix for this:

paulp/scala@4868d65

Any chance this could be merged into master?

@scabug
Copy link
Author

scabug commented Jul 10, 2012

@hubertp said:
Should go to 2.10. Paul's fix is probably the way to go.

@scabug
Copy link
Author

scabug commented Jul 24, 2012

@hubertp said:
Fixed in #924.

@scabug scabug closed this as completed Jul 24, 2012
@scabug scabug added the critical label Apr 7, 2017
@scabug scabug added this to the 2.10.0-M5 milestone Apr 7, 2017
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

No branches or pull requests

2 participants