-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Closed
Copy link
Labels
area:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etc
Milestone
Description
A tiny, single-word bit of non-clarity in error messages:
Compiler version
3.2.2
Minimized example
object UnclearError extends App {
case class SomeContextThing()
case class SomeResult()
type ContextFunctionType = SomeContextThing ?=> SomeResult
def m(): ContextFunctionType = ???
m()
}
Output
<...>/src/main/scala/UnclearError.scala:11:6
No given instance of type UnclearError.SomeContextThing was found for parameter of UnclearError.ContextFunctionType
The required type is an alias of: (UnclearError.SomeContextThing) ?=> UnclearError.SomeResult
m()
Note how that says "parameter of UnclearError.ContextFunctionType
" instead of clearly/correctly saying "parameter of type UnclearError.ContextFunctionType
".
(Note now the phrase "required type" there can seem to refer to "type UnclearError.SomeContextThing," since that's the only other occurrence of the word "type" in the error message. That is, it can seem like it's saying that "type UnclearError.SomeContextThing" "is an alias of: (UnclearError.SomeContextThing) ?=> UnclearError.SomeResult".)
Expectation
That the "parameter of " part of that message would be worded clearly as "parameter of type " (and hopefully other, similar reference to types would do the same).
Metadata
Metadata
Assignees
Labels
area:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etc