summaryrefslogtreecommitdiff
path: root/test/files/neg/warn-unused-privates.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/warn-unused-privates.scala')
-rw-r--r--test/files/neg/warn-unused-privates.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/neg/warn-unused-privates.scala b/test/files/neg/warn-unused-privates.scala
index f0580f02d5..777e0f1579 100644
--- a/test/files/neg/warn-unused-privates.scala
+++ b/test/files/neg/warn-unused-privates.scala
@@ -193,3 +193,19 @@ trait Forever {
trait Ignorance {
private val readResolve = 42 // ignore
}
+
+trait CaseyKasem {
+ def f = 42 match {
+ case x if x < 25 => "no warn"
+ case y if toString.nonEmpty => "no warn" + y
+ case z => "warn"
+ }
+}
+trait CaseyAtTheBat {
+ def f = Option(42) match {
+ case Some(x) if x < 25 => "no warn"
+ case Some(y @ _) if toString.nonEmpty => "no warn"
+ case Some(z) => "warn"
+ case None => "no warn"
+ }
+}