Skip to content

P1-05: add bounded generic and trait foundation - #1

Merged
maikebing merged 2 commits into
masterfrom
codex/p1-05-generic-foundation
Sep 17, 2026
Merged

maikebing merged 2 commits into
masterfrom
codex/p1-05-generic-foundation

Conversation

@maikebing

Copy link
Copy Markdown
Member

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.

@maikebing
maikebing merged commit 35d8e74 into master Sep 17, 2026
2 checks passed
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.

1 participant