-
Notifications
You must be signed in to change notification settings - Fork 213
[flow analysis] promote variable in a function expression if potentially final #2753
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
Comments
The example above seems sound because there is no demoting assignment to |
Moving this to the language repo, since any change to inference is a language change. |
Duplicate of #1536. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current behavior: on entering the function,
x
promotion is discarded, so it is not promoted to be not-nullable, becausex
is assigned (written).The current proposed implementation is that on entering the closure, variables which are:
are considered final and so promotion is preserved.
The text was updated successfully, but these errors were encountered: