-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label
Description
Compiler version
Minimized code
def bar[A](f: A => Unit): A = ???
def foo[A, U](f: A => U): A = bar(f)Output
-- [E007] Type Mismatch Error: test.scala:2:34 ---------------------------------
2 |def foo[A, U](f: A => U): A = bar(f)
| ^
| Found: (f : A => U)
| Required: A => Unit
|
| longer explanation available when compiling with `-explain`Expectation
Should compile. It was mentioned during our lab meeting last week that we do perform adaptation after eta-expansion.
Notes
If we expand manually, the code compiles.
def bar[A](f: A => Unit): A = ???
def foo[A, U](f: A => U): A = bar(x => f(x))Metadata
Metadata
Assignees
Labels
itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label