Repository navigation
fix(hy-emit): resolve foreign MethodZero and nested struct shapes on assignment Place targets - #2131
Conversation
place_member_name only renamed package roots and Foreign bindings, so MethodZero targets emitted without call parentheses and foreign fields nested in user structs stayed lowercase. Resolve assignment places through the same shape table expressions already use. Co-authored-by: RPMFAN <RPMFAN@users.noreply.github.com>
Landed — Merge PR #2131 (d1d99e1)Thank you @RPMFAN — assignment-target member normalization now resolves foreign shapes, including MethodZero and nested user structs. What landed
New
Verification evidence (pr-2131, merge-gate vs main e2ed94c)
Merge
Bounty railPer |
Closes #2128
Summary
Fixes GUARANTEES.md Row 13 BUILDABLE when an assignment target (
Place) accesses a foreign stdlib shape (MethodZeroor a foreign struct field nested inside a user-defined struct):Emitter::type_of_placeincompiler/crates/hy-emit/src/stmt.rsmirroringtype_of_expr(ForeignTy,var_ty,var_struct+struct_fields, and chainedlookup_membershapes).place_member_nameto consultlookup_memberonself.type_of_place(base)and emit()whenMemberKind::MethodZerois returned (e.g.,w.header["X-Mode"] = ...->w.Header()["X-Mode"] = ..., andc.req.host = ...->c.req.Host = ...).compiler/crates/hy-emit/tests/place_foreign_member_shapes.rs.Verification
cargo test -p hy-emit: 232 passed, 0 failed.Payout Wallet (USDC on Base / EVM):
0x26AB46a0309C3ab8F2f59754B3066e77E8154A34