We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 65dc7ad + 35d0acd commit d63191dCopy full SHA for d63191d
compiler/src/dotty/tools/dotc/typer/Namer.scala
@@ -843,7 +843,7 @@ class Namer { typer: Typer =>
843
val targs1 = targs map (typedAheadType(_))
844
val ptype = typedAheadType(tpt).tpe appliedTo targs1.tpes
845
if (ptype.typeParams.isEmpty) ptype
846
- else typedAheadExpr(parent).tpe
+ else fullyDefinedType(typedAheadExpr(parent).tpe, "class parent", parent.pos)
847
}
848
849
/* Check parent type tree `parent` for the following well-formedness conditions:
tests/pos/i2218.scala
@@ -0,0 +1,9 @@
1
+trait Rule[In]
2
+
3
+class C {
4
+ def ruleWithName[In](f: In => Int): Rule[In] = {
5
+ new DefaultRule(f) {}
6
+ }
7
8
+ class DefaultRule[In](f: In => Int) extends Rule[In]
9
+}
0 commit comments