summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ir/subtype-exprs.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ir/subtype-exprs.h b/src/ir/subtype-exprs.h
index 640240df9..1895c856a 100644
--- a/src/ir/subtype-exprs.h
+++ b/src/ir/subtype-exprs.h
@@ -249,7 +249,13 @@ struct SubtypingDiscoverer : public OverriddenVisitor<SubType> {
self()->noteSubtype(body, curr);
}
}
- void visitTryTable(TryTable* curr) { self()->noteSubtype(curr->body, curr); }
+ void visitTryTable(TryTable* curr) {
+ self()->noteSubtype(curr->body, curr);
+ for (Index i = 0; i < curr->catchTags.size(); i++) {
+ self()->noteSubtype(curr->sentTypes[i],
+ self()->findBreakTarget(curr->catchDests[i]));
+ }
+ }
void visitThrow(Throw* curr) {
Type params = self()->getModule()->getTag(curr->tag)->sig.params;
assert(params.size() == curr->operands.size());