diff options
author | Martin Odersky <odersky@gmail.com> | 2013-03-05 13:26:50 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-03-05 13:26:50 +0100 |
commit | 3efd95c6b2f9a0347edcdc14535ff6ed6dae054c (patch) | |
tree | 5937a95d96216fc2a57b0d6a967065f8cec18be1 /src/dotty/tools/dotc/core/Types.scala | |
parent | c6daa22c03b6957cbea1eaae2d935e9a418d705e (diff) | |
download | dotty-3efd95c6b2f9a0347edcdc14535ff6ed6dae054c.tar.gz dotty-3efd95c6b2f9a0347edcdc14535ff6ed6dae054c.tar.bz2 dotty-3efd95c6b2f9a0347edcdc14535ff6ed6dae054c.zip |
Review of TypeComparers
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index e6faad37c..e48eece8d 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -372,10 +372,10 @@ object Types { case tp: ClassInfo => val candidates = tp.cls.membersNamed(name) candidates.filterAsSeenFrom(pre, excluded).toDenot - case tp: AndType => - tp.tp1.findMember(name, pre, excluded) & tp.tp2.findMember(name, pre, excluded) - case tp: OrType => - (tp.tp1.findMember(name, pre, excluded) | tp.tp2.findMember(name, pre, excluded))(pre) + case AndType(l, r) => + l.findMember(name, pre, excluded) & r.findMember(name, pre, excluded) + case OrType(l, r) => + (l.findMember(name, pre, excluded) | r.findMember(name, pre, excluded))(pre) } /** Is this type a subtype of that type? */ @@ -764,7 +764,7 @@ object Types { override def underlying(implicit ctx: Context): Type = try { ctx.underlyingRecursions += 1 - if (ctx.underlyingRecursions < LogUnderlyingThreshold) + if (ctx.underlyingRecursions < LogPendingUnderlyingThreshold) info else if (ctx.pendingUnderlying(this)) throw new CyclicReference(symbol) |