summaryrefslogtreecommitdiff
path: root/test/pending/pos/treecheckers/c1.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/pending/pos/treecheckers/c1.scala')
-rw-r--r--test/pending/pos/treecheckers/c1.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/pending/pos/treecheckers/c1.scala b/test/pending/pos/treecheckers/c1.scala
new file mode 100644
index 0000000000..b936839039
--- /dev/null
+++ b/test/pending/pos/treecheckers/c1.scala
@@ -0,0 +1,12 @@
+object Test1 {
+ def f[T](xs: Array[T]): Array[T] = xs match { case xs => xs }
+ // [check: patmat] The symbol, tpe or info of tree `(x) : Array[T]` refers to a out-of-scope symbol, type T. tree.symbol.ownerChain: value x
+ // [check: patmat] The symbol, tpe or info of tree `(x) : Array[T]` refers to a out-of-scope symbol, type T. tree.symbol.ownerChain: value x
+
+ def g[T](xs: Array[T]): Array[T] = {
+ val x1: Array[T] = xs
+ def case4() = matchEnd3(x1)
+ def matchEnd3(x: Array[T]) = x
+ case4()
+ }
+}