P1-05: add bounded generic and trait foundation - #1
Merged
Merged
Conversation
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.
P1-05 needs reusable generic substitution, trait evidence and closed-instance planning before generic source bodies can enter the compiler pipeline. This PR adds opt-in structural substitution/matching, conservative implementation coherence with an occurs check, recursive bound resolution, and deterministic reachable-instance planning. All phases share depth, work, item, time and cancellation limits; failed operations expose no partial proof or plan.
The new library contracts are documented in
docs/generic-profile.md. P1-05 remains 🚧 In progress: source/HIR generic binding, body specialization and AOT-reachable emission are subsequent PRs. The paired roadmaps record the execution order, with the typed MIR foundation next.A separate prerequisite commit corrects four AST root extents to match the committed LF source fixtures, fixing fresh-checkout snapshot failures without weakening assertions.
Validation: ✅ Release solution build with warnings treated as errors; ✅ 282/282 executable regression tests, including 17 generic foundation groups; ✅ 49/49 syntax corpus cases; ✅ bilingual roadmap checks and
git diff --check. Local validation used installed .NET SDK 10.0.401; the repository's 10.0.400 SDK pin remains unchanged.