Skip to content

fix(T1/T2): type unwrapping for nested record field access and do-block emission#48

Closed
damiant3 with Copilot wants to merge 5 commits into
masterfrom
copilot/explain-codebase-structure
Closed

fix(T1/T2): type unwrapping for nested record field access and do-block emission#48
damiant3 with Copilot wants to merge 5 commits into
masterfrom
copilot/explain-codebase-structure

Conversation

Copilot AI commented Apr 13, 2026

Copy link
Copy Markdown
Contributor
  • Fix ref compiler LowerDoExpr in src/Codex.IR/Lowering.cs: compute do-block type from last statement instead of using expectedType
  • Fix self-host lower-do in Codex.Codex/IR/Lowering.codex: add do-block-type helper, compute do-block type from last statement instead of using ty
  • Build succeeds, all 825 tests pass (139 syntax + 147 emit + 539 types)

Copilot AI and others added 2 commits April 13, 2026 04:27
Five coordinated fixes across the type resolution pipeline:
1. deep-resolve: recurse into EffectfulTy (was missing, TypeVars inside
   EffectfulTy wrappers were never resolved)
2. Lowering field access: strip EffectfulTy/ForAllTy wrappers before the
   RecordTy/ConstructedTy resolution match
3. resolve-constructed-ty: unwrap ForAllTy (was only unwrapping EffectfulTy)
4. emit-field-access: add diagnostic error when type resolution fails
   (was silently defaulting to field-idx=0)
5. emit-record-set-builtin: same diagnostic for consistency

Agent-Logs-Url: https://github.com/damiant3/NewRepository/sessions/39a4038d-3fae-4992-8171-95363bb0cdcb

Co-authored-by: damiant3 <131276826+damiant3@users.noreply.github.com>
… backport T1 EffectfulType/ForAllType unwrapping to ref compiler x86-64 emitter

Agent-Logs-Url: https://github.com/damiant3/NewRepository/sessions/4c011bb6-c727-42c8-b48d-1e62389289ce

Co-authored-by: damiant3 <131276826+damiant3@users.noreply.github.com>
…stop-set; add diagnostic for unresolved record types in x86-64 emitter

Agent-Logs-Url: https://github.com/damiant3/NewRepository/sessions/96196812-e872-42d7-8c4a-d034b24aa945

Co-authored-by: damiant3 <131276826+damiant3@users.noreply.github.com>
…sing expectedType

Agent-Logs-Url: https://github.com/damiant3/NewRepository/sessions/38494999-d08d-449e-9d40-73d37d84e576

Co-authored-by: damiant3 <131276826+damiant3@users.noreply.github.com>
@damiant3 damiant3 closed this Apr 13, 2026
@damiant3
damiant3 deleted the copilot/explain-codebase-structure branch April 13, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants