diff --git a/compiler/src/dotty/tools/dotc/typer/Applications.scala b/compiler/src/dotty/tools/dotc/typer/Applications.scala index b65ca4b5c355..4f87d0741be3 100644 --- a/compiler/src/dotty/tools/dotc/typer/Applications.scala +++ b/compiler/src/dotty/tools/dotc/typer/Applications.scala @@ -118,7 +118,7 @@ object Applications { } def tupleComponentTypes(tp: Type)(using Context): List[Type] = - tp.widenExpr.dealias match + tp.widenExpr.dealias.normalized match case tp: AppliedType => if defn.isTupleClass(tp.tycon.typeSymbol) then tp.args diff --git a/compiler/test/dotc/pos-test-pickling.blacklist b/compiler/test/dotc/pos-test-pickling.blacklist index e6fd9deb979d..f7b8eaa2a7c0 100644 --- a/compiler/test/dotc/pos-test-pickling.blacklist +++ b/compiler/test/dotc/pos-test-pickling.blacklist @@ -36,6 +36,7 @@ i11236.scala i11247.scala i11250 i9999.scala +i12127.scala # Opaque type i5720.scala diff --git a/tests/pos/i12127.scala b/tests/pos/i12127.scala new file mode 100644 index 000000000000..ce0ff6b31546 --- /dev/null +++ b/tests/pos/i12127.scala @@ -0,0 +1,5 @@ +val x = Option((1, 2, 3)).map(_ + _ + _) +def foo[T <: Tuple : Tuple.IsMappedBy[Option]](t: T)(f: Tuple.InverseMap[T, Option] => Int) = null +val y = foo(Option(1), Option(2), Option(3))(_ + _ + _) + +//val x: (Tuple3[Int, Int, Int] => Int) = _ + _ + _