Skip to content

Commit 44031b8

Browse files
committed
Handle more tree forms in parents
1 parent fff6f48 commit 44031b8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/transform/init/Semantic.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,9 +569,9 @@ class Semantic {
569569
}
570570
superCall(tref, ctor, tree)
571571

572-
case ref: RefTree =>
573-
val tref = ref.tpe.asInstanceOf[TypeRef]
574-
superCall(tref, tref.classSymbol.primaryConstructor, ref)
572+
case _ =>
573+
val tref = typeRefOf(parent.tpe)
574+
superCall(tref, tref.classSymbol.primaryConstructor, parent)
575575
}
576576

577577
// see spec 5.1 about "Template Evaluation".

0 commit comments

Comments
 (0)