We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi there π
Type Mismatch Error occurs when using Conversion with more than 23 Tuples.
β» The "cats.Id" part can be anything.
3.3.0
import scala.deriving.Mirror import cats.Id def test[P <: Product](using mirror: Mirror.ProductOf[P])(tuples: Tuple.Map[mirror.MirroredElemTypes, Id]): Tuple.Map[mirror.MirroredElemTypes, Id] = tuples given Conversion[Id[2], Id[Seq[2]]] = v => Seq(v)
Successful Patterns
case class Test(p1: 1, p2: Seq[2], p3: 3, p4: 4, p5: 5, p6: 6, p7: 7, p8: 8, p9: 9, p10: 10, p11: 11, p12: 12, p13: 13, p14: 14, p15: 15, p16: 16, p17: 17, p18: 18, p19: 19, p20: 20, p21: 21, p22: 22) test[Test](Id[1](1), Id[2](2), Id[3](3), Id[4](4), Id[5](5), Id[6](6), Id[7](7), Id[8](8), Id[9](9), Id[10](10), Id[11](11), Id[12](12), Id[13](13), Id[14](14), Id[15](15), Id[16](16), Id[17](17), Id[18](18), Id[19](19), Id[20](20), Id[21](21), Id[22](22))
Failure Patterns
case class Test(p1: 1, p2: Seq[2], p3: 3, p4: 4, p5: 5, p6: 6, p7: 7, p8: 8, p9: 9, p10: 10, p11: 11, p12: 12, p13: 13, p14: 14, p15: 15, p16: 16, p17: 17, p18: 18, p19: 19, p20: 20, p21: 21, p22: 22, p23: 23) test[Test](Id[1](1), Id[2](2), Id[3](3), Id[4](4), Id[5](5), Id[6](6), Id[7](7), Id[8](8), Id[9](9), Id[10](10), Id[11](11), Id[12](12), Id[13](13), Id[14](14), Id[15](15), Id[16](16), Id[17](17), Id[18](18), Id[19](19), Id[20](20), Id[21](21), Id[22](22), Id[23](23))
val res6: (cats.Id[1], cats.Id[Seq[2]], cats.Id[3], cats.Id[4], cats.Id[5], cats.Id[6], cats.Id[7], cats.Id[8], cats.Id[9], cats.Id[10], cats.Id[11], cats.Id[12], cats.Id[13], cats.Id[14], cats.Id[15], cats.Id[16], cats.Id[17], cats.Id[18], cats.Id[19], cats.Id[20], cats.Id[21], cats.Id[22]) = (1,List(2),3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22)
-- [E007] Type Mismatch Error: ------------------------------------------------- 1 |test[Test](Id[1](1), Id[2](2), Id[3](3), Id[4](4), Id[5](5), Id[6](6), Id[7](7), Id[8](8), Id[9](9), Id[10](10), Id[11](11), Id[12](12), Id[13](13), Id[14](14), Id[15](15), Id[16](16), Id[17](17), Id[18](18), Id[19](19), Id[20](20), Id[21](21), Id[22](22), Id[23](23)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |Found: (Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, | Int, Int, Int, Int, Int, Int, Int, Int) |Required: Tuple.Map[ | ((1 : Int), Seq[(2 : Int)], (3 : Int), (4 : Int), (5 : Int), (6 : Int), | (7 : Int), (8 : Int), (9 : Int), (10 : Int), (11 : Int), (12 : Int), | (13 : Int), (14 : Int), (15 : Int), (16 : Int), (17 : Int), (18 : Int), | (19 : Int), (20 : Int), (21 : Int), (22 : Int), (23 : Int)), |cats.Id] | | longer explanation available when compiling with `-explain` 1 error found
Since Scala3 no longer has a Tuple limit, we hope that more than 23 Tuples will be successful without any problems.
The text was updated successfully, but these errors were encountered:
More self-contained minimization:
import scala.deriving.Mirror type Id[A] = A object Id: def apply[A](a: A): Id[A] = a def test[P <: Product](using mirror: Mirror.ProductOf[P])(tuples: Tuple.Map[mirror.MirroredElemTypes, Id]): Tuple.Map[mirror.MirroredElemTypes, Id] = tuples def main() = case class Test(p1: 1, p2: 2, p3: 3, p4: 4, p5: 5, p6: 6, p7: 7, p8: 8, p9: 9, p10: 10, p11: 11, p12: 12, p13: 13, p14: 14, p15: 15, p16: 16, p17: 17, p18: 18, p19: 19, p20: 20, p21: 21, p22: 22, p23: 23) test[Test](Id[1](1), Id[2](2), Id[3](3), Id[4](4), Id[5](5), Id[6](6), Id[7](7), Id[8](8), Id[9](9), Id[10](10), Id[11](11), Id[12](12), Id[13](13), Id[14](14), Id[15](15), Id[16](16), Id[17](17), Id[18](18), Id[19](19), Id[20](20), Id[21](21), Id[22](22), Id[23](23))
Sorry, something went wrong.
Add regression test for scala#18260
f4ddeaf
Closes scala#18260
Add regression test for #18260 (#19186)
bfabc31
Closes #18260
Add regression test for #18260
bcb72d3
Closes #18260 [Cherry-picked f4ddeaf]
Backport "Add regression test for #18260" to LTS (#20827)
366dbf9
Backports #19186 to the LTS branch. PR submitted by the release tooling. [skip ci]
Successfully merging a pull request may close this issue.
Hi there π
Type Mismatch Error occurs when using Conversion with more than 23 Tuples.
β» The "cats.Id" part can be anything.
Compiler version
3.3.0
Minimized code
Successful Patterns
Failure Patterns
Output
Successful Patterns
Failure Patterns
Expectation
Since Scala3 no longer has a Tuple limit, we hope that more than 23 Tuples will be successful without any problems.
The text was updated successfully, but these errors were encountered: