File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -979,13 +979,13 @@ class Definitions {
979
979
}
980
980
981
981
def isPhantomAnyClass (sym : Symbol )(implicit ctx : Context ): Boolean =
982
- sym.exists && (sym.owner eq PhantomClass ) && sym.name == tpnme. Any
982
+ sym.name == tpnme. Any && (sym.owner eq PhantomClass )
983
983
984
984
def isPhantomNothingClass (sym : Symbol )(implicit ctx : Context ): Boolean =
985
- sym.exists && (sym.owner eq PhantomClass ) && sym.name == tpnme. Nothing
985
+ sym.name == tpnme. Nothing && (sym.owner eq PhantomClass )
986
986
987
987
def isPhantomAssume (sym : Symbol )(implicit ctx : Context ): Boolean =
988
- sym.exists && (sym.owner eq PhantomClass ) && sym.name == nme.assume_
988
+ sym.name == nme.assume_ && (sym.owner eq PhantomClass )
989
989
990
990
def topOf (tp : Type )(implicit ctx : Context ): Type = tp.phantomTopClass match {
991
991
case top : ClassInfo => top.prefix.select(tpnme.Any )
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ object Types {
185
185
}
186
186
187
187
private def isPhantomClass (sym : Symbol )(implicit ctx : Context ): Boolean =
188
- sym.isClass && (sym.owner eq defn.PhantomClass ) && (sym.name == tpnme. Any || sym.name == tpnme. Nothing )
188
+ sym.isClass && (sym.owner eq defn.PhantomClass )
189
189
190
190
/** Is this type guaranteed not to have `null` as a value?
191
191
* For the moment this is only true for modules, but it could
You can’t perform that action at this time.
0 commit comments