Span includes trailing comma
Compiler version
3.3.0-RC2
Minimized code
for {
a <- List(1)
b <- List(a)
if (
a,
b,
) == (1, 2)
} yield b
Output
second b's span will include the trailing coma. This shows up both when using Interactive as well in semanticdb
Expectation
Trailing coma is excluded from span
@bishabosha @anatoliykmetyuk didn't one of you spend some time looking at this last week...?
I had a look with someone at the Scala Spree in San Francisco but no results :)
This issue is still present as of 3.5.0 at 8563571e5af.
def Test =
for {
a <- List(1)
b <- List(a)
if (
a,
b,
) == (1, 2)
} yield b
scalac -Xprint:typer -Yprint-pos -Ydebug-pos test.scala
...
test.scala<67..67>([email protected]<67..68>,
[email protected]<76..78>)@test.scala<59..84>.==@
...
This issue was picked for the Scala Issue Spree of tomorrow, May 21st. @dwijnand, @rochala, @jan-pieter, @nmcb will be working on it. If you have any insight into the issue or guidance on how to fix it, please leave it here.