diff options
-rw-r--r-- | src/dotty/tools/dotc/core/Definitions.scala | 4 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/Denotations.scala | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/Definitions.scala b/src/dotty/tools/dotc/core/Definitions.scala index a24bdd7d8..e3915b861 100644 --- a/src/dotty/tools/dotc/core/Definitions.scala +++ b/src/dotty/tools/dotc/core/Definitions.scala @@ -146,7 +146,7 @@ class Definitions(implicit ctx: Context) { lazy val NothingClass: ClassSymbol = newCompleteClassSymbol( ScalaPackageClass, tpnme.Nothing, AbstractFinal, List(AnyClass.typeRef)) lazy val NullClass: ClassSymbol = newCompleteClassSymbol( - ScalaPackageClass, tpnme.Null, AbstractFinal, List(AnyRefAlias.typeRef)) + ScalaPackageClass, tpnme.Null, AbstractFinal, List(ObjectClass.typeRef)) lazy val PredefModule = requiredModule("scala.Predef") lazy val NilModule = requiredModule("scala.collection.immutable.Nil") @@ -232,7 +232,7 @@ class Definitions(implicit ctx: Context) { // convenient one-parameter method types def methOfAny(tp: Type) = MethodType(List(AnyType), tp) def methOfAnyVal(tp: Type) = MethodType(List(AnyValType), tp) - def methOfAnyRef(tp: Type) = MethodType(List(AnyRefType), tp) + def methOfAnyRef(tp: Type) = MethodType(List(ObjectType), tp) // Derived types def AnyType: Type = AnyClass.typeRef diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index 79899f70a..50b01be51 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -515,7 +515,7 @@ object Denotations { final def filterWithPredicate(p: SingleDenotation => Boolean): SingleDenotation = if (p(this)) this else NoDenotation final def filterDisjoint(denots: PreDenotation)(implicit ctx: Context): SingleDenotation = - if (denots.containsSig(signature)) NoDenotation else this + if (denots.exists && denots.containsSig(signature)) NoDenotation else this def mapInherited(ownDenots: PreDenotation, prevDenots: PreDenotation, pre: Type)(implicit ctx: Context): SingleDenotation = if (hasUniqueSym && prevDenots.containsSym(symbol)) NoDenotation else if (isType) filterDisjoint(ownDenots).asSeenFrom(pre) |