summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-03-05 09:08:58 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-03-05 09:08:58 -0800
commit1176035f271821021c36d1b3cab6b2888e99524d (patch)
tree03008bb9d5ecc30512c54145a48e1dd045578480 /test/files/pos
parent773f6a8df9ef95852918a706f3f19ebf0431baa8 (diff)
parentf482d5bdd0722e54cb3cfc2219df93da5f435bac (diff)
downloadscala-1176035f271821021c36d1b3cab6b2888e99524d.tar.gz
scala-1176035f271821021c36d1b3cab6b2888e99524d.tar.bz2
scala-1176035f271821021c36d1b3cab6b2888e99524d.zip
Merge pull request #2193 from adriaanm/patmat-refactor
merge 2.10.1 into 2.10.x
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/t7126.scala11
-rw-r--r--test/files/pos/t7183.flags1
-rw-r--r--test/files/pos/t7183.scala13
3 files changed, 25 insertions, 0 deletions
diff --git a/test/files/pos/t7126.scala b/test/files/pos/t7126.scala
new file mode 100644
index 0000000000..6720511e08
--- /dev/null
+++ b/test/files/pos/t7126.scala
@@ -0,0 +1,11 @@
+import language._
+
+object Test {
+ type T = Any
+ boom(???): Option[T] // SOE
+ def boom[CC[U]](t : CC[T]): Option[CC[T]] = None
+
+ // okay
+ foo(???): Option[Any]
+ def foo[CC[U]](t : CC[Any]): Option[CC[Any]] = None
+} \ No newline at end of file
diff --git a/test/files/pos/t7183.flags b/test/files/pos/t7183.flags
new file mode 100644
index 0000000000..e8fb65d50c
--- /dev/null
+++ b/test/files/pos/t7183.flags
@@ -0,0 +1 @@
+-Xfatal-warnings \ No newline at end of file
diff --git a/test/files/pos/t7183.scala b/test/files/pos/t7183.scala
new file mode 100644
index 0000000000..7647c1634b
--- /dev/null
+++ b/test/files/pos/t7183.scala
@@ -0,0 +1,13 @@
+class A
+object A {
+ def unapply(a: A): Some[A] = Some(a) // Change return type to Option[A] and the warning is gone
+}
+
+object Test {
+ for (A(a) <- List(new A)) yield a // spurious dead code warning.
+}
+
+// List(new A()).withFilter(((check$ifrefutable$2) => check$ifrefutable$2: @scala.unchecked match {
+// case A((a @ _)) => true
+// case _ => false // this is dead code, but it's compiler generated.
+// }))