Skip to content

Restate C-226's declared omission: nested field receiver paths now lower (almide#2933) #116

Description

@O6lvl4

C-226's statement ends with a declared omission:

DECLARED OMISSION: a nested receiver path (h.i.xs, xs[i].f) is still refused with the same list-push-nonvar — the field write takes one var and one field — and tests/list_push_on_record_field_test.rs pins that it stays a wall rather than silently widening.

almide/almide#2933 lowers every mut form through a record field path of any depth that is a chain of field reads ending in a var:

  • list.push, list.pop and list.clear
  • string.push and string.clear
  • map.insert, map.delete and map.clear

The var may be a record var or a mut record parameter. The output is byte-identical to native, and every level is copy-on-write, so C-033 still holds. The new evidence is fixture spec/wasm_cross/nested_field_path_mut.almd (@contract: C-226, C-033).

A receiver that goes through an index or a call (xs[i].f, f().xs) is still refused.

Proposed restatement of the omission sentence:

A receiver path of any depth made of field reads from a var (h.i.xs) takes the same copy-on-write write at every level (#2933). DECLARED OMISSION: a receiver reached through an index or a call (xs[i].f) is still refused with list-push-nonvar / list-pop-nonvar.

The almide PR leaves the statement bytes unchanged, so the als-pin gate stays green. It carries the implementation and the fixture, and flags the stale sentence. The restatement then follows the als-first order: this ledger, then the pin advance, then the statement sync.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions