Closed
fix(T1/T2): type unwrapping for nested record field access and do-block emission#48
Conversation
…tter Agent-Logs-Url: https://github.com/damiant3/NewRepository/sessions/7180a976-aaa1-45c2-8ba1-8dc539605284 Co-authored-by: damiant3 <131276826+damiant3@users.noreply.github.com>
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>
Copilot created this pull request from a session on behalf of
damiant3
April 13, 2026 04:49
View session
damiant3
marked this pull request as ready for review
April 13, 2026 04:53
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LowerDoExprinsrc/Codex.IR/Lowering.cs: compute do-block type from last statement instead of usingexpectedTypelower-doinCodex.Codex/IR/Lowering.codex: adddo-block-typehelper, compute do-block type from last statement instead of usingty