summaryrefslogtreecommitdiff
path: root/test/files/neg/t7669.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/t7669.scala')
-rw-r--r--test/files/neg/t7669.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/neg/t7669.scala b/test/files/neg/t7669.scala
new file mode 100644
index 0000000000..12441ec056
--- /dev/null
+++ b/test/files/neg/t7669.scala
@@ -0,0 +1,13 @@
+object Test {
+
+ sealed abstract class Expr
+ // Change type of `arg` to `Any` and the exhaustiveness warning
+ // is issued below
+ case class Op(arg: Expr) extends Expr
+ case class NotHandled(num: Double) extends Expr
+
+ def exhausto(expr: Expr): Unit = expr match {
+ case Op(Op(_)) =>
+ case Op(_) =>
+ }
+}