Maybe I need to update the dependent types, but I do not understand why the following does not work:
trait Code { type In; type Out }
trait Handler[In, Out]
class Foo(val code: Code)(handler: Option[Handler[code.In, code.Out]])
Error:
<console>:52: error: not found: value code
class Foo(val code: Code)(handler: Option[Handler[code.In, code.Out]])
^
<console>:52: error: not found: value code
class Foo(val code: Code)(handler: Option[Handler[code.In, code.Out]])
^
Edit : Now I see how to get around this. However, I would like to know why the above does not work?
source
share