Observe the following code
trait Example { type O def apply(o: O) def f(o: O) = this.apply(o) }
which compiles to Scala. I would expect that I can leave apply as usual by writing def f(o: O) = this(o) . However, this results in an error message.
type mismatch; found : o.type (with underlying type Example.this.O) required: _31.O where val _31: Example possible cause: missing arguments for method or constructor
Can someone explain to me what is going on?
source share