aboutsummaryrefslogtreecommitdiff
path: root/tests/patmat/t7669.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/patmat/t7669.scala')
-rw-r--r--tests/patmat/t7669.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/patmat/t7669.scala b/tests/patmat/t7669.scala
new file mode 100644
index 000000000..3aa74129e
--- /dev/null
+++ b/tests/patmat/t7669.scala
@@ -0,0 +1,14 @@
+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(_) =>
+ }
+}