diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-06-07 22:05:34 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-06-08 15:34:26 +0200 |
commit | 5acac4d806eb45afdf1e7716c727a97130b69651 (patch) | |
tree | f37a3fcaf44699d4c0272ffdacdf7929424bc784 /test/files | |
parent | bc5f42f51982eb473075bbd2f474a5d628813031 (diff) | |
download | scala-5acac4d806eb45afdf1e7716c727a97130b69651.tar.gz scala-5acac4d806eb45afdf1e7716c727a97130b69651.tar.bz2 scala-5acac4d806eb45afdf1e7716c727a97130b69651.zip |
TypeTag => AbsTypeTag, ConcreteTypeTag => TypeTag
This protects everyone from the confusion caused by stuff like this:
https://issues.scala-lang.org/browse/SI-5884
Diffstat (limited to 'test/files')
83 files changed, 336 insertions, 364 deletions
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=<local Test1> -x=Test1$$anon$2, t=ConcreteTypeTag[Bar[java.lang.String]], k=RefinedType, s=<local Test1> +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=<local Test1> +x=Test1$$anon$2, t=TypeTag[Bar[java.lang.String]], k=RefinedType, s=<local Test1> ()=() 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/run/interop_classmanifests_arenot_typetags.scala b/test/files/neg/interop_classmanifests_arenot_typetags.scala index d65a5124d7..29d03a8ec8 100644 --- a/test/files/run/interop_classmanifests_arenot_typetags.scala +++ b/test/files/neg/interop_classmanifests_arenot_typetags.scala @@ -2,7 +2,7 @@ import scala.reflect.runtime.universe._ object Test extends App { def classManifestIsnotTypeTag[T: ClassManifest] = { - println(typeOf[T]) + println(implicitly[TypeTag[T]]) } classManifestIsnotTypeTag[Int] 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.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_concretetypetags_without_classtags_arenot_manifests.check b/test/files/neg/interop_typetags_without_classtags_arenot_manifests.check index fc550abb4d..a95f1ad308 100644 --- a/test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.check +++ b/test/files/neg/interop_typetags_without_classtags_arenot_manifests.check @@ -1,4 +1,4 @@ -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.
+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])
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-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-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-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-groundtypetag-hktypeparams-notags/Test.scala b/test/files/neg/macro-reify-typetag-hktypeparams-notags/Test.scala index c0c9156b60..c7b1cedcd2 100644 --- a/test/files/neg/macro-reify-groundtypetag-hktypeparams-notags/Test.scala +++ b/test/files/neg/macro-reify-typetag-hktypeparams-notags/Test.scala @@ -2,8 +2,8 @@ import scala.reflect.runtime.universe._ object Test extends App { def fooNoTypeTagHK[C[_], T] = { - println(implicitly[ConcreteTypeTag[C[T]]]) - println(implicitly[ConcreteTypeTag[List[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/run/macro-reify-typetag-typeparams-notags/Test.scala b/test/files/neg/macro-reify-typetag-typeparams-notags/Test.scala index 6d849cde3f..6d849cde3f 100644 --- a/test/files/run/macro-reify-typetag-typeparams-notags/Test.scala +++ b/test/files/neg/macro-reify-typetag-typeparams-notags/Test.scala 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/run/macro-reify-typetag-usegroundtypetag/Test.scala b/test/files/neg/macro-reify-typetag-useabstypetag/Test.scala index 6363c5d472..b66ad6c523 100644 --- a/test/files/run/macro-reify-typetag-usegroundtypetag/Test.scala +++ b/test/files/neg/macro-reify-typetag-useabstypetag/Test.scala @@ -1,7 +1,7 @@ import scala.reflect.runtime.universe._ object Test extends App { - def fooTypeTag[T: ConcreteTypeTag] = { + def fooTypeTag[T: AbsTypeTag] = { println(implicitly[TypeTag[T]]) println(implicitly[TypeTag[List[T]]]) } 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_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_concretetypetags.check b/test/files/run/interop_manifests_are_abstypetags.check index c59e92d4eb..c59e92d4eb 100644 --- a/test/files/run/interop_manifests_are_concretetypetags.check +++ b/test/files/run/interop_manifests_are_abstypetags.check 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.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_concretetypetags_are_manifests.check b/test/files/run/interop_typetags_are_manifests.check index 871167e3ab..871167e3ab 100644 --- a/test/files/run/interop_concretetypetags_are_manifests.check +++ b/test/files/run/interop_typetags_are_manifests.check 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/neg/macro-reify-groundtypetag-typeparams-notags/Test.scala b/test/files/run/macro-reify-abstypetag-typeparams-notags/Test.scala index a247c3fe7b..0b42cc07b5 100644 --- a/test/files/neg/macro-reify-groundtypetag-typeparams-notags/Test.scala +++ b/test/files/run/macro-reify-abstypetag-typeparams-notags/Test.scala @@ -2,8 +2,8 @@ import scala.reflect.runtime.universe._ object Test extends App { def fooNoTypeTag[T] = { - println(implicitly[ConcreteTypeTag[T]]) - println(implicitly[ConcreteTypeTag[List[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/neg/macro-reify-groundtypetag-usetypetag/Test.scala b/test/files/run/macro-reify-abstypetag-usetypetag/Test.scala index 52b5c1078d..3c62725c42 100644 --- a/test/files/neg/macro-reify-groundtypetag-usetypetag/Test.scala +++ b/test/files/run/macro-reify-abstypetag-usetypetag/Test.scala @@ -2,8 +2,8 @@ import scala.reflect.runtime.universe._ object Test extends App { def fooTypeTag[T: TypeTag] = { - println(implicitly[ConcreteTypeTag[T]]) - println(implicitly[ConcreteTypeTag[List[T]]]) + 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-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-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> { <console>:11: free term: Ident(newTermName("x")) defined by res0 in <console>: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)
}
<console>:9: free type: Ident(newTypeName("T")) defined by foo in <console>: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 |