Closed
Description
Scala gives errors if you try to use this
in combination with parameterised types:
scala> class A { val me: this.type = this }
defined class A
scala> class B { val maybeMe: Option[this.type] = Some(this) }
<console>:5: error: type mismatch;
found : Some[B]
required: Option[B.this.type]
val maybeMe: Option[this.type] = Some(this)
^