From 5acac4d806eb45afdf1e7716c727a97130b69651 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Thu, 7 Jun 2012 22:05:34 +0200 Subject: TypeTag => AbsTypeTag, ConcreteTypeTag => TypeTag This protects everyone from the confusion caused by stuff like this: https://issues.scala-lang.org/browse/SI-5884 --- test/files/jvm/manifests-new.check | 70 +++++++++++----------- test/files/jvm/manifests-new.scala | 6 +- ...interop_abstypetags_arenot_classmanifests.check | 4 ++ ...interop_abstypetags_arenot_classmanifests.scala | 11 ++++ .../neg/interop_abstypetags_arenot_classtags.check | 4 ++ .../neg/interop_abstypetags_arenot_classtags.scala | 12 ++++ .../neg/interop_abstypetags_arenot_manifests.check | 4 ++ .../neg/interop_abstypetags_arenot_manifests.scala | 11 ++++ ...op_classmanifests_arenot_concretetypetags.check | 4 -- ...op_classmanifests_arenot_concretetypetags.scala | 11 ---- .../interop_classmanifests_arenot_typetags.check | 4 ++ .../interop_classmanifests_arenot_typetags.scala | 11 ++++ ...op_concretetypetags_arenot_classmanifests.check | 4 -- ...op_concretetypetags_arenot_classmanifests.scala | 11 ---- ...interop_concretetypetags_arenot_classtags.check | 4 -- ...interop_concretetypetags_arenot_classtags.scala | 12 ---- ...petags_without_classtags_arenot_manifests.check | 6 -- ...petags_without_classtags_arenot_manifests.scala | 12 ---- .../neg/interop_typetags_arenot_manifests.check | 4 -- .../neg/interop_typetags_arenot_manifests.scala | 11 ---- ...petags_without_classtags_arenot_manifests.check | 6 ++ ...petags_without_classtags_arenot_manifests.scala | 12 ++++ ...o-reify-groundtypetag-hktypeparams-notags.check | 7 --- .../Test.scala | 9 --- ...cro-reify-groundtypetag-typeparams-notags.check | 7 --- .../Test.scala | 9 --- .../neg/macro-reify-groundtypetag-usetypetag.check | 7 --- .../Test.scala | 9 --- .../macro-reify-typetag-hktypeparams-notags.check | 7 +++ .../Test.scala | 9 +++ .../macro-reify-typetag-typeparams-notags.check | 7 +++ .../Test.scala | 9 +++ .../neg/macro-reify-typetag-useabstypetag.check | 7 +++ .../macro-reify-typetag-useabstypetag/Test.scala | 9 +++ test/files/neg/t3692-old.check | 2 +- test/files/pos/implicits-new.scala | 2 +- test/files/run/abstypetags_core.check | 28 +++++++++ test/files/run/abstypetags_core.scala | 32 ++++++++++ test/files/run/concretetypetags_core.check | 28 ++++----- test/files/run/concretetypetags_core.scala | 56 ++++++++--------- test/files/run/concretetypetags_multi.check | 10 ++-- test/files/run/concretetypetags_multi.scala | 10 ++-- test/files/run/existentials3-new.scala | 4 +- .../interop_classmanifests_arenot_typetags.check | 3 - .../interop_classmanifests_arenot_typetags.scala | 11 ---- .../interop_concretetypetags_are_manifests.check | 3 - .../interop_concretetypetags_are_manifests.scala | 12 ---- .../run/interop_manifests_are_abstypetags.check | 3 + .../run/interop_manifests_are_abstypetags.scala | 11 ++++ .../interop_manifests_are_concretetypetags.check | 3 - .../interop_manifests_are_concretetypetags.scala | 11 ---- .../files/run/interop_typetags_are_manifests.check | 3 + .../files/run/interop_typetags_are_manifests.scala | 12 ++++ test/files/run/macro-expand-nullary-generic.check | 10 ++-- test/files/run/macro-expand-tparams-explicit.check | 2 +- test/files/run/macro-expand-tparams-implicit.check | 4 +- test/files/run/macro-expand-tparams-prefix-a.check | 8 +-- test/files/run/macro-expand-tparams-prefix-b.check | 4 +- .../files/run/macro-expand-tparams-prefix-c1.check | 6 +- .../files/run/macro-expand-tparams-prefix-c2.check | 6 +- .../files/run/macro-expand-tparams-prefix-d1.check | 6 +- .../macro-expand-tparams-prefix-d1/Impls_1.scala | 4 +- .../run/macro-reify-abstypetag-notypeparams.check | 2 + .../macro-reify-abstypetag-notypeparams/Test.scala | 6 ++ .../macro-reify-abstypetag-typeparams-notags.check | 2 + .../Test.scala | 9 +++ .../macro-reify-abstypetag-typeparams-tags.check | 2 + .../Test.scala | 9 +++ .../run/macro-reify-abstypetag-usetypetag.check | 2 + .../macro-reify-abstypetag-usetypetag/Test.scala | 9 +++ .../macro-reify-groundtypetag-notypeparams.check | 2 - .../Test.scala | 6 -- ...macro-reify-groundtypetag-typeparams-tags.check | 2 - .../Test.scala | 9 --- .../run/macro-reify-typetag-notypeparams.check | 4 +- .../macro-reify-typetag-typeparams-notags.check | 2 - .../Test.scala | 9 --- .../run/macro-reify-typetag-typeparams-tags.check | 2 +- .../run/macro-reify-typetag-usegroundtypetag.check | 2 - .../Test.scala | 9 --- test/files/run/macro-undetparams-consfromsls.check | 6 +- .../Impls_Macros_1.scala | 8 +-- test/files/run/macro-undetparams-implicitval.check | 2 +- test/files/run/macro-undetparams-macroitself.check | 4 +- test/files/run/newTags.check | 2 +- test/files/run/reify_newimpl_25.check | 2 +- test/files/run/reify_newimpl_26.check | 6 +- test/files/run/reify_newimpl_26.scala | 2 +- test/files/run/typetags_core.check | 28 --------- test/files/run/typetags_core.scala | 32 ---------- test/files/run/typetags_multi.check | 5 -- test/files/run/typetags_multi.scala | 9 --- ...and-implicit-macro-defeats-type-inference.check | 4 +- .../Test.scala | 6 +- 94 files changed, 400 insertions(+), 428 deletions(-) create mode 100644 test/files/neg/interop_abstypetags_arenot_classmanifests.check create mode 100644 test/files/neg/interop_abstypetags_arenot_classmanifests.scala create mode 100644 test/files/neg/interop_abstypetags_arenot_classtags.check create mode 100644 test/files/neg/interop_abstypetags_arenot_classtags.scala create mode 100644 test/files/neg/interop_abstypetags_arenot_manifests.check create mode 100644 test/files/neg/interop_abstypetags_arenot_manifests.scala delete mode 100644 test/files/neg/interop_classmanifests_arenot_concretetypetags.check delete mode 100644 test/files/neg/interop_classmanifests_arenot_concretetypetags.scala create mode 100644 test/files/neg/interop_classmanifests_arenot_typetags.check create mode 100644 test/files/neg/interop_classmanifests_arenot_typetags.scala delete mode 100644 test/files/neg/interop_concretetypetags_arenot_classmanifests.check delete mode 100644 test/files/neg/interop_concretetypetags_arenot_classmanifests.scala delete mode 100644 test/files/neg/interop_concretetypetags_arenot_classtags.check delete mode 100644 test/files/neg/interop_concretetypetags_arenot_classtags.scala delete mode 100644 test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.check delete mode 100644 test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.scala delete mode 100644 test/files/neg/interop_typetags_arenot_manifests.check delete mode 100644 test/files/neg/interop_typetags_arenot_manifests.scala create mode 100644 test/files/neg/interop_typetags_without_classtags_arenot_manifests.check create mode 100644 test/files/neg/interop_typetags_without_classtags_arenot_manifests.scala delete mode 100644 test/files/neg/macro-reify-groundtypetag-hktypeparams-notags.check delete mode 100644 test/files/neg/macro-reify-groundtypetag-hktypeparams-notags/Test.scala delete mode 100644 test/files/neg/macro-reify-groundtypetag-typeparams-notags.check delete mode 100644 test/files/neg/macro-reify-groundtypetag-typeparams-notags/Test.scala delete mode 100644 test/files/neg/macro-reify-groundtypetag-usetypetag.check delete mode 100644 test/files/neg/macro-reify-groundtypetag-usetypetag/Test.scala create mode 100644 test/files/neg/macro-reify-typetag-hktypeparams-notags.check create mode 100644 test/files/neg/macro-reify-typetag-hktypeparams-notags/Test.scala create mode 100644 test/files/neg/macro-reify-typetag-typeparams-notags.check create mode 100644 test/files/neg/macro-reify-typetag-typeparams-notags/Test.scala create mode 100644 test/files/neg/macro-reify-typetag-useabstypetag.check create mode 100644 test/files/neg/macro-reify-typetag-useabstypetag/Test.scala create mode 100644 test/files/run/abstypetags_core.check create mode 100644 test/files/run/abstypetags_core.scala delete mode 100644 test/files/run/interop_classmanifests_arenot_typetags.check delete mode 100644 test/files/run/interop_classmanifests_arenot_typetags.scala delete mode 100644 test/files/run/interop_concretetypetags_are_manifests.check delete mode 100644 test/files/run/interop_concretetypetags_are_manifests.scala create mode 100644 test/files/run/interop_manifests_are_abstypetags.check create mode 100644 test/files/run/interop_manifests_are_abstypetags.scala delete mode 100644 test/files/run/interop_manifests_are_concretetypetags.check delete mode 100644 test/files/run/interop_manifests_are_concretetypetags.scala create mode 100644 test/files/run/interop_typetags_are_manifests.check create mode 100644 test/files/run/interop_typetags_are_manifests.scala create mode 100644 test/files/run/macro-reify-abstypetag-notypeparams.check create mode 100644 test/files/run/macro-reify-abstypetag-notypeparams/Test.scala create mode 100644 test/files/run/macro-reify-abstypetag-typeparams-notags.check create mode 100644 test/files/run/macro-reify-abstypetag-typeparams-notags/Test.scala create mode 100644 test/files/run/macro-reify-abstypetag-typeparams-tags.check create mode 100644 test/files/run/macro-reify-abstypetag-typeparams-tags/Test.scala create mode 100644 test/files/run/macro-reify-abstypetag-usetypetag.check create mode 100644 test/files/run/macro-reify-abstypetag-usetypetag/Test.scala delete mode 100644 test/files/run/macro-reify-groundtypetag-notypeparams.check delete mode 100644 test/files/run/macro-reify-groundtypetag-notypeparams/Test.scala delete mode 100644 test/files/run/macro-reify-groundtypetag-typeparams-tags.check delete mode 100644 test/files/run/macro-reify-groundtypetag-typeparams-tags/Test.scala delete mode 100644 test/files/run/macro-reify-typetag-typeparams-notags.check delete mode 100644 test/files/run/macro-reify-typetag-typeparams-notags/Test.scala delete mode 100644 test/files/run/macro-reify-typetag-usegroundtypetag.check delete mode 100644 test/files/run/macro-reify-typetag-usegroundtypetag/Test.scala delete mode 100644 test/files/run/typetags_core.check delete mode 100644 test/files/run/typetags_core.scala delete mode 100644 test/files/run/typetags_multi.check delete mode 100644 test/files/run/typetags_multi.scala (limited to 'test') diff --git a/test/files/jvm/manifests-new.check b/test/files/jvm/manifests-new.check index 43e24fb73c..9ff49ef8b4 100644 --- a/test/files/jvm/manifests-new.check +++ b/test/files/jvm/manifests-new.check @@ -1,38 +1,38 @@ -x=(), t=ConcreteTypeTag[Unit], k=TypeRef, s=class Unit -x=true, t=ConcreteTypeTag[Boolean], k=TypeRef, s=class Boolean -x=a, t=ConcreteTypeTag[Char], k=TypeRef, s=class Char -x=1, t=ConcreteTypeTag[Int], k=TypeRef, s=class Int -x=abc, t=ConcreteTypeTag[java.lang.String], k=TypeRef, s=class String -x='abc, t=ConcreteTypeTag[Symbol], k=TypeRef, s=class Symbol - -x=List(()), t=ConcreteTypeTag[List[Unit]], k=TypeRef, s=class List -x=List(true), t=ConcreteTypeTag[List[Boolean]], k=TypeRef, s=class List -x=List(1), t=ConcreteTypeTag[List[Int]], k=TypeRef, s=class List -x=List(abc), t=ConcreteTypeTag[List[java.lang.String]], k=TypeRef, s=class List -x=List('abc), t=ConcreteTypeTag[List[Symbol]], k=TypeRef, s=class List - -x=[Z, t=ConcreteTypeTag[Array[Boolean]], k=TypeRef, s=class Array -x=[C, t=ConcreteTypeTag[Array[Char]], k=TypeRef, s=class Array -x=[I, t=ConcreteTypeTag[Array[Int]], k=TypeRef, s=class Array -x=[Ljava.lang.String;, t=ConcreteTypeTag[Array[java.lang.String]], k=TypeRef, s=class Array -x=[Lscala.Symbol;, t=ConcreteTypeTag[Array[Symbol]], k=TypeRef, s=class Array - -x=((),()), t=ConcreteTypeTag[(Unit, Unit)], k=TypeRef, s=class Tuple2 -x=(true,false), t=ConcreteTypeTag[(Boolean, Boolean)], k=TypeRef, s=class Tuple2 -x=(1,2), t=ConcreteTypeTag[(Int, Int)], k=TypeRef, s=class Tuple2 -x=(abc,xyz), t=ConcreteTypeTag[(java.lang.String, java.lang.String)], k=TypeRef, s=class Tuple2 -x=('abc,'xyz), t=ConcreteTypeTag[(Symbol, Symbol)], k=TypeRef, s=class Tuple2 - -x=Test$, t=ConcreteTypeTag[Test.type], k=SingleType, s=object Test -x=scala.collection.immutable.List$, t=ConcreteTypeTag[scala.collection.immutable.List.type], k=SingleType, s=object List - -x=Foo, t=ConcreteTypeTag[Foo[Int]], k=TypeRef, s=class Foo -x=Foo, t=ConcreteTypeTag[Foo[List[Int]]], k=TypeRef, s=class Foo -x=Foo, t=ConcreteTypeTag[Foo[Foo[Int]]], k=TypeRef, s=class Foo -x=Foo, t=ConcreteTypeTag[Foo[List[Foo[Int]]]], k=TypeRef, s=class Foo - -x=Test1$$anon$1, t=ConcreteTypeTag[Bar[java.lang.String]], k=RefinedType, s= -x=Test1$$anon$2, t=ConcreteTypeTag[Bar[java.lang.String]], k=RefinedType, s= +x=(), t=TypeTag[Unit], k=TypeRef, s=class Unit +x=true, t=TypeTag[Boolean], k=TypeRef, s=class Boolean +x=a, t=TypeTag[Char], k=TypeRef, s=class Char +x=1, t=TypeTag[Int], k=TypeRef, s=class Int +x=abc, t=TypeTag[java.lang.String], k=TypeRef, s=class String +x='abc, t=TypeTag[Symbol], k=TypeRef, s=class Symbol + +x=List(()), t=TypeTag[List[Unit]], k=TypeRef, s=class List +x=List(true), t=TypeTag[List[Boolean]], k=TypeRef, s=class List +x=List(1), t=TypeTag[List[Int]], k=TypeRef, s=class List +x=List(abc), t=TypeTag[List[java.lang.String]], k=TypeRef, s=class List +x=List('abc), t=TypeTag[List[Symbol]], k=TypeRef, s=class List + +x=[Z, t=TypeTag[Array[Boolean]], k=TypeRef, s=class Array +x=[C, t=TypeTag[Array[Char]], k=TypeRef, s=class Array +x=[I, t=TypeTag[Array[Int]], k=TypeRef, s=class Array +x=[Ljava.lang.String;, t=TypeTag[Array[java.lang.String]], k=TypeRef, s=class Array +x=[Lscala.Symbol;, t=TypeTag[Array[Symbol]], k=TypeRef, s=class Array + +x=((),()), t=TypeTag[(Unit, Unit)], k=TypeRef, s=class Tuple2 +x=(true,false), t=TypeTag[(Boolean, Boolean)], k=TypeRef, s=class Tuple2 +x=(1,2), t=TypeTag[(Int, Int)], k=TypeRef, s=class Tuple2 +x=(abc,xyz), t=TypeTag[(java.lang.String, java.lang.String)], k=TypeRef, s=class Tuple2 +x=('abc,'xyz), t=TypeTag[(Symbol, Symbol)], k=TypeRef, s=class Tuple2 + +x=Test$, t=TypeTag[Test.type], k=SingleType, s=object Test +x=scala.collection.immutable.List$, t=TypeTag[scala.collection.immutable.List.type], k=SingleType, s=object List + +x=Foo, t=TypeTag[Foo[Int]], k=TypeRef, s=class Foo +x=Foo, t=TypeTag[Foo[List[Int]]], k=TypeRef, s=class Foo +x=Foo, t=TypeTag[Foo[Foo[Int]]], k=TypeRef, s=class Foo +x=Foo, t=TypeTag[Foo[List[Foo[Int]]]], k=TypeRef, s=class Foo + +x=Test1$$anon$1, t=TypeTag[Bar[java.lang.String]], k=RefinedType, s= +x=Test1$$anon$2, t=TypeTag[Bar[java.lang.String]], k=RefinedType, s= ()=() true=true diff --git a/test/files/jvm/manifests-new.scala b/test/files/jvm/manifests-new.scala index b5d0e0f7d7..8706881640 100644 --- a/test/files/jvm/manifests-new.scala +++ b/test/files/jvm/manifests-new.scala @@ -101,10 +101,10 @@ trait TestUtil { val in = new ObjectInputStream(new ByteArrayInputStream(buffer)) in.readObject().asInstanceOf[A] } - def print[T](x: T)(implicit t: ConcreteTypeTag[T]) { + def print[T](x: T)(implicit t: TypeTag[T]) { // todo. type tags are not yet serializable -// val t1: ConcreteTypeTag[T] = read(write(t)) - val t1: ConcreteTypeTag[T] = t +// val t1: TypeTag[T] = read(write(t)) + val t1: TypeTag[T] = t val x1 = x.toString.replaceAll("@[0-9a-z]+$", "") println("x="+x1+", t="+t1+", k="+t1.tpe.kind+", s="+t1.tpe.typeSymbol.toString) } diff --git a/test/files/neg/interop_abstypetags_arenot_classmanifests.check b/test/files/neg/interop_abstypetags_arenot_classmanifests.check new file mode 100644 index 0000000000..3134aadb58 --- /dev/null +++ b/test/files/neg/interop_abstypetags_arenot_classmanifests.check @@ -0,0 +1,4 @@ +interop_abstypetags_arenot_classmanifests.scala:5: error: could not find implicit value for parameter m: ClassManifest[T] + println(classManifest[T]) + ^ +one error found diff --git a/test/files/neg/interop_abstypetags_arenot_classmanifests.scala b/test/files/neg/interop_abstypetags_arenot_classmanifests.scala new file mode 100644 index 0000000000..c8567be5d4 --- /dev/null +++ b/test/files/neg/interop_abstypetags_arenot_classmanifests.scala @@ -0,0 +1,11 @@ +import scala.reflect.runtime.universe._ + +object Test extends App { + def absTypeTagIsnotClassManifest[T: AbsTypeTag] = { + println(classManifest[T]) + } + + absTypeTagIsnotClassManifest[Int] + absTypeTagIsnotClassManifest[String] + absTypeTagIsnotClassManifest[Array[Int]] +} \ No newline at end of file diff --git a/test/files/neg/interop_abstypetags_arenot_classtags.check b/test/files/neg/interop_abstypetags_arenot_classtags.check new file mode 100644 index 0000000000..637db83e57 --- /dev/null +++ b/test/files/neg/interop_abstypetags_arenot_classtags.check @@ -0,0 +1,4 @@ +interop_abstypetags_arenot_classtags.scala:6: error: No ClassTag available for T + println(classTag[T]) + ^ +one error found diff --git a/test/files/neg/interop_abstypetags_arenot_classtags.scala b/test/files/neg/interop_abstypetags_arenot_classtags.scala new file mode 100644 index 0000000000..e3911c1588 --- /dev/null +++ b/test/files/neg/interop_abstypetags_arenot_classtags.scala @@ -0,0 +1,12 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.{ClassTag, classTag} + +object Test extends App { + def absTypeTagIsnotClassTag[T: AbsTypeTag] = { + println(classTag[T]) + } + + absTypeTagIsnotClassTag[Int] + absTypeTagIsnotClassTag[String] + absTypeTagIsnotClassTag[Array[Int]] +} \ No newline at end of file diff --git a/test/files/neg/interop_abstypetags_arenot_manifests.check b/test/files/neg/interop_abstypetags_arenot_manifests.check new file mode 100644 index 0000000000..c80635543f --- /dev/null +++ b/test/files/neg/interop_abstypetags_arenot_manifests.check @@ -0,0 +1,4 @@ +interop_abstypetags_arenot_manifests.scala:5: error: No Manifest available for T. + println(manifest[T]) + ^ +one error found diff --git a/test/files/neg/interop_abstypetags_arenot_manifests.scala b/test/files/neg/interop_abstypetags_arenot_manifests.scala new file mode 100644 index 0000000000..77a95048fd --- /dev/null +++ b/test/files/neg/interop_abstypetags_arenot_manifests.scala @@ -0,0 +1,11 @@ +import scala.reflect.runtime.universe._ + +object Test extends App { + def absTypeTagIsnotManifest[T: AbsTypeTag] = { + println(manifest[T]) + } + + absTypeTagIsnotManifest[Int] + absTypeTagIsnotManifest[String] + absTypeTagIsnotManifest[Array[Int]] +} \ No newline at end of file diff --git a/test/files/neg/interop_classmanifests_arenot_concretetypetags.check b/test/files/neg/interop_classmanifests_arenot_concretetypetags.check deleted file mode 100644 index e51324f241..0000000000 --- a/test/files/neg/interop_classmanifests_arenot_concretetypetags.check +++ /dev/null @@ -1,4 +0,0 @@ -interop_classmanifests_arenot_concretetypetags.scala:5: error: No ConcreteTypeTag available for T - println(implicitly[ConcreteTypeTag[T]]) - ^ -one error found diff --git a/test/files/neg/interop_classmanifests_arenot_concretetypetags.scala b/test/files/neg/interop_classmanifests_arenot_concretetypetags.scala deleted file mode 100644 index f130f162cd..0000000000 --- a/test/files/neg/interop_classmanifests_arenot_concretetypetags.scala +++ /dev/null @@ -1,11 +0,0 @@ -import scala.reflect.runtime.universe._ - -object Test extends App { - def classManifestIsnotConcreteTypeTag[T: ClassManifest] = { - println(implicitly[ConcreteTypeTag[T]]) - } - - classManifestIsnotConcreteTypeTag[Int] - classManifestIsnotConcreteTypeTag[String] - classManifestIsnotConcreteTypeTag[Array[Int]] -} \ No newline at end of file diff --git a/test/files/neg/interop_classmanifests_arenot_typetags.check b/test/files/neg/interop_classmanifests_arenot_typetags.check new file mode 100644 index 0000000000..6675fd9eae --- /dev/null +++ b/test/files/neg/interop_classmanifests_arenot_typetags.check @@ -0,0 +1,4 @@ +interop_classmanifests_arenot_typetags.scala:5: error: No TypeTag available for T + println(implicitly[TypeTag[T]]) + ^ +one error found diff --git a/test/files/neg/interop_classmanifests_arenot_typetags.scala b/test/files/neg/interop_classmanifests_arenot_typetags.scala new file mode 100644 index 0000000000..29d03a8ec8 --- /dev/null +++ b/test/files/neg/interop_classmanifests_arenot_typetags.scala @@ -0,0 +1,11 @@ +import scala.reflect.runtime.universe._ + +object Test extends App { + def classManifestIsnotTypeTag[T: ClassManifest] = { + println(implicitly[TypeTag[T]]) + } + + classManifestIsnotTypeTag[Int] + classManifestIsnotTypeTag[String] + classManifestIsnotTypeTag[Array[Int]] +} \ No newline at end of file diff --git a/test/files/neg/interop_concretetypetags_arenot_classmanifests.check b/test/files/neg/interop_concretetypetags_arenot_classmanifests.check deleted file mode 100644 index e2dacad6c2..0000000000 --- a/test/files/neg/interop_concretetypetags_arenot_classmanifests.check +++ /dev/null @@ -1,4 +0,0 @@ -interop_concretetypetags_arenot_classmanifests.scala:5: error: could not find implicit value for parameter m: ClassManifest[T] - println(classManifest[T]) - ^ -one error found diff --git a/test/files/neg/interop_concretetypetags_arenot_classmanifests.scala b/test/files/neg/interop_concretetypetags_arenot_classmanifests.scala deleted file mode 100644 index 70c87a78a6..0000000000 --- a/test/files/neg/interop_concretetypetags_arenot_classmanifests.scala +++ /dev/null @@ -1,11 +0,0 @@ -import scala.reflect.runtime.universe._ - -object Test extends App { - def concreteTypeTagIsnotClassManifest[T: ConcreteTypeTag] = { - println(classManifest[T]) - } - - concreteTypeTagIsnotClassManifest[Int] - concreteTypeTagIsnotClassManifest[String] - concreteTypeTagIsnotClassManifest[Array[Int]] -} \ No newline at end of file diff --git a/test/files/neg/interop_concretetypetags_arenot_classtags.check b/test/files/neg/interop_concretetypetags_arenot_classtags.check deleted file mode 100644 index 7a7d3bcef5..0000000000 --- a/test/files/neg/interop_concretetypetags_arenot_classtags.check +++ /dev/null @@ -1,4 +0,0 @@ -interop_concretetypetags_arenot_classtags.scala:6: error: No ClassTag available for T - println(classTag[T]) - ^ -one error found diff --git a/test/files/neg/interop_concretetypetags_arenot_classtags.scala b/test/files/neg/interop_concretetypetags_arenot_classtags.scala deleted file mode 100644 index 74e51e8a7a..0000000000 --- a/test/files/neg/interop_concretetypetags_arenot_classtags.scala +++ /dev/null @@ -1,12 +0,0 @@ -import scala.reflect.runtime.universe._ -import scala.reflect.{ClassTag, classTag} - -object Test extends App { - def concreteTypeTagIsnotClassTag[T: ConcreteTypeTag] = { - println(classTag[T]) - } - - concreteTypeTagIsnotClassTag[Int] - concreteTypeTagIsnotClassTag[String] - concreteTypeTagIsnotClassTag[Array[Int]] -} \ No newline at end of file diff --git a/test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.check b/test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.check deleted file mode 100644 index fc550abb4d..0000000000 --- a/test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.check +++ /dev/null @@ -1,6 +0,0 @@ -interop_concretetypetags_without_classtags_arenot_manifests.scala:6: error: to create a manifest here, it is necessary to interoperate with the type tag `evidence$1` in scope. -however typetag -> manifest conversion requires a class tag for the corresponding type to be present. -to proceed add a class tag to the type `T` (e.g. by introducing a context bound) and recompile. - println(manifest[T]) - ^ -one error found diff --git a/test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.scala b/test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.scala deleted file mode 100644 index b9db4ac121..0000000000 --- a/test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.scala +++ /dev/null @@ -1,12 +0,0 @@ -import scala.reflect.runtime.universe._ -import scala.reflect.ClassTag - -object Test extends App { - def concreteTypeTagIsManifest[T: ConcreteTypeTag] = { - println(manifest[T]) - } - - concreteTypeTagIsManifest[Int] - concreteTypeTagIsManifest[String] - concreteTypeTagIsManifest[Array[Int]] -} \ No newline at end of file diff --git a/test/files/neg/interop_typetags_arenot_manifests.check b/test/files/neg/interop_typetags_arenot_manifests.check deleted file mode 100644 index e5a7adf340..0000000000 --- a/test/files/neg/interop_typetags_arenot_manifests.check +++ /dev/null @@ -1,4 +0,0 @@ -interop_typetags_arenot_manifests.scala:5: error: No Manifest available for T. - println(manifest[T]) - ^ -one error found diff --git a/test/files/neg/interop_typetags_arenot_manifests.scala b/test/files/neg/interop_typetags_arenot_manifests.scala deleted file mode 100644 index 7ed1f3857b..0000000000 --- a/test/files/neg/interop_typetags_arenot_manifests.scala +++ /dev/null @@ -1,11 +0,0 @@ -import scala.reflect.runtime.universe._ - -object Test extends App { - def typeTagIsnotManifest[T: TypeTag] = { - println(manifest[T]) - } - - typeTagIsnotManifest[Int] - typeTagIsnotManifest[String] - typeTagIsnotManifest[Array[Int]] -} \ No newline at end of file diff --git a/test/files/neg/interop_typetags_without_classtags_arenot_manifests.check b/test/files/neg/interop_typetags_without_classtags_arenot_manifests.check new file mode 100644 index 0000000000..a95f1ad308 --- /dev/null +++ b/test/files/neg/interop_typetags_without_classtags_arenot_manifests.check @@ -0,0 +1,6 @@ +interop_typetags_without_classtags_arenot_manifests.scala:6: error: to create a manifest here, it is necessary to interoperate with the type tag `evidence$1` in scope. +however typetag -> manifest conversion requires a class tag for the corresponding type to be present. +to proceed add a class tag to the type `T` (e.g. by introducing a context bound) and recompile. + println(manifest[T]) + ^ +one error found diff --git a/test/files/neg/interop_typetags_without_classtags_arenot_manifests.scala b/test/files/neg/interop_typetags_without_classtags_arenot_manifests.scala new file mode 100644 index 0000000000..0d48ae5cd0 --- /dev/null +++ b/test/files/neg/interop_typetags_without_classtags_arenot_manifests.scala @@ -0,0 +1,12 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.ClassTag + +object Test extends App { + def typeTagWithoutClassTagIsnotManifest[T: TypeTag] = { + println(manifest[T]) + } + + typeTagWithoutClassTagIsnotManifest[Int] + typeTagWithoutClassTagIsnotManifest[String] + typeTagWithoutClassTagIsnotManifest[Array[Int]] +} \ No newline at end of file diff --git a/test/files/neg/macro-reify-groundtypetag-hktypeparams-notags.check b/test/files/neg/macro-reify-groundtypetag-hktypeparams-notags.check deleted file mode 100644 index 39e90f827e..0000000000 --- a/test/files/neg/macro-reify-groundtypetag-hktypeparams-notags.check +++ /dev/null @@ -1,7 +0,0 @@ -Test.scala:5: error: No ConcreteTypeTag available for C[T] - println(implicitly[ConcreteTypeTag[C[T]]]) - ^ -Test.scala:6: error: No ConcreteTypeTag available for List[C[T]] - println(implicitly[ConcreteTypeTag[List[C[T]]]]) - ^ -two errors found diff --git a/test/files/neg/macro-reify-groundtypetag-hktypeparams-notags/Test.scala b/test/files/neg/macro-reify-groundtypetag-hktypeparams-notags/Test.scala deleted file mode 100644 index c0c9156b60..0000000000 --- a/test/files/neg/macro-reify-groundtypetag-hktypeparams-notags/Test.scala +++ /dev/null @@ -1,9 +0,0 @@ -import scala.reflect.runtime.universe._ - -object Test extends App { - def fooNoTypeTagHK[C[_], T] = { - println(implicitly[ConcreteTypeTag[C[T]]]) - println(implicitly[ConcreteTypeTag[List[C[T]]]]) - } - fooNoTypeTagHK[List, Int] -} \ No newline at end of file diff --git a/test/files/neg/macro-reify-groundtypetag-typeparams-notags.check b/test/files/neg/macro-reify-groundtypetag-typeparams-notags.check deleted file mode 100644 index 164ca3543f..0000000000 --- a/test/files/neg/macro-reify-groundtypetag-typeparams-notags.check +++ /dev/null @@ -1,7 +0,0 @@ -Test.scala:5: error: No ConcreteTypeTag available for T - println(implicitly[ConcreteTypeTag[T]]) - ^ -Test.scala:6: error: No ConcreteTypeTag available for List[T] - println(implicitly[ConcreteTypeTag[List[T]]]) - ^ -two errors found diff --git a/test/files/neg/macro-reify-groundtypetag-typeparams-notags/Test.scala b/test/files/neg/macro-reify-groundtypetag-typeparams-notags/Test.scala deleted file mode 100644 index a247c3fe7b..0000000000 --- a/test/files/neg/macro-reify-groundtypetag-typeparams-notags/Test.scala +++ /dev/null @@ -1,9 +0,0 @@ -import scala.reflect.runtime.universe._ - -object Test extends App { - def fooNoTypeTag[T] = { - println(implicitly[ConcreteTypeTag[T]]) - println(implicitly[ConcreteTypeTag[List[T]]]) - } - fooNoTypeTag[Int] -} \ No newline at end of file diff --git a/test/files/neg/macro-reify-groundtypetag-usetypetag.check b/test/files/neg/macro-reify-groundtypetag-usetypetag.check deleted file mode 100644 index 164ca3543f..0000000000 --- a/test/files/neg/macro-reify-groundtypetag-usetypetag.check +++ /dev/null @@ -1,7 +0,0 @@ -Test.scala:5: error: No ConcreteTypeTag available for T - println(implicitly[ConcreteTypeTag[T]]) - ^ -Test.scala:6: error: No ConcreteTypeTag available for List[T] - println(implicitly[ConcreteTypeTag[List[T]]]) - ^ -two errors found diff --git a/test/files/neg/macro-reify-groundtypetag-usetypetag/Test.scala b/test/files/neg/macro-reify-groundtypetag-usetypetag/Test.scala deleted file mode 100644 index 52b5c1078d..0000000000 --- a/test/files/neg/macro-reify-groundtypetag-usetypetag/Test.scala +++ /dev/null @@ -1,9 +0,0 @@ -import scala.reflect.runtime.universe._ - -object Test extends App { - def fooTypeTag[T: TypeTag] = { - println(implicitly[ConcreteTypeTag[T]]) - println(implicitly[ConcreteTypeTag[List[T]]]) - } - fooTypeTag[Int] -} \ No newline at end of file diff --git a/test/files/neg/macro-reify-typetag-hktypeparams-notags.check b/test/files/neg/macro-reify-typetag-hktypeparams-notags.check new file mode 100644 index 0000000000..742d87b0a4 --- /dev/null +++ b/test/files/neg/macro-reify-typetag-hktypeparams-notags.check @@ -0,0 +1,7 @@ +Test.scala:5: error: No TypeTag available for C[T] + println(implicitly[TypeTag[C[T]]]) + ^ +Test.scala:6: error: No TypeTag available for List[C[T]] + println(implicitly[TypeTag[List[C[T]]]]) + ^ +two errors found diff --git a/test/files/neg/macro-reify-typetag-hktypeparams-notags/Test.scala b/test/files/neg/macro-reify-typetag-hktypeparams-notags/Test.scala new file mode 100644 index 0000000000..c7b1cedcd2 --- /dev/null +++ b/test/files/neg/macro-reify-typetag-hktypeparams-notags/Test.scala @@ -0,0 +1,9 @@ +import scala.reflect.runtime.universe._ + +object Test extends App { + def fooNoTypeTagHK[C[_], T] = { + println(implicitly[TypeTag[C[T]]]) + println(implicitly[TypeTag[List[C[T]]]]) + } + fooNoTypeTagHK[List, Int] +} \ No newline at end of file diff --git a/test/files/neg/macro-reify-typetag-typeparams-notags.check b/test/files/neg/macro-reify-typetag-typeparams-notags.check new file mode 100644 index 0000000000..db88260047 --- /dev/null +++ b/test/files/neg/macro-reify-typetag-typeparams-notags.check @@ -0,0 +1,7 @@ +Test.scala:5: error: No TypeTag available for T + println(implicitly[TypeTag[T]]) + ^ +Test.scala:6: error: No TypeTag available for List[T] + println(implicitly[TypeTag[List[T]]]) + ^ +two errors found diff --git a/test/files/neg/macro-reify-typetag-typeparams-notags/Test.scala b/test/files/neg/macro-reify-typetag-typeparams-notags/Test.scala new file mode 100644 index 0000000000..6d849cde3f --- /dev/null +++ b/test/files/neg/macro-reify-typetag-typeparams-notags/Test.scala @@ -0,0 +1,9 @@ +import scala.reflect.runtime.universe._ + +object Test extends App { + def fooNoTypeTag[T] = { + println(implicitly[TypeTag[T]]) + println(implicitly[TypeTag[List[T]]]) + } + fooNoTypeTag[Int] +} \ No newline at end of file diff --git a/test/files/neg/macro-reify-typetag-useabstypetag.check b/test/files/neg/macro-reify-typetag-useabstypetag.check new file mode 100644 index 0000000000..db88260047 --- /dev/null +++ b/test/files/neg/macro-reify-typetag-useabstypetag.check @@ -0,0 +1,7 @@ +Test.scala:5: error: No TypeTag available for T + println(implicitly[TypeTag[T]]) + ^ +Test.scala:6: error: No TypeTag available for List[T] + println(implicitly[TypeTag[List[T]]]) + ^ +two errors found diff --git a/test/files/neg/macro-reify-typetag-useabstypetag/Test.scala b/test/files/neg/macro-reify-typetag-useabstypetag/Test.scala new file mode 100644 index 0000000000..b66ad6c523 --- /dev/null +++ b/test/files/neg/macro-reify-typetag-useabstypetag/Test.scala @@ -0,0 +1,9 @@ +import scala.reflect.runtime.universe._ + +object Test extends App { + def fooTypeTag[T: AbsTypeTag] = { + println(implicitly[TypeTag[T]]) + println(implicitly[TypeTag[List[T]]]) + } + fooTypeTag[Int] +} \ No newline at end of file diff --git a/test/files/neg/t3692-old.check b/test/files/neg/t3692-old.check index 9da7033239..a97a7d31ec 100644 --- a/test/files/neg/t3692-old.check +++ b/test/files/neg/t3692-old.check @@ -1,4 +1,4 @@ -t3692-old.scala:6: warning: object Manifest in package reflect is deprecated: Use `@scala.reflect.ConcreteTypeTag` instead +t3692-old.scala:6: warning: object Manifest in package reflect is deprecated: Use TypeTag instead new ManifestTester().toJavaMap(map) ^ t3692-old.scala:15: error: unreachable code diff --git a/test/files/pos/implicits-new.scala b/test/files/pos/implicits-new.scala index b46ed36082..ffc387132a 100644 --- a/test/files/pos/implicits-new.scala +++ b/test/files/pos/implicits-new.scala @@ -88,5 +88,5 @@ package foo2709 { // Problem with specs object specsProblem { - println(implicitly[ConcreteTypeTag[Class[_]]]) + println(implicitly[TypeTag[Class[_]]]) } \ No newline at end of file diff --git a/test/files/run/abstypetags_core.check b/test/files/run/abstypetags_core.check new file mode 100644 index 0000000000..55c8cb7e89 --- /dev/null +++ b/test/files/run/abstypetags_core.check @@ -0,0 +1,28 @@ +true +TypeTag[Byte] +true +TypeTag[Short] +true +TypeTag[Char] +true +TypeTag[Int] +true +TypeTag[Long] +true +TypeTag[Float] +true +TypeTag[Double] +true +TypeTag[Boolean] +true +TypeTag[Unit] +true +TypeTag[Any] +true +TypeTag[java.lang.Object] +true +TypeTag[Null] +true +TypeTag[Nothing] +true +TypeTag[java.lang.String] diff --git a/test/files/run/abstypetags_core.scala b/test/files/run/abstypetags_core.scala new file mode 100644 index 0000000000..a49817f4d4 --- /dev/null +++ b/test/files/run/abstypetags_core.scala @@ -0,0 +1,32 @@ +import scala.reflect.runtime.universe._ + +object Test extends App { + println(implicitly[AbsTypeTag[Byte]] eq AbsTypeTag.Byte) + println(implicitly[AbsTypeTag[Byte]]) + println(implicitly[AbsTypeTag[Short]] eq AbsTypeTag.Short) + println(implicitly[AbsTypeTag[Short]]) + println(implicitly[AbsTypeTag[Char]] eq AbsTypeTag.Char) + println(implicitly[AbsTypeTag[Char]]) + println(implicitly[AbsTypeTag[Int]] eq AbsTypeTag.Int) + println(implicitly[AbsTypeTag[Int]]) + println(implicitly[AbsTypeTag[Long]] eq AbsTypeTag.Long) + println(implicitly[AbsTypeTag[Long]]) + println(implicitly[AbsTypeTag[Float]] eq AbsTypeTag.Float) + println(implicitly[AbsTypeTag[Float]]) + println(implicitly[AbsTypeTag[Double]] eq AbsTypeTag.Double) + println(implicitly[AbsTypeTag[Double]]) + println(implicitly[AbsTypeTag[Boolean]] eq AbsTypeTag.Boolean) + println(implicitly[AbsTypeTag[Boolean]]) + println(implicitly[AbsTypeTag[Unit]] eq AbsTypeTag.Unit) + println(implicitly[AbsTypeTag[Unit]]) + println(implicitly[AbsTypeTag[Any]] eq AbsTypeTag.Any) + println(implicitly[AbsTypeTag[Any]]) + println(implicitly[AbsTypeTag[Object]] eq AbsTypeTag.Object) + println(implicitly[AbsTypeTag[Object]]) + println(implicitly[AbsTypeTag[Null]] eq AbsTypeTag.Null) + println(implicitly[AbsTypeTag[Null]]) + println(implicitly[AbsTypeTag[Nothing]] eq AbsTypeTag.Nothing) + println(implicitly[AbsTypeTag[Nothing]]) + println(implicitly[AbsTypeTag[String]] eq AbsTypeTag.String) + println(implicitly[AbsTypeTag[String]]) +} \ No newline at end of file diff --git a/test/files/run/concretetypetags_core.check b/test/files/run/concretetypetags_core.check index e5308bf9c7..d042e0900d 100644 --- a/test/files/run/concretetypetags_core.check +++ b/test/files/run/concretetypetags_core.check @@ -1,28 +1,28 @@ true -ConcreteTypeTag[Byte] +TypeTag[Byte] true -ConcreteTypeTag[Short] +TypeTag[Short] true -ConcreteTypeTag[Char] +TypeTag[Char] true -ConcreteTypeTag[Int] +TypeTag[Int] true -ConcreteTypeTag[Long] +TypeTag[Long] true -ConcreteTypeTag[Float] +TypeTag[Float] true -ConcreteTypeTag[Double] +TypeTag[Double] true -ConcreteTypeTag[Boolean] +TypeTag[Boolean] true -ConcreteTypeTag[Unit] +TypeTag[Unit] true -ConcreteTypeTag[Any] +TypeTag[Any] true -ConcreteTypeTag[java.lang.Object] +TypeTag[java.lang.Object] true -ConcreteTypeTag[Null] +TypeTag[Null] true -ConcreteTypeTag[Nothing] +TypeTag[Nothing] true -ConcreteTypeTag[java.lang.String] +TypeTag[java.lang.String] diff --git a/test/files/run/concretetypetags_core.scala b/test/files/run/concretetypetags_core.scala index ea7060ec6c..a870f77c5f 100644 --- a/test/files/run/concretetypetags_core.scala +++ b/test/files/run/concretetypetags_core.scala @@ -1,32 +1,32 @@ import scala.reflect.runtime.universe._ object Test extends App { - println(implicitly[ConcreteTypeTag[Byte]] eq ConcreteTypeTag.Byte) - println(implicitly[ConcreteTypeTag[Byte]]) - println(implicitly[ConcreteTypeTag[Short]] eq ConcreteTypeTag.Short) - println(implicitly[ConcreteTypeTag[Short]]) - println(implicitly[ConcreteTypeTag[Char]] eq ConcreteTypeTag.Char) - println(implicitly[ConcreteTypeTag[Char]]) - println(implicitly[ConcreteTypeTag[Int]] eq ConcreteTypeTag.Int) - println(implicitly[ConcreteTypeTag[Int]]) - println(implicitly[ConcreteTypeTag[Long]] eq ConcreteTypeTag.Long) - println(implicitly[ConcreteTypeTag[Long]]) - println(implicitly[ConcreteTypeTag[Float]] eq ConcreteTypeTag.Float) - println(implicitly[ConcreteTypeTag[Float]]) - println(implicitly[ConcreteTypeTag[Double]] eq ConcreteTypeTag.Double) - println(implicitly[ConcreteTypeTag[Double]]) - println(implicitly[ConcreteTypeTag[Boolean]] eq ConcreteTypeTag.Boolean) - println(implicitly[ConcreteTypeTag[Boolean]]) - println(implicitly[ConcreteTypeTag[Unit]] eq ConcreteTypeTag.Unit) - println(implicitly[ConcreteTypeTag[Unit]]) - println(implicitly[ConcreteTypeTag[Any]] eq ConcreteTypeTag.Any) - println(implicitly[ConcreteTypeTag[Any]]) - println(implicitly[ConcreteTypeTag[Object]] eq ConcreteTypeTag.Object) - println(implicitly[ConcreteTypeTag[Object]]) - println(implicitly[ConcreteTypeTag[Null]] eq ConcreteTypeTag.Null) - println(implicitly[ConcreteTypeTag[Null]]) - println(implicitly[ConcreteTypeTag[Nothing]] eq ConcreteTypeTag.Nothing) - println(implicitly[ConcreteTypeTag[Nothing]]) - println(implicitly[ConcreteTypeTag[String]] eq ConcreteTypeTag.String) - println(implicitly[ConcreteTypeTag[String]]) + println(implicitly[TypeTag[Byte]] eq TypeTag.Byte) + println(implicitly[TypeTag[Byte]]) + println(implicitly[TypeTag[Short]] eq TypeTag.Short) + println(implicitly[TypeTag[Short]]) + println(implicitly[TypeTag[Char]] eq TypeTag.Char) + println(implicitly[TypeTag[Char]]) + println(implicitly[TypeTag[Int]] eq TypeTag.Int) + println(implicitly[TypeTag[Int]]) + println(implicitly[TypeTag[Long]] eq TypeTag.Long) + println(implicitly[TypeTag[Long]]) + println(implicitly[TypeTag[Float]] eq TypeTag.Float) + println(implicitly[TypeTag[Float]]) + println(implicitly[TypeTag[Double]] eq TypeTag.Double) + println(implicitly[TypeTag[Double]]) + println(implicitly[TypeTag[Boolean]] eq TypeTag.Boolean) + println(implicitly[TypeTag[Boolean]]) + println(implicitly[TypeTag[Unit]] eq TypeTag.Unit) + println(implicitly[TypeTag[Unit]]) + println(implicitly[TypeTag[Any]] eq TypeTag.Any) + println(implicitly[TypeTag[Any]]) + println(implicitly[TypeTag[Object]] eq TypeTag.Object) + println(implicitly[TypeTag[Object]]) + println(implicitly[TypeTag[Null]] eq TypeTag.Null) + println(implicitly[TypeTag[Null]]) + println(implicitly[TypeTag[Nothing]] eq TypeTag.Nothing) + println(implicitly[TypeTag[Nothing]]) + println(implicitly[TypeTag[String]] eq TypeTag.String) + println(implicitly[TypeTag[String]]) } \ No newline at end of file diff --git a/test/files/run/concretetypetags_multi.check b/test/files/run/concretetypetags_multi.check index 613106985c..6110252c36 100644 --- a/test/files/run/concretetypetags_multi.check +++ b/test/files/run/concretetypetags_multi.check @@ -1,5 +1,5 @@ -ConcreteTypeTag[Int] -ConcreteTypeTag[Array[Int]] -ConcreteTypeTag[Array[Array[Int]]] -ConcreteTypeTag[Array[Array[Array[Int]]]] -ConcreteTypeTag[Array[Array[Array[Array[Int]]]]] +TypeTag[Int] +TypeTag[Array[Int]] +TypeTag[Array[Array[Int]]] +TypeTag[Array[Array[Array[Int]]]] +TypeTag[Array[Array[Array[Array[Int]]]]] diff --git a/test/files/run/concretetypetags_multi.scala b/test/files/run/concretetypetags_multi.scala index 0b5d648877..b30aac80a6 100644 --- a/test/files/run/concretetypetags_multi.scala +++ b/test/files/run/concretetypetags_multi.scala @@ -1,9 +1,9 @@ import scala.reflect.runtime.universe._ object Test extends App { - println(implicitly[ConcreteTypeTag[Int]]) - println(implicitly[ConcreteTypeTag[Array[Int]]]) - println(implicitly[ConcreteTypeTag[Array[Array[Int]]]]) - println(implicitly[ConcreteTypeTag[Array[Array[Array[Int]]]]]) - println(implicitly[ConcreteTypeTag[Array[Array[Array[Array[Int]]]]]]) + println(implicitly[TypeTag[Int]]) + println(implicitly[TypeTag[Array[Int]]]) + println(implicitly[TypeTag[Array[Array[Int]]]]) + println(implicitly[TypeTag[Array[Array[Array[Int]]]]]) + println(implicitly[TypeTag[Array[Array[Array[Array[Int]]]]]]) } \ No newline at end of file diff --git a/test/files/run/existentials3-new.scala b/test/files/run/existentials3-new.scala index 5e1490b778..649fac8327 100644 --- a/test/files/run/existentials3-new.scala +++ b/test/files/run/existentials3-new.scala @@ -37,8 +37,8 @@ object Test { val s = if (t.typeSymbol.isFreeType) t.typeSymbol.typeSignature.toString else t.typeSymbol.toString println("%s, t=%s, s=%s".format(t, t.kind, s)) } - def m[T: ConcreteTypeTag](x: T) = printTpe(typeOf[T]) - def m2[T: TypeTag](x: T) = printTpe(typeOf[T]) + def m[T: TypeTag](x: T) = printTpe(typeOf[T]) + def m2[T: AbsTypeTag](x: T) = printTpe(implicitly[AbsTypeTag[T]].tpe) // tags do work for f10/g10 def main(args: Array[String]): Unit = { diff --git a/test/files/run/interop_classmanifests_arenot_typetags.check b/test/files/run/interop_classmanifests_arenot_typetags.check deleted file mode 100644 index d67491ed75..0000000000 --- a/test/files/run/interop_classmanifests_arenot_typetags.check +++ /dev/null @@ -1,3 +0,0 @@ -T -T -T diff --git a/test/files/run/interop_classmanifests_arenot_typetags.scala b/test/files/run/interop_classmanifests_arenot_typetags.scala deleted file mode 100644 index d65a5124d7..0000000000 --- a/test/files/run/interop_classmanifests_arenot_typetags.scala +++ /dev/null @@ -1,11 +0,0 @@ -import scala.reflect.runtime.universe._ - -object Test extends App { - def classManifestIsnotTypeTag[T: ClassManifest] = { - println(typeOf[T]) - } - - classManifestIsnotTypeTag[Int] - classManifestIsnotTypeTag[String] - classManifestIsnotTypeTag[Array[Int]] -} \ No newline at end of file diff --git a/test/files/run/interop_concretetypetags_are_manifests.check b/test/files/run/interop_concretetypetags_are_manifests.check deleted file mode 100644 index 871167e3ab..0000000000 --- a/test/files/run/interop_concretetypetags_are_manifests.check +++ /dev/null @@ -1,3 +0,0 @@ -int -java.lang.String -Array[Int] diff --git a/test/files/run/interop_concretetypetags_are_manifests.scala b/test/files/run/interop_concretetypetags_are_manifests.scala deleted file mode 100644 index 84647a3a5a..0000000000 --- a/test/files/run/interop_concretetypetags_are_manifests.scala +++ /dev/null @@ -1,12 +0,0 @@ -import scala.reflect.runtime.universe._ -import scala.reflect.ClassTag - -object Test extends App { - def concreteTypeTagIsManifest[T: ConcreteTypeTag : ClassTag] = { - println(manifest[T]) - } - - concreteTypeTagIsManifest[Int] - concreteTypeTagIsManifest[String] - concreteTypeTagIsManifest[Array[Int]] -} \ No newline at end of file diff --git a/test/files/run/interop_manifests_are_abstypetags.check b/test/files/run/interop_manifests_are_abstypetags.check new file mode 100644 index 0000000000..c59e92d4eb --- /dev/null +++ b/test/files/run/interop_manifests_are_abstypetags.check @@ -0,0 +1,3 @@ +Int +java.lang.String +Array[Int] diff --git a/test/files/run/interop_manifests_are_abstypetags.scala b/test/files/run/interop_manifests_are_abstypetags.scala new file mode 100644 index 0000000000..1cba2fdb4b --- /dev/null +++ b/test/files/run/interop_manifests_are_abstypetags.scala @@ -0,0 +1,11 @@ +import scala.reflect.runtime.universe._ + +object Test extends App { + def manifestIsAbsTypeTag[T: Manifest] = { + println(implicitly[AbsTypeTag[T]].tpe) + } + + manifestIsAbsTypeTag[Int] + manifestIsAbsTypeTag[String] + manifestIsAbsTypeTag[Array[Int]] +} \ No newline at end of file diff --git a/test/files/run/interop_manifests_are_concretetypetags.check b/test/files/run/interop_manifests_are_concretetypetags.check deleted file mode 100644 index c59e92d4eb..0000000000 --- a/test/files/run/interop_manifests_are_concretetypetags.check +++ /dev/null @@ -1,3 +0,0 @@ -Int -java.lang.String -Array[Int] diff --git a/test/files/run/interop_manifests_are_concretetypetags.scala b/test/files/run/interop_manifests_are_concretetypetags.scala deleted file mode 100644 index 85ad748173..0000000000 --- a/test/files/run/interop_manifests_are_concretetypetags.scala +++ /dev/null @@ -1,11 +0,0 @@ -import scala.reflect.runtime.universe._ - -object Test extends App { - def manifestIsConcreteTypeTag[T: Manifest] = { - println(implicitly[ConcreteTypeTag[T]].tpe) - } - - manifestIsConcreteTypeTag[Int] - manifestIsConcreteTypeTag[String] - manifestIsConcreteTypeTag[Array[Int]] -} \ No newline at end of file diff --git a/test/files/run/interop_typetags_are_manifests.check b/test/files/run/interop_typetags_are_manifests.check new file mode 100644 index 0000000000..871167e3ab --- /dev/null +++ b/test/files/run/interop_typetags_are_manifests.check @@ -0,0 +1,3 @@ +int +java.lang.String +Array[Int] diff --git a/test/files/run/interop_typetags_are_manifests.scala b/test/files/run/interop_typetags_are_manifests.scala new file mode 100644 index 0000000000..1aca7f52cc --- /dev/null +++ b/test/files/run/interop_typetags_are_manifests.scala @@ -0,0 +1,12 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.ClassTag + +object Test extends App { + def typeTagIsManifest[T: TypeTag : ClassTag] = { + println(manifest[T]) + } + + typeTagIsManifest[Int] + typeTagIsManifest[String] + typeTagIsManifest[Array[Int]] +} \ No newline at end of file diff --git a/test/files/run/macro-expand-nullary-generic.check b/test/files/run/macro-expand-nullary-generic.check index 6dfe04af12..0895c30c3f 100644 --- a/test/files/run/macro-expand-nullary-generic.check +++ b/test/files/run/macro-expand-nullary-generic.check @@ -1,6 +1,6 @@ -it works ConcreteTypeTag[Int] -it works ConcreteTypeTag[Int] -it works ConcreteTypeTag[Int] -it works ConcreteTypeTag[Int] -it works ConcreteTypeTag[Int] +it works TypeTag[Int] +it works TypeTag[Int] +it works TypeTag[Int] +it works TypeTag[Int] +it works TypeTag[Int] kkthxbai diff --git a/test/files/run/macro-expand-tparams-explicit.check b/test/files/run/macro-expand-tparams-explicit.check index 5670e27c4e..19e6d39bc8 100644 --- a/test/files/run/macro-expand-tparams-explicit.check +++ b/test/files/run/macro-expand-tparams-explicit.check @@ -1 +1 @@ -ConcreteTypeTag[Int] +TypeTag[Int] diff --git a/test/files/run/macro-expand-tparams-implicit.check b/test/files/run/macro-expand-tparams-implicit.check index e57fc1217b..80c6b826ba 100644 --- a/test/files/run/macro-expand-tparams-implicit.check +++ b/test/files/run/macro-expand-tparams-implicit.check @@ -1,2 +1,2 @@ -ConcreteTypeTag[Int] -ConcreteTypeTag[String] +TypeTag[Int] +TypeTag[String] diff --git a/test/files/run/macro-expand-tparams-prefix-a.check b/test/files/run/macro-expand-tparams-prefix-a.check index 922be1a6dd..6c23b47d64 100644 --- a/test/files/run/macro-expand-tparams-prefix-a.check +++ b/test/files/run/macro-expand-tparams-prefix-a.check @@ -1,4 +1,4 @@ -ConcreteTypeTag[Int] -ConcreteTypeTag[Int] -ConcreteTypeTag[String] -ConcreteTypeTag[Boolean] +TypeTag[Int] +TypeTag[Int] +TypeTag[String] +TypeTag[Boolean] diff --git a/test/files/run/macro-expand-tparams-prefix-b.check b/test/files/run/macro-expand-tparams-prefix-b.check index a336bb51ec..67dabff11e 100644 --- a/test/files/run/macro-expand-tparams-prefix-b.check +++ b/test/files/run/macro-expand-tparams-prefix-b.check @@ -1,2 +1,2 @@ -ConcreteTypeTag[Boolean] ConcreteTypeTag[Int] -ConcreteTypeTag[Boolean] ConcreteTypeTag[String] +TypeTag[Boolean] TypeTag[Int] +TypeTag[Boolean] TypeTag[String] diff --git a/test/files/run/macro-expand-tparams-prefix-c1.check b/test/files/run/macro-expand-tparams-prefix-c1.check index 87f295aa49..8d1c4e3416 100644 --- a/test/files/run/macro-expand-tparams-prefix-c1.check +++ b/test/files/run/macro-expand-tparams-prefix-c1.check @@ -1,3 +1,3 @@ -ConcreteTypeTag[Int] -ConcreteTypeTag[String] -ConcreteTypeTag[Boolean] +TypeTag[Int] +TypeTag[String] +TypeTag[Boolean] diff --git a/test/files/run/macro-expand-tparams-prefix-c2.check b/test/files/run/macro-expand-tparams-prefix-c2.check index 87f295aa49..8d1c4e3416 100644 --- a/test/files/run/macro-expand-tparams-prefix-c2.check +++ b/test/files/run/macro-expand-tparams-prefix-c2.check @@ -1,3 +1,3 @@ -ConcreteTypeTag[Int] -ConcreteTypeTag[String] -ConcreteTypeTag[Boolean] +TypeTag[Int] +TypeTag[String] +TypeTag[Boolean] diff --git a/test/files/run/macro-expand-tparams-prefix-d1.check b/test/files/run/macro-expand-tparams-prefix-d1.check index ca7a220475..319edfbed0 100644 --- a/test/files/run/macro-expand-tparams-prefix-d1.check +++ b/test/files/run/macro-expand-tparams-prefix-d1.check @@ -1,3 +1,3 @@ -TypeTag[T] -TypeTag[U] -ConcreteTypeTag[Boolean] +AbsTypeTag[T] +AbsTypeTag[U] +TypeTag[Boolean] diff --git a/test/files/run/macro-expand-tparams-prefix-d1/Impls_1.scala b/test/files/run/macro-expand-tparams-prefix-d1/Impls_1.scala index a834d809da..f497e5f7a9 100644 --- a/test/files/run/macro-expand-tparams-prefix-d1/Impls_1.scala +++ b/test/files/run/macro-expand-tparams-prefix-d1/Impls_1.scala @@ -2,11 +2,11 @@ import scala.reflect.runtime.universe._ import scala.reflect.makro.{Context => Ctx} object Impls { - def foo[T, U: c.TypeTag, V](c: Ctx)(implicit T: c.TypeTag[T], V: c.TypeTag[V]): c.Expr[Unit] = { + def foo[T, U: c.AbsTypeTag, V](c: Ctx)(implicit T: c.AbsTypeTag[T], V: c.AbsTypeTag[V]): c.Expr[Unit] = { import c.universe._ c.Expr(Block(List( Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(T.toString)))), - Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(implicitly[c.TypeTag[U]].toString)))), + Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(implicitly[c.AbsTypeTag[U]].toString)))), Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(V.toString))))), Literal(Constant(())))) } diff --git a/test/files/run/macro-reify-abstypetag-notypeparams.check b/test/files/run/macro-reify-abstypetag-notypeparams.check new file mode 100644 index 0000000000..aadd713bef --- /dev/null +++ b/test/files/run/macro-reify-abstypetag-notypeparams.check @@ -0,0 +1,2 @@ +TypeTag[Int] +TypeTag[List[Int]] diff --git a/test/files/run/macro-reify-abstypetag-notypeparams/Test.scala b/test/files/run/macro-reify-abstypetag-notypeparams/Test.scala new file mode 100644 index 0000000000..34f742b9fb --- /dev/null +++ b/test/files/run/macro-reify-abstypetag-notypeparams/Test.scala @@ -0,0 +1,6 @@ +import scala.reflect.runtime.universe._ + +object Test extends App { + println(implicitly[AbsTypeTag[Int]]) + println(implicitly[AbsTypeTag[List[Int]]]) +} \ No newline at end of file diff --git a/test/files/run/macro-reify-abstypetag-typeparams-notags.check b/test/files/run/macro-reify-abstypetag-typeparams-notags.check new file mode 100644 index 0000000000..be62b59a69 --- /dev/null +++ b/test/files/run/macro-reify-abstypetag-typeparams-notags.check @@ -0,0 +1,2 @@ +AbsTypeTag[T] +AbsTypeTag[List[T]] diff --git a/test/files/run/macro-reify-abstypetag-typeparams-notags/Test.scala b/test/files/run/macro-reify-abstypetag-typeparams-notags/Test.scala new file mode 100644 index 0000000000..0b42cc07b5 --- /dev/null +++ b/test/files/run/macro-reify-abstypetag-typeparams-notags/Test.scala @@ -0,0 +1,9 @@ +import scala.reflect.runtime.universe._ + +object Test extends App { + def fooNoTypeTag[T] = { + println(implicitly[AbsTypeTag[T]]) + println(implicitly[AbsTypeTag[List[T]]]) + } + fooNoTypeTag[Int] +} \ No newline at end of file diff --git a/test/files/run/macro-reify-abstypetag-typeparams-tags.check b/test/files/run/macro-reify-abstypetag-typeparams-tags.check new file mode 100644 index 0000000000..d6ca5a85ef --- /dev/null +++ b/test/files/run/macro-reify-abstypetag-typeparams-tags.check @@ -0,0 +1,2 @@ +TypeTag[Int] +AbsTypeTag[List[Int]] diff --git a/test/files/run/macro-reify-abstypetag-typeparams-tags/Test.scala b/test/files/run/macro-reify-abstypetag-typeparams-tags/Test.scala new file mode 100644 index 0000000000..82a7b7971d --- /dev/null +++ b/test/files/run/macro-reify-abstypetag-typeparams-tags/Test.scala @@ -0,0 +1,9 @@ +import scala.reflect.runtime.universe._ + +object Test extends App { + def fooTypeTag[T: AbsTypeTag] = { + println(implicitly[AbsTypeTag[T]]) + println(implicitly[AbsTypeTag[List[T]]]) + } + fooTypeTag[Int] +} \ No newline at end of file diff --git a/test/files/run/macro-reify-abstypetag-usetypetag.check b/test/files/run/macro-reify-abstypetag-usetypetag.check new file mode 100644 index 0000000000..d6ca5a85ef --- /dev/null +++ b/test/files/run/macro-reify-abstypetag-usetypetag.check @@ -0,0 +1,2 @@ +TypeTag[Int] +AbsTypeTag[List[Int]] diff --git a/test/files/run/macro-reify-abstypetag-usetypetag/Test.scala b/test/files/run/macro-reify-abstypetag-usetypetag/Test.scala new file mode 100644 index 0000000000..3c62725c42 --- /dev/null +++ b/test/files/run/macro-reify-abstypetag-usetypetag/Test.scala @@ -0,0 +1,9 @@ +import scala.reflect.runtime.universe._ + +object Test extends App { + def fooTypeTag[T: TypeTag] = { + println(implicitly[AbsTypeTag[T]]) + println(implicitly[AbsTypeTag[List[T]]]) + } + fooTypeTag[Int] +} \ No newline at end of file diff --git a/test/files/run/macro-reify-groundtypetag-notypeparams.check b/test/files/run/macro-reify-groundtypetag-notypeparams.check deleted file mode 100644 index d75b3c72b2..0000000000 --- a/test/files/run/macro-reify-groundtypetag-notypeparams.check +++ /dev/null @@ -1,2 +0,0 @@ -ConcreteTypeTag[Int] -ConcreteTypeTag[List[Int]] diff --git a/test/files/run/macro-reify-groundtypetag-notypeparams/Test.scala b/test/files/run/macro-reify-groundtypetag-notypeparams/Test.scala deleted file mode 100644 index 2bead07dd9..0000000000 --- a/test/files/run/macro-reify-groundtypetag-notypeparams/Test.scala +++ /dev/null @@ -1,6 +0,0 @@ -import scala.reflect.runtime.universe._ - -object Test extends App { - println(implicitly[ConcreteTypeTag[Int]]) - println(implicitly[ConcreteTypeTag[List[Int]]]) -} \ No newline at end of file diff --git a/test/files/run/macro-reify-groundtypetag-typeparams-tags.check b/test/files/run/macro-reify-groundtypetag-typeparams-tags.check deleted file mode 100644 index d75b3c72b2..0000000000 --- a/test/files/run/macro-reify-groundtypetag-typeparams-tags.check +++ /dev/null @@ -1,2 +0,0 @@ -ConcreteTypeTag[Int] -ConcreteTypeTag[List[Int]] diff --git a/test/files/run/macro-reify-groundtypetag-typeparams-tags/Test.scala b/test/files/run/macro-reify-groundtypetag-typeparams-tags/Test.scala deleted file mode 100644 index 245bbe98e1..0000000000 --- a/test/files/run/macro-reify-groundtypetag-typeparams-tags/Test.scala +++ /dev/null @@ -1,9 +0,0 @@ -import scala.reflect.runtime.universe._ - -object Test extends App { - def fooTypeTag[T: ConcreteTypeTag] = { - println(implicitly[ConcreteTypeTag[T]]) - println(implicitly[ConcreteTypeTag[List[T]]]) - } - fooTypeTag[Int] -} \ No newline at end of file diff --git a/test/files/run/macro-reify-typetag-notypeparams.check b/test/files/run/macro-reify-typetag-notypeparams.check index d75b3c72b2..aadd713bef 100644 --- a/test/files/run/macro-reify-typetag-notypeparams.check +++ b/test/files/run/macro-reify-typetag-notypeparams.check @@ -1,2 +1,2 @@ -ConcreteTypeTag[Int] -ConcreteTypeTag[List[Int]] +TypeTag[Int] +TypeTag[List[Int]] diff --git a/test/files/run/macro-reify-typetag-typeparams-notags.check b/test/files/run/macro-reify-typetag-typeparams-notags.check deleted file mode 100644 index 11d78ece41..0000000000 --- a/test/files/run/macro-reify-typetag-typeparams-notags.check +++ /dev/null @@ -1,2 +0,0 @@ -TypeTag[T] -TypeTag[List[T]] diff --git a/test/files/run/macro-reify-typetag-typeparams-notags/Test.scala b/test/files/run/macro-reify-typetag-typeparams-notags/Test.scala deleted file mode 100644 index 6d849cde3f..0000000000 --- a/test/files/run/macro-reify-typetag-typeparams-notags/Test.scala +++ /dev/null @@ -1,9 +0,0 @@ -import scala.reflect.runtime.universe._ - -object Test extends App { - def fooNoTypeTag[T] = { - println(implicitly[TypeTag[T]]) - println(implicitly[TypeTag[List[T]]]) - } - fooNoTypeTag[Int] -} \ No newline at end of file diff --git a/test/files/run/macro-reify-typetag-typeparams-tags.check b/test/files/run/macro-reify-typetag-typeparams-tags.check index 5fd767d565..aadd713bef 100644 --- a/test/files/run/macro-reify-typetag-typeparams-tags.check +++ b/test/files/run/macro-reify-typetag-typeparams-tags.check @@ -1,2 +1,2 @@ -ConcreteTypeTag[Int] +TypeTag[Int] TypeTag[List[Int]] diff --git a/test/files/run/macro-reify-typetag-usegroundtypetag.check b/test/files/run/macro-reify-typetag-usegroundtypetag.check deleted file mode 100644 index 5fd767d565..0000000000 --- a/test/files/run/macro-reify-typetag-usegroundtypetag.check +++ /dev/null @@ -1,2 +0,0 @@ -ConcreteTypeTag[Int] -TypeTag[List[Int]] diff --git a/test/files/run/macro-reify-typetag-usegroundtypetag/Test.scala b/test/files/run/macro-reify-typetag-usegroundtypetag/Test.scala deleted file mode 100644 index 6363c5d472..0000000000 --- a/test/files/run/macro-reify-typetag-usegroundtypetag/Test.scala +++ /dev/null @@ -1,9 +0,0 @@ -import scala.reflect.runtime.universe._ - -object Test extends App { - def fooTypeTag[T: ConcreteTypeTag] = { - println(implicitly[TypeTag[T]]) - println(implicitly[TypeTag[List[T]]]) - } - fooTypeTag[Int] -} \ No newline at end of file diff --git a/test/files/run/macro-undetparams-consfromsls.check b/test/files/run/macro-undetparams-consfromsls.check index 49e9140d5a..4b83c55437 100644 --- a/test/files/run/macro-undetparams-consfromsls.check +++ b/test/files/run/macro-undetparams-consfromsls.check @@ -1,5 +1,5 @@ -A = ConcreteTypeTag[Int] -B = ConcreteTypeTag[Nothing] +A = TypeTag[Int] +B = TypeTag[Nothing] List(1) -A = ConcreteTypeTag[Any] +A = TypeTag[Any] List(abc, 1) diff --git a/test/files/run/macro-undetparams-consfromsls/Impls_Macros_1.scala b/test/files/run/macro-undetparams-consfromsls/Impls_Macros_1.scala index bd3cd3009a..b9bb2cfcca 100644 --- a/test/files/run/macro-undetparams-consfromsls/Impls_Macros_1.scala +++ b/test/files/run/macro-undetparams-consfromsls/Impls_Macros_1.scala @@ -2,13 +2,13 @@ import scala.reflect.runtime.universe._ import scala.reflect.makro.Context object Macros { - def cons_impl[A: c.TypeTag](c: Context)(x: c.Expr[A], xs: c.Expr[List[A]]): c.Expr[List[A]] = c.reify { - println("A = " + c.literal(implicitly[c.TypeTag[A]].toString).splice) + def cons_impl[A: c.AbsTypeTag](c: Context)(x: c.Expr[A], xs: c.Expr[List[A]]): c.Expr[List[A]] = c.reify { + println("A = " + c.literal(implicitly[c.AbsTypeTag[A]].toString).splice) x.splice :: xs.splice } - def nil_impl[B: c.TypeTag](c: Context): c.Expr[List[B]] = c.reify { - println("B = " + c.literal(implicitly[c.TypeTag[B]].toString).splice) + def nil_impl[B: c.AbsTypeTag](c: Context): c.Expr[List[B]] = c.reify { + println("B = " + c.literal(implicitly[c.AbsTypeTag[B]].toString).splice) Nil } diff --git a/test/files/run/macro-undetparams-implicitval.check b/test/files/run/macro-undetparams-implicitval.check index 6c2b601aa5..30681fa40d 100644 --- a/test/files/run/macro-undetparams-implicitval.check +++ b/test/files/run/macro-undetparams-implicitval.check @@ -1 +1 @@ -ConcreteTypeTag[Nothing] +TypeTag[Nothing] diff --git a/test/files/run/macro-undetparams-macroitself.check b/test/files/run/macro-undetparams-macroitself.check index e57fc1217b..80c6b826ba 100644 --- a/test/files/run/macro-undetparams-macroitself.check +++ b/test/files/run/macro-undetparams-macroitself.check @@ -1,2 +1,2 @@ -ConcreteTypeTag[Int] -ConcreteTypeTag[String] +TypeTag[Int] +TypeTag[String] diff --git a/test/files/run/newTags.check b/test/files/run/newTags.check index 3ef7254f87..d83740c40c 100644 --- a/test/files/run/newTags.check +++ b/test/files/run/newTags.check @@ -2,4 +2,4 @@ TypeRef(ThisType(class immutable),class List,List(TypeRef(ThisType(class scala), List[Int] TypeRef(ThisType(class immutable),class Map,List(TypeRef(ThisType(class lang),class String,List()), TypeRef(ThisType(class lang),class String,List()))) scala.collection.immutable.Map[java.lang.String,java.lang.String] -ConcreteTypeTag[TypeRef(ThisType(class immutable),class Map,List(TypeRef(ThisType(class lang),class String,List()), TypeRef(ThisType(class lang),class String,List())))] +TypeTag[TypeRef(ThisType(class immutable),class Map,List(TypeRef(ThisType(class lang),class String,List()), TypeRef(ThisType(class lang),class String,List())))] diff --git a/test/files/run/reify_newimpl_25.check b/test/files/run/reify_newimpl_25.check index 1ba001fb59..a688a98fbc 100644 --- a/test/files/run/reify_newimpl_25.check +++ b/test/files/run/reify_newimpl_25.check @@ -12,7 +12,7 @@ scala> { :11: free term: Ident(newTermName("x")) defined by res0 in :10:21 val tt = implicitly[TypeTag[x.type]] ^ -ConcreteTypeTag[x.type] +TypeTag[x.type] scala> diff --git a/test/files/run/reify_newimpl_26.check b/test/files/run/reify_newimpl_26.check index 1cedc43f74..6c5f124960 100644 --- a/test/files/run/reify_newimpl_26.check +++ b/test/files/run/reify_newimpl_26.check @@ -5,16 +5,16 @@ scala> scala> def foo[T]{ import scala.reflect.runtime.universe._ - val tt = implicitly[TypeTag[List[T]]] + val tt = implicitly[AbsTypeTag[List[T]]] println(tt) } :9: free type: Ident(newTypeName("T")) defined by foo in :7:16 - val tt = implicitly[TypeTag[List[T]]] + val tt = implicitly[AbsTypeTag[List[T]]] ^ foo: [T]=> Unit scala> foo[Int] -TypeTag[List[T]] +AbsTypeTag[List[T]] scala> diff --git a/test/files/run/reify_newimpl_26.scala b/test/files/run/reify_newimpl_26.scala index bb36c91d0e..a12d8a2970 100644 --- a/test/files/run/reify_newimpl_26.scala +++ b/test/files/run/reify_newimpl_26.scala @@ -5,7 +5,7 @@ object Test extends ReplTest { def code = """ def foo[T]{ import scala.reflect.runtime.universe._ - val tt = implicitly[TypeTag[List[T]]] + val tt = implicitly[AbsTypeTag[List[T]]] println(tt) } foo[Int] diff --git a/test/files/run/typetags_core.check b/test/files/run/typetags_core.check deleted file mode 100644 index e5308bf9c7..0000000000 --- a/test/files/run/typetags_core.check +++ /dev/null @@ -1,28 +0,0 @@ -true -ConcreteTypeTag[Byte] -true -ConcreteTypeTag[Short] -true -ConcreteTypeTag[Char] -true -ConcreteTypeTag[Int] -true -ConcreteTypeTag[Long] -true -ConcreteTypeTag[Float] -true -ConcreteTypeTag[Double] -true -ConcreteTypeTag[Boolean] -true -ConcreteTypeTag[Unit] -true -ConcreteTypeTag[Any] -true -ConcreteTypeTag[java.lang.Object] -true -ConcreteTypeTag[Null] -true -ConcreteTypeTag[Nothing] -true -ConcreteTypeTag[java.lang.String] diff --git a/test/files/run/typetags_core.scala b/test/files/run/typetags_core.scala deleted file mode 100644 index a870f77c5f..0000000000 --- a/test/files/run/typetags_core.scala +++ /dev/null @@ -1,32 +0,0 @@ -import scala.reflect.runtime.universe._ - -object Test extends App { - println(implicitly[TypeTag[Byte]] eq TypeTag.Byte) - println(implicitly[TypeTag[Byte]]) - println(implicitly[TypeTag[Short]] eq TypeTag.Short) - println(implicitly[TypeTag[Short]]) - println(implicitly[TypeTag[Char]] eq TypeTag.Char) - println(implicitly[TypeTag[Char]]) - println(implicitly[TypeTag[Int]] eq TypeTag.Int) - println(implicitly[TypeTag[Int]]) - println(implicitly[TypeTag[Long]] eq TypeTag.Long) - println(implicitly[TypeTag[Long]]) - println(implicitly[TypeTag[Float]] eq TypeTag.Float) - println(implicitly[TypeTag[Float]]) - println(implicitly[TypeTag[Double]] eq TypeTag.Double) - println(implicitly[TypeTag[Double]]) - println(implicitly[TypeTag[Boolean]] eq TypeTag.Boolean) - println(implicitly[TypeTag[Boolean]]) - println(implicitly[TypeTag[Unit]] eq TypeTag.Unit) - println(implicitly[TypeTag[Unit]]) - println(implicitly[TypeTag[Any]] eq TypeTag.Any) - println(implicitly[TypeTag[Any]]) - println(implicitly[TypeTag[Object]] eq TypeTag.Object) - println(implicitly[TypeTag[Object]]) - println(implicitly[TypeTag[Null]] eq TypeTag.Null) - println(implicitly[TypeTag[Null]]) - println(implicitly[TypeTag[Nothing]] eq TypeTag.Nothing) - println(implicitly[TypeTag[Nothing]]) - println(implicitly[TypeTag[String]] eq TypeTag.String) - println(implicitly[TypeTag[String]]) -} \ No newline at end of file diff --git a/test/files/run/typetags_multi.check b/test/files/run/typetags_multi.check deleted file mode 100644 index f3ac592f5a..0000000000 --- a/test/files/run/typetags_multi.check +++ /dev/null @@ -1,5 +0,0 @@ -Int -Array[Int] -Array[Array[Int]] -Array[Array[Array[Int]]] -Array[Array[Array[Array[Int]]]] diff --git a/test/files/run/typetags_multi.scala b/test/files/run/typetags_multi.scala deleted file mode 100644 index a989662160..0000000000 --- a/test/files/run/typetags_multi.scala +++ /dev/null @@ -1,9 +0,0 @@ -import scala.reflect.runtime.universe._ - -object Test extends App { - println(typeOf[Int]) - println(typeOf[Array[Int]]) - println(typeOf[Array[Array[Int]]]) - println(typeOf[Array[Array[Array[Int]]]]) - println(typeOf[Array[Array[Array[Array[Int]]]]]) -} \ No newline at end of file diff --git a/test/pending/run/macro-expand-implicit-macro-defeats-type-inference.check b/test/pending/run/macro-expand-implicit-macro-defeats-type-inference.check index 08f7cb9e3e..5af32f38e0 100644 --- a/test/pending/run/macro-expand-implicit-macro-defeats-type-inference.check +++ b/test/pending/run/macro-expand-implicit-macro-defeats-type-inference.check @@ -1,6 +1,6 @@ openImplicits are: List() enclosingImplicits are: List((List[Int],scala.this.Predef.implicitly[List[Int]])) -typetag is: ConcreteTypeTag[Nothing] +typetag is: TypeTag[Nothing] openImplicits are: List() enclosingImplicits are: List((List[String],Test.this.bar[String])) -typetag is: ConcreteTypeTag[Nothing] +typetag is: TypeTag[Nothing] diff --git a/test/pending/run/macro-reify-groundtypetag-hktypeparams-tags/Test.scala b/test/pending/run/macro-reify-groundtypetag-hktypeparams-tags/Test.scala index 6c1461af8d..3252423375 100644 --- a/test/pending/run/macro-reify-groundtypetag-hktypeparams-tags/Test.scala +++ b/test/pending/run/macro-reify-groundtypetag-hktypeparams-tags/Test.scala @@ -1,9 +1,9 @@ import scala.reflect.runtime.universe._ object Test extends App { - def fooTypeTagHK[C[_]: ConcreteTypeTag, T: ConcreteTypeTag] = { - println(implicitly[ConcreteTypeTag[C[T]]]) - println(implicitly[ConcreteTypeTag[List[C[T]]]]) + def fooTypeTagHK[C[_]: TypeTag, T: TypeTag] = { + println(implicitly[TypeTag[C[T]]]) + println(implicitly[TypeTag[List[C[T]]]]) } fooTypeTagHK[List, Int] } \ No newline at end of file -- cgit v1.2.3