diff options
Diffstat (limited to 'test/files')
22 files changed, 124 insertions, 76 deletions
diff --git a/test/files/neg/t6323a.check b/test/files/neg/t6323a.check index 261a60ef3c..c4e92d93f0 100644 --- a/test/files/neg/t6323a.check +++ b/test/files/neg/t6323a.check @@ -1,10 +1,10 @@ -t6323a.scala:10: materializing requested scala.reflect.type.ClassTag[Test] using `package`.this.materializeClassTag[Test]() +t6323a.scala:10: materializing requested scala.reflect.type.ClassTag[Test] using scala.reflect.`package`.materializeClassTag[Test]() val lookAtMe = m.reflect(Test("a",List(5))) ^ -t6323a.scala:11: materializing requested reflect.runtime.universe.type.TypeTag[Test] using `package`.this.materializeTypeTag[Test](scala.reflect.runtime.`package`.universe) +t6323a.scala:11: materializing requested reflect.runtime.universe.type.TypeTag[Test] using scala.reflect.api.`package`.materializeTypeTag[Test](scala.reflect.runtime.`package`.universe) val value = u.typeOf[Test] ^ -t6323a.scala:11: `package`.this.materializeTypeTag[Test](scala.reflect.runtime.`package`.universe) is not a valid implicit value for reflect.runtime.universe.TypeTag[Test] because: +t6323a.scala:11: scala.reflect.api.`package`.materializeTypeTag[Test](scala.reflect.runtime.`package`.universe) is not a valid implicit value for reflect.runtime.universe.TypeTag[Test] because: failed to typecheck the materialized tag: cannot create a TypeTag referring to class Test.Test local to the reifee: use WeakTypeTag instead val value = u.typeOf[Test] diff --git a/test/files/pos/t9479.scala b/test/files/pos/t9479.scala new file mode 100644 index 0000000000..38eabf4338 --- /dev/null +++ b/test/files/pos/t9479.scala @@ -0,0 +1,15 @@ +trait Predefs { + def bridge(p: String): Unit = ??? + def bridge(p: Any): Unit = ??? +} + +package object molecule extends Predefs + +package molecule { + package process { + class Test { + def main(): Unit = bridge(null, null) + } + } +} + diff --git a/test/files/pos/t9479b.scala b/test/files/pos/t9479b.scala new file mode 100644 index 0000000000..5fc795a1fd --- /dev/null +++ b/test/files/pos/t9479b.scala @@ -0,0 +1,15 @@ +trait Predefs { + def bridge(p: String): Unit = ??? + def bridge(p: Any): Unit = ??? +} + +package object molecule extends Predefs + +package molecule { + package process { + class Test { + def main(): Unit = molecule.bridge(null, null) + } + } +} + diff --git a/test/files/presentation/random.check b/test/files/presentation/random.check index fb3500aeea..1e40e178be 100644 --- a/test/files/presentation/random.check +++ b/test/files/presentation/random.check @@ -4,7 +4,7 @@ askType at Random.scala(18,14) ================================================================================ [response] askTypeAt (18,14) val filter: Int => Boolean = try { - java.this.lang.Integer.parseInt(args.apply(0)) match { + java.lang.Integer.parseInt(args.apply(0)) match { case 1 => ((x: Int) => x.%(2).!=(0)) case 2 => ((x: Int) => x.%(2).==(0)) case _ => ((x: Int) => x.!=(0)) diff --git a/test/files/presentation/t8941.check b/test/files/presentation/t8941.check index 341804903a..4285eebd8f 100644 --- a/test/files/presentation/t8941.check +++ b/test/files/presentation/t8941.check @@ -3,5 +3,5 @@ reload: Source.scala askType at Source.scala(6,7) ================================================================================ [response] askTypeAt (6,7) -scala.this.Predef.??? +scala.Predef.??? ================================================================================ diff --git a/test/files/run/delambdafy_t6028.check b/test/files/run/delambdafy_t6028.check index 9ff1d0e78e..885fc3c9f3 100644 --- a/test/files/run/delambdafy_t6028.check +++ b/test/files/run/delambdafy_t6028.check @@ -46,7 +46,7 @@ package <empty> { def /*MethodLocalTrait$1$class*/$init$(barParam$1: String): Unit = { () }; - scala.this.Predef.print(barParam$1) + scala.Predef.print(barParam$1) }; final <artifact> private[this] def $anonfun$2(tryyParam$1: String, tryyLocal$1: runtime.ObjectRef): Unit = try { tryyLocal$1.elem = tryyParam$1 diff --git a/test/files/run/idempotency-case-classes.check b/test/files/run/idempotency-case-classes.check index ea698cec59..38c2fb9326 100644 --- a/test/files/run/idempotency-case-classes.check +++ b/test/files/run/idempotency-case-classes.check @@ -20,15 +20,15 @@ C(2,3) case 1 => C.this.y case _ => throw new IndexOutOfBoundsException(x$1.toString()) }; - override <synthetic> def productIterator: Iterator[Any] = runtime.this.ScalaRunTime.typedProductIterator[Any](C.this); + override <synthetic> def productIterator: Iterator[Any] = scala.runtime.ScalaRunTime.typedProductIterator[Any](C.this); <synthetic> def canEqual(x$1: Any): Boolean = x$1.$isInstanceOf[C](); override <synthetic> def hashCode(): Int = { <synthetic> var acc: Int = -889275714; - acc = Statics.this.mix(acc, x); - acc = Statics.this.mix(acc, y); - Statics.this.finalizeHash(acc, 2) + acc = scala.runtime.Statics.mix(acc, x); + acc = scala.runtime.Statics.mix(acc, y); + scala.runtime.Statics.finalizeHash(acc, 2) }; - override <synthetic> def toString(): String = ScalaRunTime.this._toString(C.this); + override <synthetic> def toString(): String = scala.runtime.ScalaRunTime._toString(C.this); override <synthetic> def equals(x$1: Any): Boolean = C.this.eq(x$1.asInstanceOf[Object]).||(x$1 match { case (_: C) => true case _ => false @@ -45,7 +45,7 @@ C(2,3) final override <synthetic> def toString(): String = "C"; case <synthetic> def apply(x: Int, y: Int): C = new C(x, y); case <synthetic> def unapply(x$0: C): Option[(Int, Int)] = if (x$0.==(null)) - scala.this.None + scala.None else Some.apply[(Int, Int)](scala.Tuple2.apply[Int, Int](x$0.x, x$0.y)) }; diff --git a/test/files/run/macro-typecheck-implicitsdisabled.check b/test/files/run/macro-typecheck-implicitsdisabled.check index 91d8fabd72..07404cf3fb 100644 --- a/test/files/run/macro-typecheck-implicitsdisabled.check +++ b/test/files/run/macro-typecheck-implicitsdisabled.check @@ -1,2 +1,2 @@ -scala.this.Predef.ArrowAssoc[Int](1).->[Int](2) +scala.Predef.ArrowAssoc[Int](1).->[Int](2) scala.reflect.macros.TypecheckException: value -> is not a member of Int diff --git a/test/files/run/macroPlugins-enterStats.check b/test/files/run/macroPlugins-enterStats.check index 133b1ae1af..182d54ca34 100644 --- a/test/files/run/macroPlugins-enterStats.check +++ b/test/files/run/macroPlugins-enterStats.check @@ -6,13 +6,13 @@ package <empty> { () }; def x: Int = 2; - def xmacroPlugin1: Nothing = scala.this.Predef.???; - def xmacroPlugin2: Nothing = scala.this.Predef.???; - def xmacroPlugin2macroPlugin1: Nothing = scala.this.Predef.???; + def xmacroPlugin1: Nothing = scala.Predef.???; + def xmacroPlugin2: Nothing = scala.Predef.???; + def xmacroPlugin2macroPlugin1: Nothing = scala.Predef.???; def y: Int = 3; - def ymacroPlugin1: Nothing = scala.this.Predef.???; - def ymacroPlugin2: Nothing = scala.this.Predef.???; - def ymacroPlugin2macroPlugin1: Nothing = scala.this.Predef.??? + def ymacroPlugin1: Nothing = scala.Predef.???; + def ymacroPlugin2: Nothing = scala.Predef.???; + def ymacroPlugin2macroPlugin1: Nothing = scala.Predef.??? } } diff --git a/test/files/run/macroPlugins-namerHooks.check b/test/files/run/macroPlugins-namerHooks.check index 56b170cbd9..4409f196f0 100644 --- a/test/files/run/macroPlugins-namerHooks.check +++ b/test/files/run/macroPlugins-namerHooks.check @@ -1,7 +1,7 @@ enterSym(package <empty> { case class C extends scala.Product with scala.Serializable { <caseaccessor> <paramaccessor> val x: Int = _; <caseaccessor> <paramaccessor> val y: Int = _; def <init>(x: Int, y: Int) = { super.<init>(); () } } }) enterSym(case class C extends scala.Product with scala.Serializable { <caseaccessor> <paramaccessor> val x: Int = _; <caseaccessor> <paramaccessor> val y: Int = _; def <init>(x: Int, y: Int) = { super.<init>(); () } }) ensureCompanionObject(case class C extends scala.Product with scala.Serializable { <caseaccessor> <paramaccessor> val x: Int = _; <caseaccessor> <paramaccessor> val y: Int = _; def <init>(x: Int, y: Int) = { super.<init>(); () } }, ...) -enterSym(<synthetic> object C extends runtime.this.AbstractFunction2[Int, Int, C] { def <init>() = { super.<init>(); () }; final override <synthetic> def toString() = "C" }) +enterSym(<synthetic> object C extends scala.runtime.AbstractFunction2[Int, Int, C] { def <init>() = { super.<init>(); () }; final override <synthetic> def toString() = "C" }) enterStat(case class C extends scala.Product with scala.Serializable { <caseaccessor> <paramaccessor> val x: Int = _; <caseaccessor> <paramaccessor> val y: Int = _; def <init>(x: Int, y: Int) = { super.<init>(); () } }) enterSym(<caseaccessor> <paramaccessor> val x: Int = _) enterSym(<caseaccessor> <paramaccessor> val y: Int = _) @@ -18,17 +18,17 @@ enterStat(super.<init>()) enterSym(<synthetic> def copy$default$1 = x) enterSym(<synthetic> def copy$default$2 = y) enterSym(<synthetic> var acc: Int = -889275714) -enterSym(acc = Statics.this.mix(acc, x)) -enterSym(acc = Statics.this.mix(acc, y)) +enterSym(acc = scala.runtime.Statics.mix(acc, x)) +enterSym(acc = scala.runtime.Statics.mix(acc, y)) enterStat(<synthetic> var acc: Int = -889275714) -enterStat(acc = Statics.this.mix(acc, x)) -enterStat(acc = Statics.this.mix(acc, y)) +enterStat(acc = scala.runtime.Statics.mix(acc, x)) +enterStat(acc = scala.runtime.Statics.mix(acc, y)) enterSym(<synthetic> val C$1: C = x$1.asInstanceOf[C]) enterStat(<synthetic> val C$1: C = x$1.asInstanceOf[C]) enterSym(def <init>() = { super.<init>(); () }) enterSym(final override <synthetic> def toString() = "C") enterSym(case <synthetic> def apply(x: Int, y: Int): C = new C(x, y)) -enterSym(case <synthetic> def unapply(x$0: C): _root_.scala.Option[scala.Tuple2[Int, Int]] = if (x$0.==(null)) scala.this.None else Some(scala.Tuple2(x$0.x, x$0.y))) +enterSym(case <synthetic> def unapply(x$0: C): _root_.scala.Option[scala.Tuple2[Int, Int]] = if (x$0.==(null)) scala.None else Some(scala.Tuple2(x$0.x, x$0.y))) enterStat(def <init>() = { super.<init>(); () }) enterStat(final override <synthetic> def toString() = "C") enterSym(def <init>() = { super.<init>(); () }) diff --git a/test/files/run/reflection-fieldmirror-ctorparam.check b/test/files/run/reflection-fieldmirror-ctorparam.check index e391e7ccfe..c66be94ed7 100644 --- a/test/files/run/reflection-fieldmirror-ctorparam.check +++ b/test/files/run/reflection-fieldmirror-ctorparam.check @@ -1,3 +1,3 @@ -class scala.ScalaReflectionException: Scala field x isn't represented as a Java field, neither it has a Java accessor method -note that private parameters of class constructors don't get mapped onto fields and/or accessors, -unless they are used outside of their declaring constructors. +class scala.ScalaReflectionException: Scala field x of class A isn't represented as a Java field, nor does it have a +Java accessor method. One common reason for this is that it may be a private class parameter +not used outside the primary constructor. diff --git a/test/files/run/reflection-scala-annotations.check b/test/files/run/reflection-scala-annotations.check index 5bc2786161..44062d8c4a 100644 --- a/test/files/run/reflection-scala-annotations.check +++ b/test/files/run/reflection-scala-annotations.check @@ -3,5 +3,5 @@ make your annotation visible at runtime. If that is what you want, you must write the annotation class in Java. class jann(x: Int, y: Array[Int]) extends ClassfileAnnotation ^ -new sann(1, immutable.this.List.apply[Int](1, 2)) +new sann(1, scala.collection.immutable.List.apply[Int](1, 2)) new jann(y = Array(1, 2), x = 2) diff --git a/test/files/run/reify-aliases.check b/test/files/run/reify-aliases.check index da784227af..b6b5fb71b2 100644 --- a/test/files/run/reify-aliases.check +++ b/test/files/run/reify-aliases.check @@ -1 +1 @@ -TypeRef(SingleType(ThisType(scala), scala.Predef), TypeName("String"), List()) +TypeRef(SingleType(TypeRef(ThisType(<root>), scala, List()), scala.Predef), TypeName("String"), List()) diff --git a/test/files/run/t5064.check b/test/files/run/t5064.check index 61ccfd16e7..f7d25a67e4 100644 --- a/test/files/run/t5064.check +++ b/test/files/run/t5064.check @@ -1,25 +1,26 @@ [53] T5064.super.<init>() [53] T5064.super.<init> [53] this -[16:23] immutable.this.List.apply(scala.this.Predef.wrapIntArray(Array[Int]{1})) -[16:20] immutable.this.List.apply -<16:20> immutable.this.List -<16:20> immutable.this -[16:23] scala.this.Predef.wrapIntArray(Array[Int]{1}) -[20] scala.this.Predef.wrapIntArray -[20] scala.this.Predef -[20] scala.this -[26:32] collection.this.Seq.apply(scala.this.Predef.wrapIntArray(Array[Int]{1})) -[26:29] collection.this.Seq.apply -<26:29> collection.this.Seq -<26:29> collection.this -[26:32] scala.this.Predef.wrapIntArray(Array[Int]{1}) -[29] scala.this.Predef.wrapIntArray -[29] scala.this.Predef -[29] scala.this -[35:39] immutable.this.List -<35:39> immutable.this -[42:45] collection.this.Seq -<42:45> collection.this -[48:51] immutable.this.Nil -<48:51> immutable.this +[16:23] scala.collection.immutable.List.apply(scala.Predef.wrapIntArray(Array[Int]{1})) +[16:20] scala.collection.immutable.List.apply +<16:20> scala.collection.immutable.List +<16:20> scala.collection.immutable +<16:20> scala.collection +[16:23] scala.Predef.wrapIntArray(Array[Int]{1}) +[20] scala.Predef.wrapIntArray +[20] scala.Predef +[26:32] scala.collection.Seq.apply(scala.Predef.wrapIntArray(Array[Int]{1})) +[26:29] scala.collection.Seq.apply +<26:29> scala.collection.Seq +<26:29> scala.collection +[26:32] scala.Predef.wrapIntArray(Array[Int]{1}) +[29] scala.Predef.wrapIntArray +[29] scala.Predef +[35:39] scala.collection.immutable.List +<35:39> scala.collection.immutable +<35:39> scala.collection +[42:45] scala.collection.Seq +<42:45> scala.collection +[48:51] scala.collection.immutable.Nil +<48:51> scala.collection.immutable +<48:51> scala.collection diff --git a/test/files/run/t5943a1.check b/test/files/run/t5943a1.check index 9f4d160af8..4b683a3da5 100644 --- a/test/files/run/t5943a1.check +++ b/test/files/run/t5943a1.check @@ -1 +1 @@ -scala.this.Predef.intWrapper(1).to(3).map[Int, scala.collection.immutable.IndexedSeq[Int]](((x$1: Int) => x$1.+(1)))(immutable.this.IndexedSeq.canBuildFrom[Int]) +scala.Predef.intWrapper(1).to(3).map[Int, scala.collection.immutable.IndexedSeq[Int]](((x$1: Int) => x$1.+(1)))(immutable.this.IndexedSeq.canBuildFrom[Int]) diff --git a/test/files/run/t6028.check b/test/files/run/t6028.check index edc8b22d6d..a768f32976 100644 --- a/test/files/run/t6028.check +++ b/test/files/run/t6028.check @@ -58,7 +58,7 @@ package <empty> { def /*MethodLocalTrait$1$class*/$init$(barParam$1: Int): Unit = { () }; - scala.this.Predef.print(scala.Int.box(barParam$1)) + scala.Predef.print(scala.Int.box(barParam$1)) }; @SerialVersionUID(value = 0) final <synthetic> class $anonfun$tryy$1 extends scala.runtime.AbstractFunction0$mcV$sp with Serializable { def <init>($outer: T, tryyParam$1: Int, tryyLocal$1: runtime.IntRef): <$anon: Function0> = { diff --git a/test/files/run/t6331b.check b/test/files/run/t6331b.check index 6ca09e3814..565348ce3f 100644 --- a/test/files/run/t6331b.check +++ b/test/files/run/t6331b.check @@ -10,19 +10,19 @@ else -0.0 res: Double = 0.0 -trace> Test.this.intercept.apply[Any](if (scala.this.Predef.???) +trace> Test.this.intercept.apply[Any](if (scala.Predef.???) -0.0 else 0.0) res: Any = class scala.NotImplementedError -trace> Test.this.intercept.apply[Any](if (scala.this.Predef.???) +trace> Test.this.intercept.apply[Any](if (scala.Predef.???) 0.0 else 0.0) res: Any = class scala.NotImplementedError -trace> Test.this.intercept.apply[Any](if (scala.this.Predef.???) +trace> Test.this.intercept.apply[Any](if (scala.Predef.???) () else ()) diff --git a/test/files/run/t7375b.check b/test/files/run/t7375b.check index d7578e28ba..0993cceca2 100644 --- a/test/files/run/t7375b.check +++ b/test/files/run/t7375b.check @@ -1,4 +1,4 @@ -Predef.this.classOf[C1] -Predef.this.classOf[C2] -Predef.this.classOf[C1] -Predef.this.classOf[C2] +scala.Predef.classOf[C1] +scala.Predef.classOf[C2] +scala.Predef.classOf[C1] +scala.Predef.classOf[C2] diff --git a/test/files/run/t7817-tree-gen.check b/test/files/run/t7817-tree-gen.check index 4ed4b0d94a..69ad2b2f28 100644 --- a/test/files/run/t7817-tree-gen.check +++ b/test/files/run/t7817-tree-gen.check @@ -38,13 +38,13 @@ Joint Compilation: mixin [ test2.PO] - test2.package$PO cleanup [ test2.PO] - test2.package$PO - typer [ test2.bar] - `package`.this.bar - pickler [ test2.bar] - `package`.this.bar - refchecks [ test2.bar] - `package`.this.bar - uncurry [ test2.bar] - `package`.this.bar - specialize [ test2.bar] - `package`.this.bar - explicitouter [ test2.bar] - `package`.this.bar - erasure [ test2.bar] - `package`.this.bar + typer [ test2.bar] - test2.`package`.bar + pickler [ test2.bar] - test2.`package`.bar + refchecks [ test2.bar] - test2.`package`.bar + uncurry [ test2.bar] - test2.`package`.bar + specialize [ test2.bar] - test2.`package`.bar + explicitouter [ test2.bar] - test2.`package`.bar + erasure [ test2.bar] - test2.`package`.bar posterasure [ test2.bar] - test2.`package`.bar flatten [ test2.bar] - test2.`package`.bar mixin [ test2.bar] - test2.`package`.bar @@ -90,13 +90,13 @@ Separate Compilation: mixin [ PO] - test2.package$PO cleanup [ PO] - test2.package$PO - typer [testSep2.bar] - `package`.this.bar - pickler [testSep2.bar] - `package`.this.bar - refchecks [testSep2.bar] - `package`.this.bar - uncurry [testSep2.bar] - `package`.this.bar - specialize [testSep2.bar] - `package`.this.bar - explicitouter [testSep2.bar] - `package`.this.bar - erasure [testSep2.bar] - `package`.this.bar + typer [testSep2.bar] - test2.`package`.bar + pickler [testSep2.bar] - test2.`package`.bar + refchecks [testSep2.bar] - test2.`package`.bar + uncurry [testSep2.bar] - test2.`package`.bar + specialize [testSep2.bar] - test2.`package`.bar + explicitouter [testSep2.bar] - test2.`package`.bar + erasure [testSep2.bar] - test2.`package`.bar posterasure [testSep2.bar] - test2.`package`.bar flatten [testSep2.bar] - test2.`package`.bar mixin [testSep2.bar] - test2.`package`.bar diff --git a/test/files/run/trait-default-specialize.check b/test/files/run/trait-default-specialize.check new file mode 100644 index 0000000000..1034d1c703 --- /dev/null +++ b/test/files/run/trait-default-specialize.check @@ -0,0 +1,3 @@ +public abstract void T.t(java.lang.Object) +0 +0 diff --git a/test/files/run/trait-default-specialize.scala b/test/files/run/trait-default-specialize.scala new file mode 100644 index 0000000000..6faa9d5f47 --- /dev/null +++ b/test/files/run/trait-default-specialize.scala @@ -0,0 +1,14 @@ +trait T[@specialized(Int) A] { + def t(a: A): Unit +} + +object Test { + def main(args: Array[String]): Unit = { + class TInt extends T[Int] { def t(a : Int) = println(a) } + val tMethods = classOf[TInt].getInterfaces.head.getMethods.filter(_.getName == "t") + println(tMethods.map(_.toString).sorted.mkString("\n")) + new TInt().t(0) + def call[A](t: T[A], a: A) = t.t(a) + call[Int](new TInt(), 0) + } +} diff --git a/test/files/scalacheck/quasiquotes/TypecheckedProps.scala b/test/files/scalacheck/quasiquotes/TypecheckedProps.scala index f84df269ca..2c4d81f333 100644 --- a/test/files/scalacheck/quasiquotes/TypecheckedProps.scala +++ b/test/files/scalacheck/quasiquotes/TypecheckedProps.scala @@ -167,7 +167,7 @@ trait TypecheckedTypes { self: QuasiquoteProperties => property("applied type") = test { val tt = typecheckTyp(tq"Map[Int, Int]") val tq"$tpt[..$tpts]" = tt - val tq"scala.this.Predef.Map" = tpt + val tq"scala.Predef.Map" = tpt val List(tq"scala.Int", tq"scala.Int") = tpts } |