Open
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