diff options
author | Paul Phillips <paulp@improving.org> | 2010-02-23 08:32:53 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-02-23 08:32:53 +0000 |
commit | 84ecd8c45a66c2e27eb4b0782f0d1b3c4c55466d (patch) | |
tree | dfac5858c64f30b40668d5b26e2e8e931e897fc5 /test/files/scalap/caseClass | |
parent | 68cbfeac525cad416a3e2fd4b90d13631dd81bc6 (diff) | |
download | scala-84ecd8c45a66c2e27eb4b0782f0d1b3c4c55466d.tar.gz scala-84ecd8c45a66c2e27eb4b0782f0d1b3c4c55466d.tar.bz2 scala-84ecd8c45a66c2e27eb4b0782f0d1b3c4c55466d.zip |
Added productElementName to Product.
case class field names your heart desires. Review by odersky.
scala> case class Foo[T](kilroy: String, burma: List[T], shave:
Seq[Int]) defined class Foo
scala> Foo("was here", List('myanmar), Seq(25, 25))
res0: Foo[Symbol] = Foo(was here,List('myanmar),List(25, 25))
scala> 0 to 2 map (res0 productElementName _)
res1: IndexedSeq[String] = IndexedSeq(kilroy, burma, shave)
Diffstat (limited to 'test/files/scalap/caseClass')
-rw-r--r-- | test/files/scalap/caseClass/result.test | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/files/scalap/caseClass/result.test b/test/files/scalap/caseClass/result.test index 12cb012c8d..949afbf5d1 100644 --- a/test/files/scalap/caseClass/result.test +++ b/test/files/scalap/caseClass/result.test @@ -11,5 +11,6 @@ case class CaseClass[A <: scala.Seq[scala.Int]](i : A, s : scala.Predef.String) override def productPrefix : java.lang.String = { /* compiled code */ } override def productArity : scala.Int = { /* compiled code */ } override def productElement(x$1 : scala.Int) : scala.Any = { /* compiled code */ } + override def productElementName(x$1 : scala.Int) : java.lang.String = { /* compiled code */ } override def canEqual(x$1 : scala.Any) : scala.Boolean = { /* compiled code */ } } |