Closed
Description
object Test {
def foo(x: => Int) ={
val a = x _ // error
val b: () => Int = x _ // error
}
}
The first error message is correct, but the second leaks the ErrorType and thus looks confusing:
-- [E099] Syntax Error: try/byeta.scala:3:14 -----------------------------------
3 | val a = x _ // error
| ^^^
| Not a function: => Int(x): cannot be followed by _
longer explanation available when compiling with `-explain`
-- [E099] Syntax Error: try/byeta.scala:4:25 -----------------------------------
4 | val b: () => Int = x _ // error
| ^^^
| Not a function: <error found: Int
| required: () => Int
|
| >: cannot be followed by _