-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area:parserarea:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesIssues concerned with improving confusing/unhelpful diagnostic messagesitype:enhancement
Description
Compiler version
3.6
Minimized example
trait Arg
trait Ret
given what: () => Arg => Ret = ??? // error
// ambigious but not handled
given what1: () => (Arg => Ret) = ???
// implicit def what(): (Arg => Ret) = ???
given what2: (() => Arg) => Ret = ???
// implicit def what(ctx: () => Arg): Ret = ???
given what3: (() => Arg => Ret) = ???
// implicit lazy val: (() => Arg => Ret) = ???
Output Error/Warning message
-- Error: /Users/wmazur/projects/scala/sandbox/test.scala:4:22 ---------------------------------------------------------------------------------------------------------------------------------------------
4 |given what: () => Arg => Ret = ??? // error
| ^^
| end of toplevel definition expected but '=>' found
Why this Error/Warning was not helpful
No context on how to fix the code
Suggested improvement
Inform that given definition is ambigious, recommend placing using paranthesis to fix the expression
Metadata
Metadata
Assignees
Labels
area:parserarea:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesIssues concerned with improving confusing/unhelpful diagnostic messagesitype:enhancement