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.
1 parent 5d6a454 commit 039fec9Copy full SHA for 039fec9
compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
@@ -577,6 +577,18 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
577
case _ => tp2
578
}
579
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
+ */
592
def derivingType(tp1: AppliedType, clsRef: TypeRef): Type = {
593
val cls = clsRef.symbol
594
val typeParams = cls.typeParams
0 commit comments