diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-09-09 04:28:43 -0700 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-09-09 04:28:43 -0700 |
commit | f342445f68654c1606871b5d7372621558731f65 (patch) | |
tree | 59dbd86e647e678b15f1f57da39baa5a4e93c38d /test | |
parent | e3968a5a40b09218990f2f7bc3e449d68cd2cf02 (diff) | |
parent | c58b7b10249adefa1045942a1dc7a55dc5932db8 (diff) | |
download | scala-f342445f68654c1606871b5d7372621558731f65.tar.gz scala-f342445f68654c1606871b5d7372621558731f65.tar.bz2 scala-f342445f68654c1606871b5d7372621558731f65.zip |
Merge pull request #2907 from paulp/pr/typetree-original-rangepos
Eliminate TypeTrees with null original.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/classmanifests_new_deprecations.check | 8 | ||||
-rw-r--r-- | test/files/neg/t935.check | 5 | ||||
-rw-r--r-- | test/files/run/existential-rangepos.check | 13 | ||||
-rw-r--r-- | test/files/run/existential-rangepos.scala | 13 |
4 files changed, 28 insertions, 11 deletions
diff --git a/test/files/neg/classmanifests_new_deprecations.check b/test/files/neg/classmanifests_new_deprecations.check index 5f9d0a1ccc..fd1e2728c3 100644 --- a/test/files/neg/classmanifests_new_deprecations.check +++ b/test/files/neg/classmanifests_new_deprecations.check @@ -7,9 +7,6 @@ classmanifests_new_deprecations.scala:3: warning: type ClassManifest in object P classmanifests_new_deprecations.scala:4: warning: type ClassManifest in object Predef is deprecated: Use `scala.reflect.ClassTag` instead val cm3: ClassManifest[Int] = null ^ -classmanifests_new_deprecations.scala:4: warning: type ClassManifest in object Predef is deprecated: Use `scala.reflect.ClassTag` instead - val cm3: ClassManifest[Int] = null - ^ classmanifests_new_deprecations.scala:6: warning: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead def rcm1[T: scala.reflect.ClassManifest] = ??? ^ @@ -19,9 +16,6 @@ classmanifests_new_deprecations.scala:7: warning: type ClassManifest in package classmanifests_new_deprecations.scala:8: warning: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead val rcm3: scala.reflect.ClassManifest[Int] = null ^ -classmanifests_new_deprecations.scala:8: warning: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead - val rcm3: scala.reflect.ClassManifest[Int] = null - ^ classmanifests_new_deprecations.scala:10: warning: type ClassManifest in object Predef is deprecated: Use `scala.reflect.ClassTag` instead type CM[T] = ClassManifest[T] ^ @@ -29,5 +23,5 @@ classmanifests_new_deprecations.scala:15: warning: type ClassManifest in package type RCM[T] = scala.reflect.ClassManifest[T] ^ error: No warnings can be incurred under -Xfatal-warnings. -10 warnings found +8 warnings found one error found diff --git a/test/files/neg/t935.check b/test/files/neg/t935.check index 8b73700187..af634a2630 100644 --- a/test/files/neg/t935.check +++ b/test/files/neg/t935.check @@ -4,7 +4,4 @@ t935.scala:7: error: type arguments [Test3.B] do not conform to class E's type p t935.scala:13: error: type arguments [Test4.B] do not conform to class E's type parameter bounds [T <: String] val b: String @E[B](new B) = "hi" ^ -t935.scala:13: error: type arguments [Test4.B] do not conform to class E's type parameter bounds [T <: String] - val b: String @E[B](new B) = "hi" - ^ -three errors found +two errors found 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()) +} |