Repository navigation
Conversation
Extract E29–E30 on the reduced inference branch. Retype parameters, locals, captures, results and instance copies together with caller coercions. Preserve casts unless all producers prove them safe and fusion changes the representation. Validation: Metals compilation and hkmc2AllTests/test (1,295 tests); 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]
Deforestation can replace a nominal object with a closure or a field value. Keeping the old physical slot types then produces errors such as using
Functionwhere a recursive result still expectsAA. This change retypes parameters, locals, captured values, results, specialized instances and their callers together.Cast proofs consider every incoming producer, including copied and recursive schemes. Unknown or incompatible producers invalidate the proof; a proved cast disappears only when fusion changes its operand's representation. Regression coverage includes monomorphic and polymorphic forwarding, recursion, mixed fused/unfused producers, captures, storage and effectful non-returning paths.
This extracts E29–E30 from #575: 421 changed Scala lines across nine files, plus regression inputs and regenerated goldens. The constructor/match and storage defects tracked as E21–E24 retain targeted
:fixmes and their original assertions; #627 and #628 address them.Merge after #575. The temporary base
codex/pr575-inference-basemirrors the reduced #575 atf74e393f5, keeping this review limited to the extraction. After #575 merges, integrate updatedhkmc2into this branch and retarget the PR tohkmc2; this also reconciles ancestry if #575 is squash-merged. Reconcile the fixmes if the constructor/storage fixes have already landed. This PR does not depend on the mutable-record syntax follow-up #625.