Fix Closure span assignment in makeClosure#15841
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
I see a bunch of performance requests here, @mbovel was there performance concerns here, or what should we do about this pr? |
|
@ckipp01 no, not at all, I was just testing the benchmarks bot. Sorry for the spam, should have done it on an empty PR 😅 |
No worries! I'll re-trigger the CI here and see if we can move it along. EDIT: actually I don't see the option to even do that since it's so old. @Florian3k do you mind rebasing this, and we can try to get it across the finish line? |
|
@ckipp01 The story behind this PR is that my fix did not pass some tests in completions. I tried to fix it, but without success. |
This comment was marked as off-topic.
This comment was marked as off-topic.
1 similar comment
This comment was marked as off-topic.
This comment was marked as off-topic.
|
What will be the fate of this issue? Unreliable debugger variables on last lambda line are quite unfortunate. See also https://youtrack.jetbrains.com/issue/SCL-22145 and https://youtrack.jetbrains.com/issue/SCL-22144 This is something even users using no advanced language features will hit, as lambdas are everywhere. (For-comprehensions anyone?) |
|
We recently got back to this, and I think we're close to fixing this (thanks to @rochala for helping with completions). |
|
Could this be backported to 3.3.4? The issue makes debugging any code with lambdas, esp. single line lambdas, very hard. |
Backports #15841 to the LTS branch. PR submitted by the release tooling. [skip ci]
Fixes #15098
Wrong line numbers were coming from
Closure. Previously it's span was inherited from block end position, now it's assigned explicitly.This fix changes behaviour of test
tests/neg/i9299.scala:Previously there were 3 errors generated:
Compiler output before fix (3 errors)
Now there are 2 errors:
Compiler output after fix (2 errors)
This is because now in function
UniqueMessagePositions.isHidden:this fragment:
(dia.pos.start to dia.pos.end).exists(pos => positions.get((ctx.source, pos)).exists(_.hides(dia)))evaluates to
truewith third error. New position is considered as overlapping with position of previous error and it's not printed.I think this may be desired behaviour, but I am not entirely sure.