Skip to content

Commit 7307f34

Browse files
committed
Drop redundant check for AnyClass
1 parent a1d7059 commit 7307f34

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

compiler/src/dotty/tools/dotc/cc/Setup.scala

+1-4
Original file line numberDiff line numberDiff line change
@@ -553,10 +553,7 @@ class Setup extends PreRecheck, SymTransformer, SetupAPI:
553553
case tp: (TypeRef | AppliedType) =>
554554
val sym = tp.typeSymbol
555555
if sym.isClass then
556-
sym == defn.AnyClass
557-
// we assume Any is a shorthand of {cap} Any, so if Any is an upper
558-
// bound, the type is taken to be impure.
559-
|| !sym.isPureClass
556+
!sym.isPureClass
560557
else
561558
sym != defn.Caps_Cap && instanceCanBeImpure(tp.superType)
562559
case tp: (RefinedOrRecType | MatchType) =>

0 commit comments

Comments
 (0)