Commit a96d1bb4
a96d1bb46a5dMerged
Yukihiro "Matz" Matsumoto <[email protected]> · 5 months ago · 2 files · ~2 modified
Description
Emit begin..rescue..else..ensure clauses in codegen
The else clause runs only when the begin body completed without an
exception; ensure runs on both the success and exception paths. Also
normalize the remaining } else to }\nelse per the C style rule.
Co-Authored-By: Claude Opus 4.8 (1M context) [email protected]
Details
- Commit
- a96d1bb46a5d
- Parent
- 8ddbbcf97492
src/analyze.cmodifiedView file
@@ -371,7 +371,8 @@
371371
Scope *cs = comp_scope_of(c, cid);372372
if (cs->class_id >= 0) rmi = comp_method_in_chain(c, cs->class_id, cn, NULL);373373
}374-
} else {374+
}375+
else {375376
TyKind crt = infer_type(c, crecv);376377
if (ty_is_object(crt)) rmi = comp_method_in_chain(c, ty_object_class(crt), cn, NULL);377378
}src/codegen.cmodifiedView file
Loading diff…