Closed
Description
Compiler version
3.4.0
Minimized example
val b = new Object().unit
Output Error/Warning message
[info] compiling 1 Scala source to /Users/lihaoyi/test/out/compile.dest/classes ...
[error] -- [E008] Not Found Error: /Users/lihaoyi/test/src/Main.scala:1:21 -------------
[error] 1 |val b = new Object().unit
[error] | ^^^^^^^^^^^^^^^^^
[error] |value unit is not a member of Object - did you mean Object.wait? or perhaps Object.wait or Object.wait?
Why this Error/Warning was not helpful
The message was unhelpful because we repeat Object.wait
three times, presumably because there are three overloaded methods wait
that have similar names as .unit
. This is useless, because those three overloads have the same name, and so displaying that name once is sufficient
Suggested improvement
It should just say
value unit is not a member of Object - did you mean Object.wait?