-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Compiler Prediction Error #3485
Comments
This feature request requires that we amend the definite assignment specification. Therefore moving to csharplang. |
This is very similar to #3365. |
Maybe the compiler don't analyze the |
it is the exact same as reported in #3365 so ignore this thread, and move to that one. |
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
General
Version : 3.1
VisualStudio: 2019 16.5.4
is the same as
the above snippet works with no issue but the first one will throw a compile error stating that Y would not be set by the if-statements return.
this has no real implications with this example as using && is by far much better then using ? : but as it stands it is an error in the compilers ability to predict and as such should be fixed as it may have some other unforeseen implication in another project.
The text was updated successfully, but these errors were encountered: