Open
Description
reproduction steps
scala> :pa -raw
// Entering paste mode (ctrl-D to finish)
class C {
def testRangeConsistency: Unit = for(size <- Seq(0, 1, 2, 3, 4, 10, 100)) {
val range = (1 to size)
}
}
// Exiting paste mode, now interpreting.
val range = (1 to size)
^
<pastie>:3: warning: local val range in value $anonfun is never used
problem
val range = (1 to size)
^
<pastie>:3: warning: local val range in value $anonfun is never used
expectation
Warning names the correct enclosing definition, and caret is at the unused definition.
Not a repl artifact, same result in regular project.