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