aboutsummaryrefslogtreecommitdiff
path: root/tests/disabled/not-representable/pos/t7035.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/disabled/not-representable/pos/t7035.scala')
-rw-r--r--tests/disabled/not-representable/pos/t7035.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/disabled/not-representable/pos/t7035.scala b/tests/disabled/not-representable/pos/t7035.scala
new file mode 100644
index 000000000..b1ce66cc6
--- /dev/null
+++ b/tests/disabled/not-representable/pos/t7035.scala
@@ -0,0 +1,17 @@
+// no longer works because dotty uses name-nased pattern matching for case classes
+
+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)
+}