diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-01-27 20:39:04 +0300 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-02-14 13:24:47 +0100 |
commit | 3293d60531615f4accdee886fba52ddda0929b31 (patch) | |
tree | 59f4cf0ab64fe7413ede01e05d89ca2570a52e02 /src/reflect/scala/reflect/internal/Types.scala | |
parent | 356839e9f33db50d3c25d68ee1f371a1994b0f90 (diff) | |
download | scala-3293d60531615f4accdee886fba52ddda0929b31.tar.gz scala-3293d60531615f4accdee886fba52ddda0929b31.tar.bz2 scala-3293d60531615f4accdee886fba52ddda0929b31.zip |
SI-8190 erasure identities for types in reflection API
Makes sure that almost every abstract type declared in reflection API
erases to a unique class, so that they can be adequately used for
method overloading to the same extent that tags allow them to be used
in pattern matching.
The only two exceptions from this rule are the types whose implementations
we do not control: FlagSet that is implemented as Long and RuntimeClass
that is implemented as java.lang.Class[_].
Diffstat (limited to 'src/reflect/scala/reflect/internal/Types.scala')
-rw-r--r-- | src/reflect/scala/reflect/internal/Types.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala index cf405ade03..d8c7682910 100644 --- a/src/reflect/scala/reflect/internal/Types.scala +++ b/src/reflect/scala/reflect/internal/Types.scala @@ -1055,7 +1055,7 @@ trait Types /** A base class for types that represent a single value * (single-types and this-types). */ - abstract class SingletonType extends SubType with SimpleTypeProxy { + abstract class SingletonType extends SubType with SimpleTypeProxy with SingletonTypeApi { def supertype = underlying override def isTrivial = false override def widen: Type = underlying.widen @@ -1323,7 +1323,7 @@ trait Types /** A common base class for intersection types and class types */ - abstract class CompoundType extends Type { + abstract class CompoundType extends Type with CompoundTypeApi { private[reflect] var baseTypeSeqCache: BaseTypeSeq = _ private[reflect] var baseTypeSeqPeriod = NoPeriod |