diff options
author | Martin Odersky <odersky@gmail.com> | 2013-09-26 12:03:10 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-09-26 12:43:55 +0200 |
commit | 54acd26dcf377e2eb2a474399894e10cfd4322f5 (patch) | |
tree | a275062a8cab9e81b401a4745400f8db71fed1ae /src/dotty/tools/dotc/core/pickling/ClassfileParser.scala | |
parent | b7f5aa30383730dc1d2b34f9773695d0f5669bcd (diff) | |
download | dotty-54acd26dcf377e2eb2a474399894e10cfd4322f5.tar.gz dotty-54acd26dcf377e2eb2a474399894e10cfd4322f5.tar.bz2 dotty-54acd26dcf377e2eb2a474399894e10cfd4322f5.zip |
Added isRef method to determine whether a type is a typeref that refers to a symbol.
The alternative (tpe eq sym.typeConstructor) does not work because types are not unique.
The alternative (tpe.typeSymbol == sym) does not work because other types than TypeRefs have typeSymbols.
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling/ClassfileParser.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/pickling/ClassfileParser.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala index fc3fb49ec..f640c3d67 100644 --- a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala +++ b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala @@ -248,7 +248,7 @@ class ClassfileParser( val tp = sig2type(tparams, skiptvs) // sig2type seems to return AnyClass regardless of the situation: // we don't want Any as a LOWER bound. - if (tp.typeSymbol == defn.AnyClass) TypeBounds.empty + if (tp isRef defn.AnyClass) TypeBounds.empty else TypeBounds.lower(tp) case '*' => TypeBounds.empty } |