File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
compiler/src/dotty/tools/dotc/inlines Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -570,7 +570,7 @@ class Inliner(val call: tpd.Tree)(using Context):
570570 // LambdaTypeTree parameters also have the inlineMethod as owner. C.f. i13460.scala.
571571 && ! paramProxy.contains(tpe) =>
572572 paramBinding.get(tpe.name) match
573- case Some (bound) => paramProxy(tpe) = bound
573+ case Some (bound) => paramProxy(tpe) = mapOpaques.typeMap( bound)
574574 case _ => // can happen for params bound by type-lambda trees.
575575
576576 // The widened type may contain param types too (see tests/pos/i12379a.scala)
Original file line number Diff line number Diff line change 1+ object other :
2+ sealed abstract class Absent
3+ case object Absent extends Absent
4+ case class PresentAbsent (val depth : Int )
5+ opaque type Present [+ A ] = A | PresentAbsent
6+ opaque type Maybe [+ A ] >: (Absent | Present [A ]) = Absent | Present [A ]
7+
8+ extension [A ](self : Maybe [A ]) {
9+ inline def flatten [B ]: Maybe [B ] = if self.isEmpty then Absent else ???
10+ def isEmpty : Boolean = self.isInstanceOf [Absent ]
11+ }
12+
13+ class Test {
14+ def main (): Unit =
15+ import other .Maybe
16+ val res : Maybe [Maybe [Int ]] = ???
17+ res.flatten
18+ }
You can’t perform that action at this time.
0 commit comments