summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-01-30 16:25:53 -0800
committerPaul Phillips <paulp@improving.org>2013-01-30 16:25:53 -0800
commitd24f341f081aef296d174ea54d0579976eeaae98 (patch)
treec708611aeb7bed6d2b7e05ee408a028a88b50150 /test
parent7d80e0846964053b81b4e4b5db7b9356e3bcc601 (diff)
parent9afae59f0e46bed0acf40d043d3ee2a0e0ef432f (diff)
downloadscala-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')
-rw-r--r--test/files/pos/t7035.scala15
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)
+}