Commit 5de1f422
5de1f422b020Merged
Erik Peterson <[email protected]> · 6 months ago · 2 files · +1 added · ~1 modified
Description
fix(codegen): widen implicit self call params
Fixes #135
Co-Authored-By: OpenAI Codex [email protected]
Details
- Commit
- 5de1f422b020
- Parent
- 84715d7bed78
spinel_codegen.rbmodifiedView file
@@ -9236,11 +9236,7 @@
92369236
while kk < arg_ids.length92379237
at = infer_type(arg_ids[kk])92389238
if kk < ptypes.length9239-
if ptypes[kk] == "int"9240-
if at != "int"9241-
ptypes[kk] = at9242-
end9243-
end9239+
ptypes[kk] = unify_call_types(ptypes[kk], at, arg_ids[kk])92449240
end92459241
kk = kk + 192469242
end@@ -19272,6 +19268,11 @@
1927219268
at = infer_type(arg_ids[k])1927319269
if k < ptypes.length1927419270
pt = ptypes[k]19271+
if pt == "poly"19272+
result = result + box_expr_to_poly(arg_ids[k])19273+
k = k + 119274+
next19275+
end1927519276
if at == "int"1927619277
if is_obj_type(pt) == 11927719278
# Cast int to object pointertest/implicit_self_param_poly.rbaddedView file
Loading diff…