Repository navigation
Conversation
Extract E33–E34 after the shape-inference core, preserving its existing whole-record mutable-field constraints. Thread per-field mutability through elaboration, cloning, lookup, exposure and allocation; share input/output-bound elaboration with type arguments. Validation: Metals compilation and hkmc2AllTests/test (1,294 tests); reference documentation and regenerated golden outputs included.
This was referenced Nov 7, 2026
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.
[GPT-6 Astra]
Record literals can declare individual mutable fields with
{mut field: value}, and mutable record interfaces can spell distinct write/read bounds directly as{mut field: in S out T}. The read/write constraint model is supplied by #575; this PR adds the declaration syntax and threads its mutability through cloning, lookup, interface exposure and runtime allocation.Type arguments and field bounds share elaboration. Tests cover per-field and whole-record mutability, spread copies, explicit and omitted bounds, negative positions, aliases, recursive fields, structural and nominal callback writes, and cloning. The language reference documents the syntax and its limits.
This extracts E33–E34 from #575: 132 changed compiler Scala lines across eight files, plus eight Scala test adaptation lines in one file, documentation and diff-test updates.
Merge after #575. The temporary base
codex/pr575-inference-basemirrors reduced #575 atf74e393f5so this PR shows only the syntax feature. After #575 merges, integrate updatedhkmc2into this branch and retarget the PR tohkmc2; this also reconciles ancestry if #575 is squash-merged. It is independent of the deforestation follow-up #624.