Skip to content

fix: four small diagnostics and doc fixes (#315, #355, #370, #371) - #373

Merged
cmj0121 merged 7 commits into
mainfrom
fix/370-371-315-355-minor
Oct 17, 2026
Merged

cmj0121 merged 7 commits into
mainfrom
fix/370-371-315-355-minor

Conversation

@cmj0121

@cmj0121 cmj0121 commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Closes #315. Closes #355. Closes #370. Closes #371.

Four small fixes on one branch, at the owner's request. Each has its own commits.

Issue Change Commits
#315 E9050 now reads in order and ends with its citation: … no upper bound here — a slice needs an upper bound — \xs[a..xs.len()]` (GRAMMAR#range-expr)` fix(emit), test(refuse)
#355 nope[0](1), nope[i](1) and nope[i + 0](1) are now E3069 undefined name \nope`. fsion anintelement is still E4101, but its sentence saysthis callee is a intand no longer prints the node kind or?` fix(emit), test(reject)
#371 c_renders_as_text and c_no_render_says had the same stale belief as the comments. xs.format("04d") told the reader that a list has no rendering and to wait for a Display. It now offers f"{x}", and [ch].format(…) names the chan[int] part. The comments in c_display_check and c_print are updated to match fix(emit), test(refuse)
#370 The specs.md block (en + zh-TW) now says three specs are declared (Eq, Ord, Into[T]) and uses impl Hash for P as the E3013 example. Every other name in the list was re-measured and still gives E3013 doc(specs)

Measured

  • RED before the fix: all eight new or changed cases fail on a compiler built from main's emit.zg: two E9050 MESSAGE cases, two format MESSAGE cases, three E3069 CODE cases and one E4101 MESSAGE case.
  • Every intermediate fix commit builds.
  • Gates run one at a time, all OK: refuse, reject, lint, error-codes-check, docs-refused, docs-mirror, docs-links, marker-codes, chapter-codes, refusal-cites, grammar-cites, dead-code, fixpoint, compiler-test, oracle, corpus, examples, docs-zerg, conformance, behaviour, mem-check.

Found on the way, not here

fn least[T: Ord](a: T) -> T called with an int is E4010 \int` does not implement `Ord`. So the T: Ord` bound is not met even by a scalar, which goes further than #369 (tuples).

🤖 Generated with Claude Code

https://claude.ai/code/session_01N8jd1oK2orM6diHxhvWhC7

    The literal ended with `—  (GRAMMAR#range-expr)` and the caller's half was
    concatenated after it, so the citation sat behind an empty dash and the
    advice was glued to its closing parenthesis. The caller's half now goes in
    the dash's place and the citation closes the sentence. (#315)
…name

    c_call_val inferred its callee, found no type and reported E4101 with the
    node's kind and the unresolved type: `index` is a ? and this calls it. A
    callee of no type is now lowered first, so the rule that knows why reports
    it (E3069 undefined name `nope`, as for `nope[0]`); the finding count says
    one answered, as in c_free_method. E4101's sentence names the callee as
    "this callee" and never prints `?`. (#355)
    c_renders_as_text still said a list rendered only where it bridged and a
    composite not at all, so `xs.format("04d")` was told there was no
    spec-less rendering to fall back on and to wait for a structural `Display`
    that #359 had built. It now answers what c_display_check decides: every
    value renders unless an identity, at any depth, or nil is reached.
    c_no_render_says drops the composite sentence and names an identity part.
    The comments in c_display_check and c_print that said a list or a
    composite has no rendering are brought in line. (#371)
    Both open-range cases now assert the whole tail, citation last, so the
    order cannot slip back unnoticed. Red before the fix. (#315)
    Three cases, indexed by a literal, a name and an expression, and the bound
    twin, which is E4101 with a sentence that names no node kind and no `?`.
    All four were red before the fix. (#355)
…g a chan is told the part

    list-format asserted the stale sentence and now asserts the substitute;
    list-of-chan-format holds the identity-part reason. Both red before the
    fix. (#371)
…body wrote

    The built-in specs block said exactly two were declared and that
    `impl Ord for P` reports E3013. `Ord` is declared and dispatches; without an
    `Eq` it is E3017. The block (en and zh-TW) now names three declared specs,
    uses `impl Hash for P` for E3013 (re-measured with every other name in the
    list), says the E3044 sentence is for a type without `Ord`, and drops `<` on
    an `int` from the behaviours a user type cannot join. (#370)
@cmj0121
cmj0121 force-pushed the fix/370-371-315-355-minor branch from 54fe690 to b49b06f Compare October 17, 2026 12:22
@cmj0121
cmj0121 merged commit c92eb36 into main Oct 17, 2026
8 checks passed
@cmj0121
cmj0121 deleted the fix/370-371-315-355-minor branch October 17, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant