diff options
author | Martin Odersky <odersky@gmail.com> | 2013-04-05 17:14:25 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-04-05 17:14:25 +0200 |
commit | ce45711bfcadf22fee2ade9c86b43ada2db0609b (patch) | |
tree | 022351e46ba5a3bce8825e6ccaf6997eb9df72a4 /src/dotty/tools/dotc/core/Types.scala | |
parent | 7736cfb8ff8f5fafee87eb094f15627f4f097165 (diff) | |
download | dotty-ce45711bfcadf22fee2ade9c86b43ada2db0609b.tar.gz dotty-ce45711bfcadf22fee2ade9c86b43ada2db0609b.tar.bz2 dotty-ce45711bfcadf22fee2ade9c86b43ada2db0609b.zip |
Made & , | NoType-aware.
For the pruposes of & and |, NoType is now treated as top type, above Any.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index d296acea1..03def9e9a 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -295,7 +295,7 @@ object Types { // member in Super instead of Sub. // As an example of this in the wild, see // loadClassWithPrivateInnerAndSubSelf in ShowClassTests - tp.cls.symbolicRef.findMember(name, pre, excluded) + tp.cls.symbolicRef.findMember(name, pre, excluded) orElse d case tp: TypeProxy => tp.underlying.findMember(name, pre, excluded) case tp: ClassInfo => @@ -1162,6 +1162,8 @@ object Types { // --- AndType/OrType --------------------------------------------------------------- abstract case class AndType(tp1: Type, tp2: Type) extends CachedGroundType with ValueType { + assert(tp1.isValueType) + assert(tp2.isValueType) type This <: AndType |