aboutsummaryrefslogtreecommitdiff
path: root/tests/pos-scala2
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos-scala2')
-rw-r--r--tests/pos-scala2/t3050.scala9
-rw-r--r--tests/pos-scala2/t7688.scala7
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/pos-scala2/t3050.scala b/tests/pos-scala2/t3050.scala
new file mode 100644
index 000000000..160f8b664
--- /dev/null
+++ b/tests/pos-scala2/t3050.scala
@@ -0,0 +1,9 @@
+object Test {
+ def main(args: Array[String]): Unit = {
+ val x =
+ try { ("": Any) match { case List(_*) => true } }
+ catch { case _: Throwable => false }
+
+ assert(!x)
+ }
+}
diff --git a/tests/pos-scala2/t7688.scala b/tests/pos-scala2/t7688.scala
new file mode 100644
index 000000000..5a846b97e
--- /dev/null
+++ b/tests/pos-scala2/t7688.scala
@@ -0,0 +1,7 @@
+import scala.reflect.macros._
+
+class A[C <: Context with Singleton](position: C#Position)
+
+object A {
+ def apply(c: Context)(in: c.Tree): A[c.type] = new A(in.pos)
+}