Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scope: generalize target class #13540

Merged

Conversation

privat
Copy link
Contributor

@privat privat commented Apr 24, 2023

For the semantic analysis, scopes are nested objects, so demanding a variable binding is either answer or delegated to an outer scope.
Except for targetClass and targetEnvironment that were only available at a single scope level (the weirdly named SemanticScope).
So this PR push up targetClass and targetEnvironement (renamed as environment) so all scope can access it, and update some clients.

Especially, it updates RBMetodNode>>methodClass to simply rely on its scope instead of asking compilationContext.
The side effect is that RBMetodNode scope must be setup earlier in the semantic analysis, as some plugin examples expect it.
This feel like a good move, but I'm willing to consider alternatives if someone have a better idea.

Copy link
Member

@jecisc jecisc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems good to me

@MarcusDenker
Copy link
Member

yes, I think it is ok

@MarcusDenker MarcusDenker merged commit b3a62e5 into pharo-project:Pharo12 Apr 25, 2023
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.

3 participants