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