0%

02. Typeck — bound routing + supertrait + E2049

Goal

Consume the partitioned declaration bounds from §01: markers → populate_value_burden_if_applicable marker path (user_types.rs:227); derivables → register_derived_impls (derived.rs), deduped with legacy #derive during migration; capability traits → structural-capability check (proposal §7.2). Enforce supertraits (§7.3). The E2049 + carries_value_marker detection is already shipped — this section feeds it from real .ori source.

Implementation Items

  • pass-0d skips Value/Sendable markers (no E2033); consumes derivable bounds deduped with #derive legacy
  • Supertrait enforcement (Value: Clone, Eq → declaring : Value satisfies/requires Clone+Eq) per §7.3
  • well_known/trait_set.rs + primitive implicit-Value (codex-F9/F10)
  • eval derives/mod.rs:126 + llvm derive_codegen/mod.rs:54 gate on deduped derivable set (codex-F7/F11)
  • E2049 + Value-field-constraint end-to-end .ori verification (unblocks aims-burden §04)

Spec References

proposal §7.2–§7.5, §12.1; .claude/rules/types.md BI-7, DI-4; BUG-06-005 §01/§02.

Intelligence Reconnaissance

  • Graph-grounded during BUG-06-005 investigation + the dual-source /tp-help consensus (bug-tracker/plans/BUG-06-005/section-02-fix-consensus.md): reviewers ran file-symbols / callers / callees / symbols over ori_parse/grammar/item, ori_ir/ast/items/types.rs, ori_types/check/registration, ori_fmt, ori_eval/derives, ori_llvm/codegen/derive_codegen. Per-section graph queries to be re-run at /review-plan pre-implementation gate. (2026-06-01)