diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-08-26 23:27:55 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-08-26 23:27:55 +0200 |
commit | 2f9bcaa6af0615fc2d5d2b3ce077790b274dd279 (patch) | |
tree | b10671b93c8b3c876244ccdccb6c00c17349afbb /src/reflect | |
parent | a23edefac652e3be1474fceb3ee15d7eaecf1359 (diff) | |
download | scala-2f9bcaa6af0615fc2d5d2b3ce077790b274dd279.tar.gz scala-2f9bcaa6af0615fc2d5d2b3ce077790b274dd279.tar.bz2 scala-2f9bcaa6af0615fc2d5d2b3ce077790b274dd279.zip |
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
Diffstat (limited to 'src/reflect')
-rw-r--r-- | src/reflect/scala/reflect/api/Symbols.scala | 3 | ||||
-rw-r--r-- | src/reflect/scala/reflect/api/Types.scala | 3 | ||||
-rw-r--r-- | src/reflect/scala/reflect/internal/Symbols.scala | 1 | ||||
-rw-r--r-- | src/reflect/scala/reflect/runtime/JavaMirrors.scala | 2 |
4 files changed, 1 insertions, 8 deletions
diff --git a/src/reflect/scala/reflect/api/Symbols.scala b/src/reflect/scala/reflect/api/Symbols.scala index 0c4f143d57..b17377795b 100644 --- a/src/reflect/scala/reflect/api/Symbols.scala +++ b/src/reflect/scala/reflect/api/Symbols.scala @@ -200,9 +200,6 @@ trait Symbols extends base.Symbols { self: Universe => /** ... */ def suchThat(cond: Symbol => Boolean): Symbol - - /** The string discriminator of this symbol; useful for debugging */ - def kind: String } /** The API of term symbols */ diff --git a/src/reflect/scala/reflect/api/Types.scala b/src/reflect/scala/reflect/api/Types.scala index bdcaadfbda..f22f8d3e75 100644 --- a/src/reflect/scala/reflect/api/Types.scala +++ b/src/reflect/scala/reflect/api/Types.scala @@ -159,9 +159,6 @@ trait Types extends base.Types { self: Universe => /** Does this type contain a reference to given symbol? */ def contains(sym: Symbol): Boolean - - /** The string discriminator of this type; useful for debugging */ - def kind: String } /** .. */ diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala index 09ac3e5f6f..37f41e2868 100644 --- a/src/reflect/scala/reflect/internal/Symbols.scala +++ b/src/reflect/scala/reflect/internal/Symbols.scala @@ -63,7 +63,6 @@ trait Symbols extends api.Symbols { self: SymbolTable => abstract class SymbolContextApiImpl extends SymbolContextApi { this: Symbol => - def kind: String = kindString def isExistential: Boolean = this.isExistentiallyBound def isParamWithDefault: Boolean = this.hasDefault def isByNameParam: Boolean = this.isValueParameter && (this hasFlag BYNAMEPARAM) diff --git a/src/reflect/scala/reflect/runtime/JavaMirrors.scala b/src/reflect/scala/reflect/runtime/JavaMirrors.scala index 967ac69148..9f2c3fc79c 100644 --- a/src/reflect/scala/reflect/runtime/JavaMirrors.scala +++ b/src/reflect/scala/reflect/runtime/JavaMirrors.scala @@ -124,7 +124,7 @@ trait JavaMirrors extends internal.SymbolTable with api.JavaUniverse { self: Sym private def ErrorInnerModule(wannabe: Symbol) = throw new ScalaReflectionException(s"$wannabe is an inner module, use reflectModule on an InstanceMirror to obtain its ModuleMirror") private def ErrorStaticClass(wannabe: Symbol) = throw new ScalaReflectionException(s"$wannabe is a static class, use reflectClass on a RuntimeMirror to obtain its ClassMirror") private def ErrorStaticModule(wannabe: Symbol) = throw new ScalaReflectionException(s"$wannabe is a static module, use reflectModule on a RuntimeMirror to obtain its ModuleMirror") - private def ErrorNotMember(wannabe: Symbol, owner: Symbol) = throw new ScalaReflectionException(s"expected a member of $owner, you provided ${wannabe.kind} ${wannabe.fullName}") + private def ErrorNotMember(wannabe: Symbol, owner: Symbol) = throw new ScalaReflectionException(s"expected a member of $owner, you provided ${wannabe.kindString} ${wannabe.fullName}") private def ErrorNotField(wannabe: Symbol) = throw new ScalaReflectionException(s"expected a field or an accessor method symbol, you provided $wannabe") private def ErrorNonExistentField(wannabe: Symbol) = throw new ScalaReflectionException(s""" |Scala field ${wannabe.name} isn't represented as a Java field, neither it has a Java accessor method |