aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/t0301.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/t0301.scala')
-rw-r--r--tests/pos/t0301.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/pos/t0301.scala b/tests/pos/t0301.scala
new file mode 100644
index 000000000..24b477601
--- /dev/null
+++ b/tests/pos/t0301.scala
@@ -0,0 +1,12 @@
+package fos
+
+abstract class Expr
+case class Var() extends Expr
+
+object Analyzer {
+ def substitution(expr: Expr, cls: (Var,Var)): Expr =
+ expr match {
+ case cls._2 => cls._1 // source of the error
+ case _ => expr
+ }
+}