writeonce/tests/corpus/run
shoney.arickathil 4f570a74e6 feat(compiler): ?T forced handling — WO-E211/E212/E213 + narrowing (iter 5)
The type system now keeps its nullability promise: a `?T` value cannot be
used, stored, or dereferenced as a plain `T` without narrowing. The canonical
evidence probe (return b.v where v: ?Int, fn -> Int) that compiled clean for
months now fails with WO-E211.

- WO-E211 (un-narrowed use): arithmetic and </<=/>/>= operands, and/or
  operands (?Bool), interpolation segments, for-iterables, and returns whose
  declared type is not nullable.
- WO-E212 (boundary): nil or ?T stored into a non-nullable slot — annotated
  let, assignment to a confidently-typed local (cenv, never the placeholder
  env — a placeholder target must stay silent) or a resolvable class field.
- WO-E213 (deref): field/index access through a possibly-nil base.
- Narrowing (locals only — a field place can be re-assigned between check
  and use, so chains bind to a local first): `if x != nil { }` narrows the
  branch; a DIVERGING then-branch (`if x == nil { return }`) narrows after
  the if; `x != nil and x.n > 3` narrows and/or right operands
  (short-circuit); `while x != nil` narrows the body. The narrow is
  un-applied when an else-less then-env leaks out un-diverged (the existing
  env-leak convention must not leak the narrow).
- No false positives by construction: env/cenv types are declared or
  confidently inferred; the placeholder fallbacks are plain scalars, never
  ?T. The whole golden suite passed untouched (540/0).
- Samples updated to the bind-then-narrow idiom (log-watcher config decode +
  supervisor lock/next_fire, gc-cycle ring print) — 22 genuine unnarrowed-nil
  sites; employee needed zero changes. All acceptances green.
- Corpus: compile-fail/{nullable-unnarrowed-use,nullable-nil-into-plain,
  nullable-deref-unchecked} + run/nullable-narrowing (all four forms) — 83/0.
- Catalog: E211/E212/E213 move from "Reserved, not yet emitted" to the main
  table; nullable-types-implementation.md status flipped to ENFORCED
  (historical record kept); plan 8 Task 6 ticked (boxed scalar cells
  superseded by WO_NIL_SCALAR); board updated.

Verified: woc-test 540/0 + test_diag 14/0; oop-e2e 83/0; oop-accept ALL MET;
log-watcher 7/0; employee 8/0; gc-cycle ring prints + reclaims.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 17:47:13 +02:00
..
arithmetic feat: milestone 1 complete — .wob emitter, conformance corpus, single binary; GC redesign specced 2026-08-11 19:31:26 +02:00
borrow-escape-return feat(compiler): demand promotion — GC-ness fully inferred (7b Phase 2b core) 2026-08-18 18:53:08 +02:00
db-fk-restrict-catch feat: FK restrict on delete + employee sample runs; group-by parked (9b) 2026-08-16 18:37:23 +02:00
db-query-order feat(compiler): query order-by + take (9b cont.) 2026-08-16 05:20:17 +02:00
db-query-relations feat(compiler): ref + backlink navigation in queries (9b cont.) 2026-08-16 05:10:13 +02:00
db-query-scan feat(compiler): language-integrated query — scan/where/select (9b slice) 2026-08-15 22:28:09 +02:00
db-unique-catch feat: secondary indexes + @unique trap (iteration 9, Task 4; wob v3) 2026-08-15 12:57:32 +02:00
db-update-delete feat(compiler): update-through-row + delete statement (9b cont.) 2026-08-16 05:24:58 +02:00
emit-ctor-tail-position feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
hello feat: milestone 1 complete — .wob emitter, conformance corpus, single binary; GC redesign specced 2026-08-11 19:31:26 +02:00
interface feat: milestone 1 complete — .wob emitter, conformance corpus, single binary; GC redesign specced 2026-08-11 19:31:26 +02:00
lang-and-or-short-circuit feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-break-owned-drop feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-const-usage feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-continue feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-ctor-temp-arg-drop feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-do-while feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-interp-string feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-switch-arm-drop feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-switch-class-arm-leak feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-switch-default-not-last feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-switch-stmt feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-switch-value feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-typedef-record feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-typedef-structural feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-use-crossmodule feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-use-local-shadows-alias feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-use-qualified-dispatch feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-variant-arm-drop feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-variant-bare-union feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-variant-payload feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-variant-payload-escape feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
lang-variant-scalar-payload feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
methods feat: milestone 1 complete — .wob emitter, conformance corpus, single binary; GC redesign specced 2026-08-11 19:31:26 +02:00
nullable-narrowing feat(compiler): ?T forced handling — WO-E211/E212/E213 + narrowing (iter 5) 2026-08-19 17:47:13 +02:00
pricing-containers feat: milestone 1 complete — .wob emitter, conformance corpus, single binary; GC redesign specced 2026-08-11 19:31:26 +02:00
pricing-current-price feat: milestone 1 complete — .wob emitter, conformance corpus, single binary; GC redesign specced 2026-08-11 19:31:26 +02:00
pricing-discounted feat: milestone 1 complete — .wob emitter, conformance corpus, single binary; GC redesign specced 2026-08-11 19:31:26 +02:00
pricing-set-price-insert feat: insert executes (iteration 9, Task 3) -- DB_STUB retires for insert 2026-08-15 11:15:06 +02:00
pricing-text feat: milestone 1 complete — .wob emitter, conformance corpus, single binary; GC redesign specced 2026-08-11 19:31:26 +02:00
.gitkeep feat: milestone 1 complete — .wob emitter, conformance corpus, single binary; GC redesign specced 2026-08-11 19:31:26 +02:00