File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -907,14 +907,19 @@ class Namer { typer: Typer =>
907907 case TypeApply (core, targs) => (core, targs)
908908 case core => (core, Nil )
909909 }
910- val Select (New (tpt), nme.CONSTRUCTOR ) = core
911- val targs1 = targs map (typedAheadType(_))
912- val ptype = typedAheadType(tpt).tpe appliedTo targs1.tpes
913- if (ptype.typeParams.isEmpty) ptype
914- else {
915- if (denot.is(ModuleClass ) && denot.sourceModule.is(Implicit ))
916- missingType(denot.symbol, " parent " )(creationContext)
917- fullyDefinedType(typedAheadExpr(parent).tpe, " class parent" , parent.pos)
910+ core match {
911+ case Select (New (tpt), nme.CONSTRUCTOR ) =>
912+ val targs1 = targs map (typedAheadType(_))
913+ val ptype = typedAheadType(tpt).tpe appliedTo targs1.tpes
914+ if (ptype.typeParams.isEmpty) ptype
915+ else {
916+ if (denot.is(ModuleClass ) && denot.sourceModule.is(Implicit ))
917+ missingType(denot.symbol, " parent " )(creationContext)
918+ fullyDefinedType(typedAheadExpr(parent).tpe, " class parent" , parent.pos)
919+ }
920+ case _ =>
921+ assert(ctx.reporter.errorsReported)
922+ UnspecifiedErrorType
918923 }
919924 }
920925
Original file line number Diff line number Diff line change 1+ case class I0 extends this // error // error
You can’t perform that action at this time.
0 commit comments