From 2f9bcaa6af0615fc2d5d2b3ce077790b274dd279 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Sun, 26 Aug 2012 23:27:55 +0200 Subject: removes Symbol.kind and Type.kind use Universe.showRaw instead: scala> import scala.reflect.runtime.{universe => ru} import scala.reflect.runtime.{universe=>ru} scala> ru.showRaw(typeOf[Int]) res0: String = TypeRef(ThisType(scala), scala.Int, List()) scala> ru.showRaw(typeOf[Int].typeSymbol, printKinds = true) res1: String = scala.Int#CLS --- test/files/jvm/manifests-new.scala | 2 +- test/files/run/existentials3-new.check | 16 ++++++++-------- test/files/run/existentials3-new.scala | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'test/files') diff --git a/test/files/jvm/manifests-new.scala b/test/files/jvm/manifests-new.scala index 8706881640..f730be67bb 100644 --- a/test/files/jvm/manifests-new.scala +++ b/test/files/jvm/manifests-new.scala @@ -106,6 +106,6 @@ trait TestUtil { // 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) + println("x="+x1+", t="+t1+", k="+t1.tpe.asInstanceOf[Product].productPrefix+", s="+t1.tpe.typeSymbol.toString) } } \ No newline at end of file diff --git a/test/files/run/existentials3-new.check b/test/files/run/existentials3-new.check index 0d6f694a68..a036d92a24 100644 --- a/test/files/run/existentials3-new.check +++ b/test/files/run/existentials3-new.check @@ -1,24 +1,24 @@ -Bar.type, t=AbstractTypeRef, s= <: scala.runtime.AbstractFunction0[Bar] with Serializable{case def unapply(x$0: Bar): Boolean} with Singleton -Bar, t=AbstractTypeRef, s= <: Test.ToS with Product with Serializable{def copy(): Bar} +Bar.type, t=TypeRef, s= <: scala.runtime.AbstractFunction0[Bar] with Serializable{case def unapply(x$0: Bar): Boolean} with Singleton +Bar, t=TypeRef, s= <: Test.ToS with Product with Serializable{def copy(): Bar} Test.ToS, t=RefinedType, s=f3 Test.ToS, t=RefinedType, s=f4 Test.ToS, t=RefinedType, s=f5 () => Test.ToS, t=TypeRef, s=class Function0 () => Test.ToS, t=TypeRef, s=class Function0 -$anon, t=AbstractTypeRef, s= <: B with Test.ToS -$anon, t=AbstractTypeRef, s= <: B with A with Test.ToS +$anon, t=TypeRef, s= <: B with Test.ToS +$anon, t=TypeRef, s= <: B with A with Test.ToS List[java.lang.Object{type T1}#T1], t=TypeRef, s=class List List[Seq[Int]], t=TypeRef, s=class List List[Seq[U forSome { type U <: Int }]], t=TypeRef, s=class List -Bar.type, t=AbstractTypeRef, s= <: scala.runtime.AbstractFunction0[Bar] with Serializable{case def unapply(x$0: Bar): Boolean} with Singleton -Bar, t=AbstractTypeRef, s= <: Test.ToS with Product with Serializable{def copy(): Bar} +Bar.type, t=TypeRef, s= <: scala.runtime.AbstractFunction0[Bar] with Serializable{case def unapply(x$0: Bar): Boolean} with Singleton +Bar, t=TypeRef, s= <: Test.ToS with Product with Serializable{def copy(): Bar} Test.ToS, t=RefinedType, s=g3 Test.ToS, t=RefinedType, s=g4 Test.ToS, t=RefinedType, s=g5 () => Test.ToS, t=TypeRef, s=class Function0 () => Test.ToS, t=TypeRef, s=class Function0 -$anon, t=AbstractTypeRef, s= <: B with Test.ToS -$anon, t=AbstractTypeRef, s= <: B with A with Test.ToS +$anon, t=TypeRef, s= <: B with Test.ToS +$anon, t=TypeRef, s= <: B with A with Test.ToS List[java.lang.Object{type T1}#T1], t=TypeRef, s=class List List[Seq[Int]], t=TypeRef, s=class List List[Seq[U forSome { type U <: Int }]], t=TypeRef, s=class List diff --git a/test/files/run/existentials3-new.scala b/test/files/run/existentials3-new.scala index 649fac8327..16735eab4f 100644 --- a/test/files/run/existentials3-new.scala +++ b/test/files/run/existentials3-new.scala @@ -35,7 +35,7 @@ object Test { def printTpe(t: Type) = { 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)) + println("%s, t=%s, s=%s".format(t, t.asInstanceOf[Product].productPrefix, s)) } def m[T: TypeTag](x: T) = printTpe(typeOf[T]) def m2[T: AbsTypeTag](x: T) = printTpe(implicitly[AbsTypeTag[T]].tpe) -- cgit v1.2.3