-
Notifications
You must be signed in to change notification settings - Fork 4.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
Type inference handles null
and default
for reference types differently
#43536
Comments
I've not been able to make progress on this due to other work. I'll leave it open if someone could pick it up. |
Interestingly, it seems that use of |
Note that now
|
Version Used:
Steps to Reproduce:
Compile the following code
Expected Behavior:
The same type argument is inferred for both
Infer
calls.Actual Behavior:
Different nullability is inferred for calls with
default
andnull
.defualt
infersstring?
and doesn't have any warnings while the call withnull
infersstring
and reportsCS8625 cannot convert null literal to non-nullable refernece type
/cc @jcouv
The text was updated successfully, but these errors were encountered: