diff options
author | Paul Phillips <paulp@improving.org> | 2013-01-30 16:25:53 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-01-30 16:25:53 -0800 |
commit | d24f341f081aef296d174ea54d0579976eeaae98 (patch) | |
tree | c708611aeb7bed6d2b7e05ee408a028a88b50150 /test/files | |
parent | 7d80e0846964053b81b4e4b5db7b9356e3bcc601 (diff) | |
parent | 9afae59f0e46bed0acf40d043d3ee2a0e0ef432f (diff) | |
download | scala-d24f341f081aef296d174ea54d0579976eeaae98.tar.gz scala-d24f341f081aef296d174ea54d0579976eeaae98.tar.bz2 scala-d24f341f081aef296d174ea54d0579976eeaae98.zip |
Merge pull request #1997 from retronym/ticket/7035
SI-7035 Centralize case field accessor sorting.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/pos/t7035.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/pos/t7035.scala b/test/files/pos/t7035.scala new file mode 100644 index 0000000000..f45bd0a878 --- /dev/null +++ b/test/files/pos/t7035.scala @@ -0,0 +1,15 @@ +case class Y(final var x: Int, final private var y: String, final val z1: Boolean, final private val z2: Any) { + + import Test.{y => someY} + List(someY.x: Int, someY.y: String, someY.z1: Boolean, someY.z2: Any) + someY.y = "" +} + +object Test { + val y = Y(0, "", true, new {}) + val unapp: Option[(Int, String, Boolean, Any)] = // was (Int, Boolean, String, Any) !! + Y.unapply(y) + + val Y(a, b, c, d) = y + List(a: Int, b: String, c: Boolean, d: Any) +} |