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 @@ -4021,7 +4021,7 @@ object Types {
4021
4021
}
4022
4022
4023
4023
override protected def derivedAndOrType (tp : AndOrType , tp1 : Type , tp2 : Type ) =
4024
- if (tp1. isInstanceOf [ Range ] || tp2. isInstanceOf [ Range ] )
4024
+ if (isRange( tp1) || isRange( tp2) )
4025
4025
if (tp.isAnd) range(lower(tp1) & lower(tp2), upper(tp1) & upper(tp2))
4026
4026
else range(lower(tp1) | lower(tp2), upper(tp1) | upper(tp2))
4027
4027
else tp.derivedAndOrType(tp1, tp2)
@@ -4039,7 +4039,9 @@ object Types {
4039
4039
}
4040
4040
4041
4041
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).
4043
4045
tp.derivedClassInfo(pre)
4044
4046
}
4045
4047
You can’t perform that action at this time.
0 commit comments