Skip to content

#2998, #2984, #3004, #3011, #3034, #2950: six spec-gap fixes and conformance rows - #3036

Merged
ehartford merged 2 commits into
mainfrom
spec-gaps
Nov 5, 2026
Merged

ehartford merged 2 commits into
mainfrom
spec-gaps

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Part of #2982 (bridge-the-impl-gap.md).

  1. A one-line method body that is a struct literal parses as a braced block inside extend #2998: check_method_call_parts, static method calls, qualified extension/trait calls, optional-chained methods, and operator methods run ensure_body_typed so D43 on-demand return-type inference types impl/extend methods (including one-line struct-literal bodies) in scripts and generic instances (test/behavior/behav_2998_method_inline_struct_lit.w).
  2. D184 follow-up: a helper that captures an ephemeral script binding is non-escaping — a spawn or a value use of it must be refused #2984 (D184, §29.15): script helpers that capture an ephemeral binding (directly or transitively) are non-escaping; value references, stores, returns, async fn spawns, async blocks, and escaping closures calling them are refused naming the helper and captured binding (test/compile_errors/err_d184_view_capture_escapes_{value,store,spawn,async_block,closure}.w + conformance.tsv rows).
  3. An iterator over a collection literal bound to a variable reads a dead temporary: var d = [1, 2] |> map(x => x * 2); d.next() is None #3004 (D142/D186, §21.1): expr_borrows_owned_temp_iter checks implicit .iter() inserted by |> (pipeline_implicit_iter) and iterable arguments (implicit_iter_args), and check_returned_ephemeral_value_origins rejects returning an ephemeral iterator built over a temporary (test/compile_errors/err_3004_*.w).
  4. C backend: a map key that hashes and compares by its key projection (fn key(), D96) is refused by emit-c #3011 (D96/D97, §11.7): CCodegen emits per-type __with_keyproj_{hash,eq}_* glue calling Key.key (dropping owned temporaries and supporting &str, &Struct, TotalF64 ==/!=, and array returns) instead of refusing key projections (test/emit_c/key_projection.w).
  5. D87 (§7.3a): std.context APIs do not take implicit &Context; the v7.19 ruling is unimplemented #3034 & Compiler-admitted gaps: REPL persistent declarations, UAT expect image:, comptime enum payload shorthand and f-string format specs, bitfields in member records (D147) #2950: removes the stale NON-COMPLIANT sentence on v7.19 in docs/spec/README.md (D87 landed in Spec v7.19: implicit fills never consume (D87) #2055/#2049: ownership-validator verdicts in 24 behavior programs fixed at their exact lines; D87 implicit fills observe; std.context arena borrows #2058, pinned by da_2049_context_arena_implicit_borrow.w), adds D87 to test/conformance/conformance.tsv, flips §17 to implemented (behav_2950_comptime_payload_variant.w), and points §18.5/D147 at with repl: persistent declarations across lines (§18.5) — a let/fn/type line is refused #3012/c_import: a bitfield in a member record (D147) is refused as untranslatable #3014.

Closes #2998
Closes #2984
Closes #3004
Closes #3011
Closes #3034
Closes #2950

Eric Hartford added 2 commits November 5, 2026 11:19
…n-escaping script helpers, implicit-iter temp borrows, conformance rows
@ehartford

Copy link
Copy Markdown
Contributor Author

Seed-driven battery green on d0e8b58b591c1873ac5da87183bc910732a087a2 (tools/verdict.w out/battery/battery.log: rc=0 green).

@ehartford
ehartford marked this pull request as ready for review November 5, 2026 20:13
@ehartford
ehartford merged commit bce3317 into main Nov 5, 2026
@ehartford
ehartford deleted the spec-gaps branch November 5, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment