You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[[syntax trees at end of typer]] // demo.scalapackage<empty>@demo.scala<0..0> {
finallazy module valdemo$package: demo$package@demo.scala<0..0> =new demo$package@demo.scala<0..0>@demo.scala<0..0>@demo.scala<0..0>()@
demo.scala<0..0>
@demo.scala<0..0>
final module classdemo$package() extendsObject@demo.scala<0..0>@
demo.scala<0..0>()@demo.scala<0..0> {
this: demo$package@demo.scala<0..0>.type@demo.scala<0..0> =>valxx:Int=1@demo.scala<17..18>@demo.scala[0..4..18]
valyy:Int=1@demo.scala<17..18>@demo.scala[0..8..18]
valzz:Int=1@demo.scala<17..18>@demo.scala[0..12..18]
}@demo.scala<0..18>
}@demo.scala<0..18>
Problem
Start and end position for all definitions are the same. This leads to incorrect Interactive.pathTo for position on xx or yy definition -- head being zz definition.
On Scala 2, I'm experimenting with each valdef having the same transparent pos of the whole def, with point at the name, namePos for the name, and rhs as currently. I haven't look at how positions are used yet, or what it looks like in dotty.
The general form is that each pattern introduces multiple bindings.
Compiler version
3.5.0
Minimized code
Output
Problem
Start and end position for all definitions are the same. This leads to incorrect
Interactive.pathTo
for position onxx
oryy
definition -- head beingzz
definition.Expectation
I would either expect positions on multiple declaration to be solved as in Scala 2 (though this is also buggy there):
or for
Interactive.pathTo
to account for that situation.The text was updated successfully, but these errors were encountered: