File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,12 @@ object TypeTestsCasts {
9292
9393 def isClassDetermined (X : Type , P : AppliedType )(implicit ctx : Context ) = {
9494 val AppliedType (tycon, _) = P
95- val typeLambda = tycon.ensureLambdaSub.asInstanceOf [TypeLambda ]
95+
96+ def underlyingLambda (tp : Type ): TypeLambda = tp.ensureLambdaSub match {
97+ case tp : TypeLambda => tp
98+ case tp : TypeProxy => underlyingLambda(tp.superType)
99+ }
100+ val typeLambda = underlyingLambda(tycon)
96101 val tvars = constrained(typeLambda, untpd.EmptyTree , alwaysAddTypeVars = true )._2.map(_.tpe)
97102 val P1 = tycon.appliedTo(tvars)
98103
Original file line number Diff line number Diff line change 1+ object Test {
2+ trait Expr { type T }
3+ type ExprExact [A ] = Expr { type T = A }
4+ type IndirectExprExact [A ] = Expr { type S = A ; type T = S }
5+
6+ def foo [A ](e : ExprExact [A ]): Unit = e match {
7+ case _ : IndirectExprExact [Int ] =>
8+ }
9+ }
You can’t perform that action at this time.
0 commit comments