Skip to content

Fixed static error: field projection Tree.top which does not exist - #18

Merged
DavyLandman merged 1 commit into
mainfrom
fix-static-error-top-field
Nov 13, 2026
Merged

DavyLandman merged 1 commit into
mainfrom
fix-static-error-top-field

Conversation

@jurgenvinju

Copy link
Copy Markdown
Contributor

This is a false negative by the current Rascal type-checker. The .top field only exists on implicitly generated start non-terminals like start[Program].

Refactored with semantic equivalence. But the rule for start[Program] is probably superfluous due to the recursive nature (automatic recursion) of collect.

Doing this fix now because the PR ( usethesource/rascal#2551 ) that fixes many false positives and false negatives with respect to start symbols will trigger a true positive here soon.

This is a false negative by the current Rascal type-checker. The `.top` field only exists on implicitly generated start non-terminals like `start[Program]`. 

Refactored with semantic equivalence. But the rule for `start[Program]` is probably superfluous due to the recursive nature (automatic recursion) of `collect`.

Doing this fix now because the PR ( usethesource/rascal#2551 ) that fixes many false positives and false negatives with respect to start symbols will trigger a true positive here soon.
@jurgenvinju

Copy link
Copy Markdown
Contributor Author

@DavyLandman since this project is in the regression tests for Rascal, we can not move forward with fixes in the rascal type-checker w.r.t. the start symbol and its top field, without merging this fix.

@DavyLandman
DavyLandman merged commit 36c1524 into main Nov 13, 2026
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.

2 participants