diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-03-01 16:54:44 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-03-01 16:54:44 -0800 |
commit | 440bf0a8c2545006de1ec70179100742fd73d981 (patch) | |
tree | 1eb66e38d1404604a07dc2b543ba559533fd133b /test/files/pos | |
parent | c4eede47d7de2af0f31b344bef5c5d7ee6739d27 (diff) | |
parent | 0303e64efa8ee223c0767d7be8d2875a62b88aea (diff) | |
download | scala-440bf0a8c2545006de1ec70179100742fd73d981.tar.gz scala-440bf0a8c2545006de1ec70179100742fd73d981.tar.bz2 scala-440bf0a8c2545006de1ec70179100742fd73d981.zip |
Merge pull request #2168 from retronym/ticket/7183
SI-7183 Disable unreachability for withFilter matches.
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t7183.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t7183.scala | 13 |
2 files changed, 14 insertions, 0 deletions
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. +// })) |