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 @@ -4021,7 +4021,7 @@ object Types {
40214021 }
40224022
40234023 override protected def derivedAndOrType (tp : AndOrType , tp1 : Type , tp2 : Type ) =
4024- if (tp1. isInstanceOf [ Range ] || tp2. isInstanceOf [ Range ] )
4024+ if (isRange( tp1) || isRange( tp2) )
40254025 if (tp.isAnd) range(lower(tp1) & lower(tp2), upper(tp1) & upper(tp2))
40264026 else range(lower(tp1) | lower(tp2), upper(tp1) | upper(tp2))
40274027 else tp.derivedAndOrType(tp1, tp2)
@@ -4039,7 +4039,9 @@ object Types {
40394039 }
40404040
40414041 override protected def derivedClassInfo (tp : ClassInfo , pre : Type ): Type = {
4042- assert(! pre.isInstanceOf [Range ])
4042+ assert(! isRange(pre))
4043+ // we don't know what to do here; this case has to be handled in subclasses
4044+ // (typically by handling ClassInfo's specially, in case they can be encountered).
40434045 tp.derivedClassInfo(pre)
40444046 }
40454047
You can’t perform that action at this time.
0 commit comments