summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2014-10-09 11:16:40 +0200
committerGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2014-10-09 11:16:40 +0200
commit22233f40f641815fe7b9304bb386ee27c8422603 (patch)
tree1f74d6849cb6fcde1c6fde5eecbd1f4fdfc67d26 /test
parent19d1c819033c0c739342225d48a3e1d153958c36 (diff)
parentff051e29eae9139a688664f3531028cd89df4c75 (diff)
downloadscala-22233f40f641815fe7b9304bb386ee27c8422603.tar.gz
scala-22233f40f641815fe7b9304bb386ee27c8422603.tar.bz2
scala-22233f40f641815fe7b9304bb386ee27c8422603.zip
Merge pull request #4038 from adriaanm/t8894v2.11.3
SI-8894 dealias when looking at tuple components
Diffstat (limited to 'test')
-rw-r--r--test/files/pos/t8894.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/pos/t8894.scala b/test/files/pos/t8894.scala
new file mode 100644
index 0000000000..3b26f1ae7e
--- /dev/null
+++ b/test/files/pos/t8894.scala
@@ -0,0 +1,12 @@
+class CC(val i: Int, val s: String)
+object CC extends {
+ type P = (Int, String)
+
+ //def unapply(c: CC): Option[(Int, String)] = Some((c.i, c.s)) // OK
+ def unapply(c: CC): Option[P] = Some((c.i, c.s)) // fails (because of the type alias)
+}
+
+class Test {
+ val cc = new CC(23, "foo")
+ val CC(i, s) = cc
+} \ No newline at end of file