Commit 9453d99f
9453d99fb18dMerged
Yukihiro "Matz" Matsumoto <[email protected]> · 6 months ago · 2 files · +1 added · ~1 modified
Description
Merge pull request #137 from companygardener/codex/fix-implicit-self-param-poly
fix(codegen): widen implicit self call params
Details
- Commit
- 9453d99fb18d
- Parent
- 8d52d1fd69a1
- Merge parent
- 5de1f422b020
spinel_codegen.rbmodifiedView file
@@ -9376,11 +9376,7 @@
93769376
while kk < arg_ids.length93779377
at = infer_type(arg_ids[kk])93789378
if kk < ptypes.length9379-
if ptypes[kk] == "int"9380-
if at != "int"9381-
ptypes[kk] = at9382-
end9383-
end9379+
ptypes[kk] = unify_call_types(ptypes[kk], at, arg_ids[kk])93849380
end93859381
kk = kk + 193869382
end@@ -19481,6 +19477,11 @@
1948119477
at = infer_type(arg_ids[k])1948219478
if k < ptypes.length1948319479
pt = ptypes[k]19480+
if pt == "poly"19481+
result = result + box_expr_to_poly(arg_ids[k])19482+
k = k + 119483+
next19484+
end1948419485
if at == "int"1948519486
if is_obj_type(pt) == 11948619487
# Cast int to object pointertest/implicit_self_param_poly.rbaddedView file
Loading diff…