Closed
Description
This code should print one error but prints two:
object Test {
def test: Unit = {
val x = iDontExist(32) // error: not found: iDontExist
val y = x
x + x
println(x)
}
}
-- [E006] Unbound Identifier Error: try/nometh.scala:3:12 ----------------------
3 | val x = iDontExist(32)
| ^^^^^^^^^^
| not found: iDontExist
longer explanation available when compiling with `-explain`
-- [E006] Unbound Identifier Error: try/nometh.scala:6:12 ----------------------
6 | println(x)
| ^
| not found: iDontExist
longer explanation available when compiling with `-explain`
two errors found
Compare with the output you get with scalac:
try/nometh.scala:3: error: not found: value iDontExist
val x = iDontExist(32)
^
one error found
This is somewhat similar to #2412