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/jvm | |
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/jvm')
-rw-r--r-- | test/files/jvm/manifests-new.check | 70 | ||||
-rw-r--r-- | test/files/jvm/manifests-new.scala | 6 |
2 files changed, 38 insertions, 38 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) } |