diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-03-05 09:08:58 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-03-05 09:08:58 -0800 |
commit | 1176035f271821021c36d1b3cab6b2888e99524d (patch) | |
tree | 03008bb9d5ecc30512c54145a48e1dd045578480 /test/files/pos | |
parent | 773f6a8df9ef95852918a706f3f19ebf0431baa8 (diff) | |
parent | f482d5bdd0722e54cb3cfc2219df93da5f435bac (diff) | |
download | scala-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.scala | 11 | ||||
-rw-r--r-- | test/files/pos/t7183.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t7183.scala | 13 |
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. +// })) |