File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -4017,7 +4017,7 @@ object Types {
40174017 }
40184018
40194019 override protected def derivedAndOrType (tp : AndOrType , tp1 : Type , tp2 : Type ) =
4020- if (tp1. isInstanceOf [ Range ] || tp2. isInstanceOf [ Range ] )
4020+ if (isRange( tp1) || isRange( tp2) )
40214021 if (tp.isAnd) range(lower(tp1) & lower(tp2), upper(tp1) & upper(tp2))
40224022 else range(lower(tp1) | lower(tp2), upper(tp1) | upper(tp2))
40234023 else tp.derivedAndOrType(tp1, tp2)
@@ -4035,7 +4035,9 @@ object Types {
40354035 }
40364036
40374037 override protected def derivedClassInfo (tp : ClassInfo , pre : Type ): Type = {
4038- assert(! pre.isInstanceOf [Range ])
4038+ assert(! isRange(pre))
4039+ // we don't know what to do here; this case has to be handled in subclasses
4040+ // (typically by handling ClassInfo's specially, in case they can be encountered).
40394041 tp.derivedClassInfo(pre)
40404042 }
40414043
You can’t perform that action at this time.
0 commit comments