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

Fix accidental early evaluation of imported using binding #54956

Merged
merged 1 commit into from
Jun 28, 2024
Merged

Conversation

Keno
Copy link
Member

@Keno Keno commented Jun 27, 2024

In using A.B, we need to evaluate A.B to add the module to the using list. However, in using A: B, we do not care about the value of A.B, we only operate at the binding level. These two operations share a code path and the evaluation of A.B happens early and is unused on the using A: B path. I believe this was an unintentional oversight when the latter syntax was added. Fixes #54954.

In `using A.B`, we need to evaluate `A.B` to add the module to the
using list. However, in `using A: B`, we do not care about the value
of `A.B`, we only operate at the binding level. These two operations
share a code path and the evaluation of `A.B` happens early and is
unused on the `using A: B` path. I believe this was an unintentional
oversight when the latter syntax was added. Fixes #54954.
@Keno Keno added the backport 1.11 Change should be backported to release-1.11 label Jun 28, 2024
@Keno Keno merged commit 89e391b into master Jun 28, 2024
7 checks passed
@Keno Keno deleted the kf/54954 branch June 28, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.11 Change should be backported to release-1.11
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uninitialized typed global can only be imported qualified and not directly
2 participants