summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2015-02-09 13:34:42 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2015-02-09 13:34:42 -0800
commit2b6a197d4ac11070699131808f0baf203553e86b (patch)
tree4a9336acc15a998a34c0f9ceb34a137bde5b0f3a /test
parentd7b11520222c9e995d27de46fecc19c5a1fa5b74 (diff)
parent9735108e9bb13b7b5a48bd2a051a5ec3e8a2f2ac (diff)
downloadscala-2b6a197d4ac11070699131808f0baf203553e86b.tar.gz
scala-2b6a197d4ac11070699131808f0baf203553e86b.tar.bz2
scala-2b6a197d4ac11070699131808f0baf203553e86b.zip
Merge pull request #4274 from retronym/ticket/9123
SI-9123 More coherent trees with patmat, dependent types
Diffstat (limited to 'test')
-rw-r--r--test/files/pos/t9123.flags1
-rw-r--r--test/files/pos/t9123.scala10
2 files changed, 11 insertions, 0 deletions
diff --git a/test/files/pos/t9123.flags b/test/files/pos/t9123.flags
new file mode 100644
index 0000000000..c16e2f71dc
--- /dev/null
+++ b/test/files/pos/t9123.flags
@@ -0,0 +1 @@
+-optimize -Ydelambdafy:method
diff --git a/test/files/pos/t9123.scala b/test/files/pos/t9123.scala
new file mode 100644
index 0000000000..22d55b4351
--- /dev/null
+++ b/test/files/pos/t9123.scala
@@ -0,0 +1,10 @@
+trait Setting {
+ type T
+ def value: T
+}
+
+object Test {
+ def test(x: Some[Setting]) = x match {
+ case Some(dep) => Some(dep.value) map (_ => true)
+ }
+}