-
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
Use of generic type parameters declared in [NonNullTypes(false)]
context should not cause any "nullable" diagnostics on use
#30214
Comments
See also #29980, could related |
Here is another scenario, which I think is the same issue:
Expected: No diagnostics |
LDM confirmed today that no diagnostics should be reported for scenarios mentioned above. |
Heads-up: this bug has been deployed with VS19preview1. |
Confirmed this is a duplicate of #29980. Will make sure to not these scenarios should be included for testing when fixed. |
Assigning to @gafter based on offline conversation. |
I think there are three issues being discussed here. For clarity I am going to split them out into separate issues so they can be treated separately. The first is the treatment of a reference to a (unconstrainted) type parameter that appeared in a disabled context (without an annotation). Such a reference should designate an oblivious type and should be treated accordingly. That does not appear to be the treatment today. That is the issue in The second is the treatment of a reference to a type parameter that was declared in a disabled context but referenced in an enabled context. The compiler treats such as reference as unannotated, but this issue appears to assert that it should be treated as oblivious. That is the issue in The third issue regards type inference in I am closing this umbrella issue and the underlying issues will be tracked in #34842 and #34843 and #34844. |
Expected: No diagnostics.
Note that none is reported for references to F4 field.
Also note that none is reported in M4 method which differs from M3 only by the fact that generic type inference is involved vs. the same type arguments are provided explicitly.
The text was updated successfully, but these errors were encountered: