File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -467,8 +467,14 @@ struct MergeBlocks
467
467
// fancy here
468
468
return outer;
469
469
}
470
- // we are going to replace the block with the final element, so they
471
- // should be identically typed
470
+ // We are going to replace the block with the final element, so they
471
+ // should be identically typed. Note that we could check for subtyping
472
+ // here, but it would not help in the general case: we know that this
473
+ // block has no breaks (as confirmed above), and so the local-subtyping
474
+ // pass will turn its type into that of its final element, if the final
475
+ // element has a more specialized type. (If we did want to handle that,
476
+ // we'd need to then run a ReFinalize after everything, which would add
477
+ // more complexity here.)
472
478
if (block->type != back->type ) {
473
479
return outer;
474
480
}
You can’t perform that action at this time.
0 commit comments