summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/existential-rangepos.check13
-rw-r--r--test/files/run/existential-rangepos.scala13
2 files changed, 26 insertions, 0 deletions
diff --git a/test/files/run/existential-rangepos.check b/test/files/run/existential-rangepos.check
new file mode 100644
index 0000000000..1212b60bae
--- /dev/null
+++ b/test/files/run/existential-rangepos.check
@@ -0,0 +1,13 @@
+[[syntax trees at end of patmat]] // newSource1.scala
+[0:76]package [0:0]<empty> {
+ [0:76]abstract class A[[17:18]T[17:18]] extends [20:76][76]scala.AnyRef {
+ [76]def <init>(): [20]A[T] = [76]{
+ [76][76][76]A.super.<init>();
+ [20]()
+ };
+ [24:51]private[this] val foo: [28]Set[_ <: T] = [47:51]null;
+ [28]<stable> <accessor> def foo: [28]Set[_ <: T] = [28][28]A.this.foo;
+ [54:74]<stable> <accessor> def bar: [58]Set[_ <: T]
+ }
+}
+
diff --git a/test/files/run/existential-rangepos.scala b/test/files/run/existential-rangepos.scala
new file mode 100644
index 0000000000..7d2b0810d3
--- /dev/null
+++ b/test/files/run/existential-rangepos.scala
@@ -0,0 +1,13 @@
+import scala.tools.partest._
+
+object Test extends DirectTest {
+ override def extraSettings: String = "-usejavacp -Yrangepos -Xprint:patmat -Xprint-pos -d " + testOutput.path
+
+ override def code = """
+abstract class A[T] {
+ val foo: Set[_ <: T] = null
+ val bar: Set[_ <: T]
+}""".trim
+
+ override def show(): Unit = Console.withErr(System.out)(compile())
+}