Commit dce5a18a
dce5a18a51a3Merged
Yukihiro "Matz" Matsumoto <[email protected]> · 5 months ago · 1 file · ~1 modified
Description
Propagate .new arg types through inherited initialize
Derived.new(x) with initialize defined only in a parent now binds the parent initialize params via the superclass chain.
Co-Authored-By: Claude Opus 4.8 (1M context) [email protected]
Details
- Commit
- dce5a18a51a3
- Parent
- a96d1bb46a5d
src/analyze.cmodifiedView file
@@ -924,7 +924,7 @@
924924
const char *rty = nt_type(nt, recv);925925
if (rty && !strcmp(rty, "ConstantReadNode")) {926926
int ci = comp_class_index(c, nt_str(nt, recv, "name"));927-
if (ci >= 0) changed |= bind_call_params(c, id, comp_method_in_class(c, ci, "initialize"));927+
if (ci >= 0) changed |= bind_call_params(c, id, comp_method_in_chain(c, ci, "initialize", NULL));928928
}929929
continue;930930
}