diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-04-23 16:04:56 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-04-23 17:54:50 +0200 |
commit | 0f0144c74088e396fc1440166bed5a7c6d5f44f4 (patch) | |
tree | fd7cc379f1926a3e6a0b94ccb22dd071384cdeb1 /src/compiler/scala/tools/nsc/interpreter/RichClass.scala | |
parent | 2b09d8caf5497c4e016a3e1179e5f7e842766176 (diff) | |
download | scala-0f0144c74088e396fc1440166bed5a7c6d5f44f4.tar.gz scala-0f0144c74088e396fc1440166bed5a7c6d5f44f4.tar.bz2 scala-0f0144c74088e396fc1440166bed5a7c6d5f44f4.zip |
migrates stdlib and compiler to tags
* all usages of ClassManifest and Manifest are replaced with tags
* all manifest tests are replaced with tag tests
Diffstat (limited to 'src/compiler/scala/tools/nsc/interpreter/RichClass.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/interpreter/RichClass.scala | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/RichClass.scala b/src/compiler/scala/tools/nsc/interpreter/RichClass.scala index 3d4d22063e..2e735e3b9b 100644 --- a/src/compiler/scala/tools/nsc/interpreter/RichClass.scala +++ b/src/compiler/scala/tools/nsc/interpreter/RichClass.scala @@ -6,10 +6,8 @@ package scala.tools.nsc package interpreter -import scala.reflect.{mirror => rm} - class RichClass[T](val clazz: Class[T]) { - def toManifest: Manifest[T] = Manifest[T](rm.classToType(clazz)) + def toTag: ClassTag[T] = ClassTag[T](clazz) def toTypeString: String = TypeStrings.fromClazz(clazz) // Sadly isAnonymousClass does not return true for scala anonymous @@ -21,9 +19,9 @@ class RichClass[T](val clazz: Class[T]) { ) /** It's not easy... to be... me... */ - def supermans: List[Manifest[_]] = supers map (_.toManifest) - def superNames: List[String] = supers map (_.getName) - def interfaces: List[JClass] = supers filter (_.isInterface) + def supermans: List[ClassTag[_]] = supers map (_.toTag) + def superNames: List[String] = supers map (_.getName) + def interfaces: List[JClass] = supers filter (_.isInterface) def hasAncestorName(f: String => Boolean) = superNames exists f def hasAncestor(f: JClass => Boolean) = supers exists f |