Repository navigation
Preserve lexical occurrence roles in let initializers - #7382
Merged
Merged
Conversation
…480-let-role-witness
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.
Summary
Make ExprLet initializer children classify from their own syntax instead of inheriting the generic declaration-head TypeOccurrence role. The explicit type-annotation edge remains TypeOccurrence.
Add a modeled parser witness for
let x = ythat requires the x declaration and y initializer reference to remain LexicalValueOccurrence while both Int annotations remain TypeOccurrence. Expand the existing generated production serde witness to compile two modules with equal authored names, prove graph-scoped occurrence IDs are disjoint, and round-trip each TypedModule plus the enclosing ResolvedGraph exactly.This is a bounded follow-up to #7352. It does not add resolver selection, Node-attached identity, ownership, emitter/runtime behavior, or premature stage0 adoption of std.occurrence_binding.
Test plan
target/release/claim_batch ... --functions w_pattern_parser_materializes_dedicated_declaration_nodes,...,w_production_frontend_refuses_duplicate_reference_rows— 13/13 PASS.cargo test --manifest-path src/v1/stage0/Cargo.toml pipeline_occurrence_sidecar_serde_round_trip -- --nocapture— PASS; two production modules, standalone TypedModule serde, ResolvedGraph serde, and disjoint IDs.target/release/regen_stage0 --verify—regen_divergence_count=0.cargo fmt --all -- --check— PASS.git diff --check— PASS.Original parent:
220b556d537e9cce55f419c3ebfbac9c5eb80f72(#7352).Current-main synchronization: merge commit
69a44bbd2da82c0b031008c9c2af8107ca9b7c7aincludesorigin/maina00048fd47; no occurrence-transport conflicts or product edits.