@@ -510,7 +510,7 @@ class ClassLifter(logDebugMsg: Boolean = false) {
510
510
val nlhs = liftType(lb)
511
511
val nrhs = liftType(ub)
512
512
Bounds (nlhs._1, nrhs._1) -> (nlhs._2 ++ nrhs._2)
513
- case Constrained (base : Type , bounds, where) =>
513
+ case Constrained (base : Type , bounds, where, tscs ) =>
514
514
val (nTargs, nCtx) = bounds.map { case (tv, Bounds (lb, ub)) =>
515
515
val nlhs = liftType(lb)
516
516
val nrhs = liftType(ub)
@@ -521,10 +521,18 @@ class ClassLifter(logDebugMsg: Boolean = false) {
521
521
val nrhs = liftType(ub)
522
522
Bounds (nlhs._1, nrhs._1) -> (nlhs._2 ++ nrhs._2)
523
523
}.unzip
524
+ val (tscs0, nCtx3) = tscs.map { case (tvs, cs) =>
525
+ val (ntvs,c0) = tvs.map { case (p,v) =>
526
+ val (nv, c) = liftType(v)
527
+ (p,nv) -> c
528
+ }.unzip
529
+ val (ncs,c1) = cs.map(_.map(liftType).unzip).unzip
530
+ (ntvs,ncs) -> (c0 ++ c1.flatten)
531
+ }.unzip
524
532
val (nBase, bCtx) = liftType(base)
525
- Constrained (nBase, nTargs, bounds2) ->
526
- ((nCtx ++ nCtx2).fold(emptyCtx)(_ ++ _) ++ bCtx)
527
- case Constrained (_, _, _) => die
533
+ Constrained (nBase, nTargs, bounds2, tscs0 ) ->
534
+ ((nCtx ++ nCtx2 ++ nCtx3.flatten ).fold(emptyCtx)(_ ++ _) ++ bCtx)
535
+ case Constrained (_, _, _, _ ) => die
528
536
case Function (lhs, rhs) =>
529
537
val nlhs = liftType(lhs)
530
538
val nrhs = liftType(rhs)
0 commit comments