Unexpected productIterator order
Simon Adameit <[email protected]>
| Newsgroups | gmane.comp.lang.scala |
|---|---|
| Message-ID | <[email protected]> |
Hello,
we noticed some strange behaviour of productIterator in Scala 2.11.5:
case class Data(a: String, b: String, `a-some`: String)
val m = Data("1", "2", "3")
assert(m.productIterator.mkString(", ") == "1, 2, 3")
Result: "1, [3, 2]" did not equal "1, [2, 3]"
"a-some" can be any mangled symbol with an "a" prefix.
Is the order of productIterator on case classes guaranteed to be in
parameter order? If so, this seems to be a bug. Can anyone reproduce it?
Regards,
Simon Adameit
--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.