Skip to content

Add parent scope helper to collector API - #71

Closed
toinehartman wants to merge 5 commits into
mainfrom
feature/api-parent-scope
Closed

toinehartman wants to merge 5 commits into
mainfrom
feature/api-parent-scope

Conversation

@toinehartman

Copy link
Copy Markdown
Member

Extending the typepal API in order to fix problems like usethesource/rascal#2264

Comment thread src/analysis/typepal/Collector.rsc Resolved
Comment thread src/analysis/typepal/Collector.rsc Resolved
@toinehartman

Copy link
Copy Markdown
Member Author

This was an initial attempt to solve self-referential assignments/matches:
usethesource/rascal#2264

It required modified scoping in the Rascal type-checker and turned out to be too involved for the relatively local problem at hand. Therefore, after discussion with @PaulKlint, this solution was superseded by a more local approach:
usethesource/rascal#3028

Therefore, this extension is now not necessary anymore and will be archived.

PaulKlint added a commit to usethesource/rascal that referenced this pull request Dec 3, 2026
In `int i = i` and `i := i`, the right-hand-side `i` would be marked as
a use of the definition on the `left-hand-side`, while that is
incorrect. This PR fixes that.

After initially trying to solve this with modified scoping and an
extension to typepal (usethesource/typepal#71),
which turned out to be quite invasive across the type-checker, we opted
for a more local approach. the result is this PR. Most of the changes
consist of tests, and I pointed out the actual fix in comments.

Integration test:
https://github.com/usethesource/rascal-core-big-tests/actions/runs/46883603008

Closes #2264.
Closes #2783.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant