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
Here's a test that can be dropped in TreeInfoTest.scala (for the lack of a more appropriate existing test suite) to demonstrate the faulty behavior. In particular, ifTree.pos == elsep.pos holds.
The problem originates from the typedIf(...) in Typer overriding the else branch's position even when the else branch was provided by the user. Unless I'm mistaken, this should be the two-character fix: val elsep1 = typed(tree.elsep orElse(untpd.unitLiteral withPos tree.pos), pt)
The text was updated successfully, but these errors were encountered:
Here's a test that can be dropped in TreeInfoTest.scala (for the lack of a more appropriate existing test suite) to demonstrate the faulty behavior. In particular,
ifTree.pos == elsep.pos
holds.The problem originates from the
typedIf(...)
in Typer overriding the else branch's position even when the else branch was provided by the user. Unless I'm mistaken, this should be the two-character fix:val elsep1 = typed(tree.elsep orElse
(
untpd.unitLiteral withPos tree.pos
)
, pt)
The text was updated successfully, but these errors were encountered: