object Node {
trait Root { self: Node =>
val root = this
}
}
trait Node {
def root: Node
}
final class RootNode extends Node with Node.Root
Compiles on 2.12, crashes in RefChecks on 2.13.14
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.checkOverrideTerm$1(RefChecks.scala:557)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.checkOverrideTypes$1(RefChecks.scala:565)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.checkOverride$1(RefChecks.scala:393)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.checkAllOverrides(RefChecks.scala:582)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.checkOverrideTerm$1(RefChecks.scala:557)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.checkOverrideTypes$1(RefChecks.scala:565)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.checkOverride$1(RefChecks.scala:393)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.checkAllOverrides(RefChecks.scala:582)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.checkOverrideTerm$1(RefChecks.scala:557)
Compiles on 2.12, crashes in RefChecks on 2.13.14