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
Regression found in Open CB #167 for giiita/refuel
It seems that during the transformation information about the exact tuple type is lost. In this case Tuple27 is trimmed to Tuple23
Works in 3.1.1 Fails since 3.1.2
Bisect points to: 584c05b
There are 2 failing cases, but they seem to be related. I'm providing both of them to allow for proper testing of the fix
trait JsonVal val value = ("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, "k", "l", "m", "n", "o", "p", "q") val tree: JsonVal = ??? def Case1 = { sealed trait Read[T] object ReadOf: final inline def tuple[T <: Tuple]: Read[T] = ??? given JsonTreeToEntry: scala.Conversion[JsonVal, JsonRowEntry] = ??? trait JsonRowEntry: def readAs[E](using Read[E]): util.Try[E] = ??? extension [T, U](leftSideValue: T) def shouldBe(rhs: U)(using CanEqual[T, U]) = ??? tree .readAs(using ReadOf.tuple[String *: String *: String *: String *: String *: String *: String *: String *: String *: String *: Int *: Int *: Int *: Int *: Int *: Int *: Int *: Int *: Int *: Int *: String *: String *: String *: String *: String *: String *: String *: EmptyTuple]) .fold(_ => ???, _.shouldBe(value)) }
[error] ./test.scala:22:36: Values of types (String, String, String, String, String, String, String, String, String, String [error] , [error] Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, String, String, String) and (String, String, String, String, String, String, String, String, String, String [error] , [error] Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, String, String, String, String [error] , [error] String, String, String) cannot be compared with == or !=.
Tuple(10xString, 10xInt, 3xString) cannot be compared with Tuple(10xString, 10xInt, 7xString)
Tuple(10xString, 10xInt, 3xString)
Tuple(10xString, 10xInt, 7xString)
trait JsonVal val value = ("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, "k", "l", "m", "n", "o", "p", "q") val tree: JsonVal = ??? def Case2 = { sealed trait Write[T] object WriteOf: final inline def tuple[T <: Tuple]: Write[T] = ??? given EntryToJson[T]: scala.Conversion[T, JsonStructureEntry[T]] = ??? class JsonStructureEntry[T](t: T): def writeAs[X >: T](using Write[X]): util.Try[JsonVal] = ??? value .writeAs(using WriteOf.tuple[String *: String *: String *: String *: String *: String *: String *: String *: String *: String *: Int *: Int *: Int *: Int *: Int *: Int *: Int *: Int *: Int *: Int *: String *: String *: String *: String *: String *: String *: String *: EmptyTuple]) .fold(_ => ???, _ == tree) }
[error] ./test.scala:35:18: Found: Write[String *: String *: String *: String *: String *: String *: String *: [error] String [error] *: String *: String *: Int *: Int *: Int *: Int *: Int *: Int *: Int *: Int *: [error] Int [error] *: Int *: String *: String *: String *: String *: String *: String *: String *: [error] [error] EmptyTuple] [error] Required: Write[(String, String, String, String, String, String, String, String, String, [error] String [error] , Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, String, String, String)] [error] .writeAs(using WriteOf.tuple[String *: String *: String *: String *: String *: String *: String *: String *: String *: String *: Int *: Int *: Int *: Int *: Int *: Int *: Int *: Int *: Int *: Int *: String *: String *: String *: String *: String *: String *: String *: EmptyTuple]) [error] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Found Write[Tuple(10xString, 10xInt, 3xString)], required Write[Tuple(10xString, 10xInt, 7xString)]
Write[Tuple(10xString, 10xInt, 3xString)]
Write[Tuple(10xString, 10xInt, 7xString)]
Should compile
The text was updated successfully, but these errors were encountered:
Fix tuple casting
2951ce9
Was truncating tuples of size > 22 before. Fixes scala#16104
2bd5971
235f08b
odersky
Successfully merging a pull request may close this issue.
Regression found in Open CB #167 for giiita/refuel
It seems that during the transformation information about the exact tuple type is lost. In this case Tuple27 is trimmed to Tuple23
Compiler version
Works in 3.1.1
Fails since 3.1.2
Bisect points to: 584c05b
Minimized code
There are 2 failing cases, but they seem to be related. I'm providing both of them to allow for proper testing of the fix
Case 1
Input
Output
Tuple(10xString, 10xInt, 3xString)
cannot be compared withTuple(10xString, 10xInt, 7xString)
Case 2
Input
Output
Found
Write[Tuple(10xString, 10xInt, 3xString)]
, requiredWrite[Tuple(10xString, 10xInt, 7xString)]
Expectation
Should compile
The text was updated successfully, but these errors were encountered: