Closed
Description
Compiler version
3.2.1
Minimized code
trait Ctx
val f: Ctx ?=> Int = ???
def g: f.type = f
Output
-- [E172] Type Error: ----------------------------------------------------------
3 |def g: f.type = f
| ^
| No given instance of type Ctx was found for parameter of (Ctx) ?=> Int
-- [E172] Type Error: ----------------------------------------------------------
3 |def g: f.type = f
| ^
| No given instance of type Ctx was found for parameter of (Ctx) ?=> Int
Expectation
This should compile as it does for non-singleton context function types, e.g.
trait Ctx
val f: Ctx ?=> Int = ???
def g: Ctx ?=> Int = f
and singleton non-contextual function types, e.g.
trait Ctx
val f: Ctx => Int = ???
def g: f.type = f