Skip to content

Commit 1329832

Browse files
committed
Fix crash: handle annotations in parents
dotc -d out -Ycheck-init tests/pos/annot.scala
1 parent bdf895c commit 1329832

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ object Summarization {
311311

312312
def classSummary(cls: ClassSymbol)(implicit env: Env): ClassSummary =
313313
def extractParentOuters(parent: Type, source: Tree): (ClassSymbol, Potentials) = {
314-
val tref = parent.typeConstructor.asInstanceOf[TypeRef]
314+
val tref = parent.typeConstructor.stripAnnots.asInstanceOf[TypeRef]
315315
val parentCls = tref.classSymbol.asClass
316316
if (tref.prefix != NoPrefix)
317317
parentCls ->analyze(tref.prefix, source)._1

0 commit comments

Comments
 (0)