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 @@ -981,13 +981,13 @@ class Definitions {
981
981
}
982
982
983
983
def isPhantomAnyClass (sym : Symbol )(implicit ctx : Context ): Boolean =
984
- sym.exists && (sym.owner eq PhantomClass ) && sym.name == tpnme. Any
984
+ sym.name == tpnme. Any && (sym.owner eq PhantomClass )
985
985
986
986
def isPhantomNothingClass (sym : Symbol )(implicit ctx : Context ): Boolean =
987
- sym.exists && (sym.owner eq PhantomClass ) && sym.name == tpnme. Nothing
987
+ sym.name == tpnme. Nothing && (sym.owner eq PhantomClass )
988
988
989
989
def isPhantomAssume (sym : Symbol )(implicit ctx : Context ): Boolean =
990
- sym.exists && (sym.owner eq PhantomClass ) && sym.name == nme.assume_
990
+ sym.name == nme.assume_ && (sym.owner eq PhantomClass )
991
991
992
992
def topOf (tp : Type )(implicit ctx : Context ): Type = tp.phantomTopClass match {
993
993
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