Commit 9ad6108b
9ad6108be22eMerged
Yukihiro "Matz" Matsumoto <[email protected]> · 6 months ago · 2 files · +1 added · ~1 modified
Description
Merge pull request #139 from ryanseys/rs-fix-interp-method-widening
fix(codegen): walk @nd_parts in scan_new_calls
Details
- Commit
- 9ad6108be22e
- Parent
- 8bb1300c0856
- Merge parent
- e71675689df9
spinel_codegen.rbmodifiedView file
@@ -6452,6 +6452,16 @@
64526452
scan_new_calls(conds[k])64536453
k = k + 164546454
end6455+
# InterpolatedStringNode and friends carry their components in @nd_parts.6456+
# Without this, an EmbeddedStatementsNode inside `"#{...}"` is the only6457+
# call site for a method whose param type would otherwise widen, and6458+
# the param keeps its default `int` => C error at the call site.6459+
parts = parse_id_list(@nd_parts[nid])6460+
k = 06461+
while k < parts.length6462+
scan_new_calls(parts[k])6463+
k = k + 16464+
end64556465
end64566466
64576467
def update_ivar_types_from_paramstest/interp_method_widening.rbaddedView file
Loading diff…