Skip to content

Commit 02441d6

Browse files
authored
Merge pull request #12444 from dotty-staging/fix-#11795
Add regression test
2 parents 5e27be2 + 53747f9 commit 02441d6

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

tests/neg-macros/i11795.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import scala.quoted._
2+
import scala.deriving._
3+
4+
def blah[P <: Product]
5+
(m: Mirror.ProductOf[P])
6+
(using Quotes, Type[m.MirroredElemLabels], Type[m.MirroredElemTypes]) = {
7+
type z = Tuple.Zip[m.MirroredElemLabels, m.MirroredElemTypes]
8+
Type.of[z] // error
9+
()
10+
}

tests/pos-macros/i11795.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import scala.quoted._
2+
import scala.deriving._
3+
4+
def blah2[P <: Product, MEL <: Tuple: Type, MET <: Tuple: Type](m: Mirror.ProductOf[P] { type MirroredElemLabels = MEL; type MirroredElemTypes = MET})(using Quotes) = {
5+
Type.of[Tuple.Zip[MEL, MET]]
6+
()
7+
}

0 commit comments

Comments
 (0)