Skip to content

Commit 039fec9

Browse files
committed
Fix imports and add explanations in Space
1 parent 5d6a454 commit 039fec9

File tree

1 file changed

+12
-0
lines changed
  • compiler/src/dotty/tools/dotc/transform/patmat

1 file changed

+12
-0
lines changed

compiler/src/dotty/tools/dotc/transform/patmat/Space.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,18 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
577577
case _ => tp2
578578
}
579579

580+
/** This might be useful for adapting to the new applied type scheme: */
581+
582+
import TypeApplications._
583+
import typer.ProtoTypes.constrained
584+
import ast.untpd
585+
586+
/** If `clsRef` is a subclass of `tp1`, the largest class type of the form
587+
*
588+
* pre.<clsRef>[args]
589+
*
590+
* which is a subtype of `tp1`.
591+
*/
580592
def derivingType(tp1: AppliedType, clsRef: TypeRef): Type = {
581593
val cls = clsRef.symbol
582594
val typeParams = cls.typeParams

0 commit comments

Comments
 (0)