diff --git a/tests/neg-macros/i11795.scala b/tests/neg-macros/i11795.scala new file mode 100644 index 000000000000..2a7f89831e0e --- /dev/null +++ b/tests/neg-macros/i11795.scala @@ -0,0 +1,10 @@ +import scala.quoted._ +import scala.deriving._ + +def blah[P <: Product] + (m: Mirror.ProductOf[P]) + (using Quotes, Type[m.MirroredElemLabels], Type[m.MirroredElemTypes]) = { + type z = Tuple.Zip[m.MirroredElemLabels, m.MirroredElemTypes] + Type.of[z] // error + () +} diff --git a/tests/pos-macros/i11795.scala b/tests/pos-macros/i11795.scala new file mode 100644 index 000000000000..32eaccf2f4e2 --- /dev/null +++ b/tests/pos-macros/i11795.scala @@ -0,0 +1,7 @@ +import scala.quoted._ +import scala.deriving._ + +def blah2[P <: Product, MEL <: Tuple: Type, MET <: Tuple: Type](m: Mirror.ProductOf[P] { type MirroredElemLabels = MEL; type MirroredElemTypes = MET})(using Quotes) = { + Type.of[Tuple.Zip[MEL, MET]] + () +}