File tree 1 file changed +8
-6
lines changed
src/dotty/tools/dotc/core
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -280,19 +280,21 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
280
280
* or to make them equal, by instantiating uninstantiated type variables.
281
281
*/
282
282
def homogenizedUnion (tp1 : Type , tp2 : Type ): Type = {
283
- def fitInto ( tp1 : Type , tp2 : Type ) : Unit = tp1 match {
283
+ tp1 match {
284
284
case tp1 : TypeBounds =>
285
285
tp2 match {
286
286
case tp2 : TypeBounds =>
287
- val nestedCtx = ctx.fresh.setNewTyperState
288
- if (tp2.boundsInterval.contains(tp1.boundsInterval)(nestedCtx))
289
- nestedCtx.typerState.commit()
287
+ def fitInto (tp1 : TypeBounds , tp2 : TypeBounds ): Unit = {
288
+ val nestedCtx = ctx.fresh.setNewTyperState
289
+ if (tp2.boundsInterval.contains(tp1.boundsInterval)(nestedCtx))
290
+ nestedCtx.typerState.commit()
291
+ }
292
+ fitInto(tp1, tp2)
293
+ fitInto(tp2, tp1)
290
294
case _ =>
291
295
}
292
296
case _ =>
293
297
}
294
- fitInto(tp1, tp2)
295
- fitInto(tp2, tp1)
296
298
tp1 | tp2
297
299
}
298
300
You can’t perform that action at this time.
0 commit comments