@@ -606,7 +606,7 @@ class CheckCaptures extends Recheck, SymTransformer:
606606 val (eargs, eres) = expected.dealias match
607607 case defn.FunctionOf (eargs, eres, _, _) => (eargs, eres)
608608 case _ => (aargs.map(_ => WildcardType ), WildcardType )
609- val aargs1 = aargs.zipWithConserve(eargs){ (aarg, earg) => adapt(aarg, earg, ! covariant) }
609+ val aargs1 = aargs.zipWithConserve(eargs) { (aarg, earg) => adapt(aarg, earg, ! covariant) }
610610 val ares1 = adapt(ares, eres, covariant)
611611
612612 val resTp =
@@ -623,9 +623,9 @@ class CheckCaptures extends Recheck, SymTransformer:
623623 i " adapting $actual $arrow $expected"
624624
625625 def adapt (actual : Type , expected : Type , covariant : Boolean ): Type = trace(adaptInfo(actual, expected, covariant), recheckr, show = true ) {
626- def destructCapturingType (tp : Type , reconstruct : Type => Type ): ((Type , CaptureSet , Boolean ), Type => Type ) = tp match
626+ def destructCapturingType (tp : Type , reconstruct : Type => Type ): ((Type , CaptureSet , Boolean ), Type => Type ) = tp.dealias match
627627 case tp @ CapturingType (parent, cs) =>
628- if parent.isCapturingType then
628+ if parent.dealias. isCapturingType then
629629 destructCapturingType(parent, res => reconstruct(tp.derivedCapturingType(res, cs)))
630630 else
631631 ((parent, cs, tp.isBoxed), reconstruct)
0 commit comments