Skip to content

Commit fae3ecc

Browse files
committed
Fix named-tuple strawman tests
1 parent 932316e commit fae3ecc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler/src/dotty/tools/dotc/inlines/Inliner.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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) = mapOpaques.typeMap(bound)
573+
case Some(bound) => paramProxy(tpe) = 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)
@@ -666,7 +666,9 @@ class Inliner(val call: tpd.Tree)(using Context):
666666
if opaqueProxies.isEmpty then StopAt.Static else StopAt.Package
667667
def apply(t: Type) = t match {
668668
case t: ThisType => thisProxy.getOrElse(t.cls, t)
669-
case t: TypeRef => paramProxy.getOrElse(t, mapOver(t))
669+
case t: TypeRef =>
670+
if (t.isMatch) paramProxy.getOrElse(t, mapOver(t)) // Do not map matchTypes
671+
else paramProxy.get(t).map(mapOpaques.typeMap(_)).getOrElse(mapOver(t))
670672
case t: SingletonType =>
671673
if t.termSymbol.isAllOf(InlineParam) then apply(t.widenTermRefExpr)
672674
else paramProxy.getOrElse(t, mapOver(t))

0 commit comments

Comments
 (0)