diff --git a/compiler/src/dotty/tools/dotc/typer/Inliner.scala b/compiler/src/dotty/tools/dotc/typer/Inliner.scala index 70861d4be87c..a1315dcc0d16 100644 --- a/compiler/src/dotty/tools/dotc/typer/Inliner.scala +++ b/compiler/src/dotty/tools/dotc/typer/Inliner.scala @@ -439,7 +439,9 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) { paramProxy(param.typeRef) = adaptToPrefix(param.typeRef) case tpe: NamedType if tpe.symbol.is(Param) && tpe.symbol.owner == inlinedMethod && !paramProxy.contains(tpe) => - paramProxy(tpe) = paramBinding(tpe.name) + paramBinding.get(tpe.name) match + case Some(bound) => paramProxy(tpe) = bound + case _ => // can happen for params bound by type-lambda trees. case _ => } diff --git a/tests/pos/i7863.scala b/tests/pos/i7863.scala new file mode 100644 index 000000000000..bd33979ef6b2 --- /dev/null +++ b/tests/pos/i7863.scala @@ -0,0 +1,5 @@ +def f[F[_]] = () + +inline def g = f[[R] =>> Int => R] + +val a = g \ No newline at end of file