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
In 2.13.14, the offset range of the parameter to the withFilter function ([111]) is also out of range of the enclosing trees ([121:146]), but by some quirk, it doesn't fail validation. (The quirky feature is that "range" means "non-synthetic", so the enclosed tree must have a range to be checkable.)
Uh oh!
There was an error while loading. Please reload this page.
Reproduction steps
Scala version: 2.13.15
Problem
The problem is with the position of the
string
parameter.For patvar usage tracking scala/scala#10812, the pattern tree and its duplicate in the construction of a guard expression were reversed at https://github.com/scala/scala/blob/v2.13.15/src/reflect/scala/reflect/internal/TreeGen.scala#L728 because one patvar is now tracked as an "alias" of the original other. The result is that the tree positions, which are subtly different, are reversed. In particular, one pos is an offset and the other is a range.
In 2.13.14, the offset range of the parameter to the withFilter function (
[111]
) is also out of range of the enclosing trees ([121:146]
), but by some quirk, it doesn't fail validation. (The quirky feature is that "range" means "non-synthetic", so the enclosed tree must have a range to be checkable.)Noticed at scoverage/scalac-scoverage-plugin#641
The text was updated successfully, but these errors were encountered: