-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Use correct range for error in escape #10740
base: 2.13.x
Are you sure you want to change the base?
Conversation
Apparently, the invariant, that point is in range, is not enforced. I expected start <= point < end, but "zero extent" ranges are typical, also in dotty spans. Splitting this commit into the pos fix for interpolator (plus gratuitous refactoring), then the tweak that you can request a spanning pos to include your default.point; otherwise a default.point out of range is ignored. The tweaks improve point positioning, but as noted on the ancient PR for NamesDefault, it's difficult to code defensively because it's easy to accidentally derive a range via For example, |
772bb9f
to
ee24067
Compare
At any phase.
|
ee24067
to
6d94232
Compare
6d94232
to
1688a6b
Compare
/rebuild |
Fixes scala/bug#12981
This was broken since 2.13.0
FastStringInterpolator
. The bad position is just a bad caret for ordinary reporting, but causes downstream errors for other tooling.