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

Pure null test on unconstrained type #41384

Merged
merged 3 commits into from
Feb 6, 2020
Merged

Conversation

jcouv
Copy link
Member

@jcouv jcouv commented Feb 4, 2020

Closes #35602 as "won't fix".

Confirmed in LDM 2/5/2020 that t is null should not change the state of t to maybe-default. The current behavior of changing its state to maybe-null is sufficient.

@jcouv jcouv added this to the 16.5.P3 milestone Feb 4, 2020
@jcouv jcouv self-assigned this Feb 4, 2020
@jcouv jcouv changed the title Null test changes state to MaybeDefault Pure null test on unconstrained type Feb 4, 2020
@jcouv jcouv modified the milestones: 16.5.P3, 16.6.P1 Feb 4, 2020
@jcouv jcouv marked this pull request as ready for review February 5, 2020 20:13
@jcouv jcouv requested a review from a team as a code owner February 5, 2020 20:13
@jcouv jcouv added the Test Test failures in roslyn-CI label Feb 6, 2020
Copy link
Member

@agocke agocke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a bug for the equivalent where T : notnull not producing a warning?

@jcouv
Copy link
Member Author

jcouv commented Feb 6, 2020

Is there a bug for the equivalent where T : notnull not producing a warning?

Yes, I opened a bug following this morning's LDM and have a draft PR ready: #41445

@jcouv jcouv merged commit 21d9c89 into dotnet:master Feb 6, 2020
@jcouv jcouv deleted the maybe-default branch February 6, 2020 04:35
333fred added a commit to 333fred/roslyn that referenced this pull request Feb 6, 2020
* dotnet/master: (918 commits)
  Pure null test on unconstrained type (dotnet#41384)
  Fix file headers, bootsrap build issues.
  Make `elementLocations` accept an array of nullable locations in the public api.
  Learn from non-null tests on as operator (dotnet#41419)
  Use Microsoft.NET.Sdk.WindowsDesktop for XAML projects (dotnet#40234)
  Address feedback.
  Introduce `GetRequiredBinder`.
  Add missing `NotNullWhen` annotations.
  Annotate more of the binder
  Add version of zlib library to deterministic build inputs (dotnet#41385)
  [master] Update dependencies from dotnet/arcade (dotnet#41354)
  Simplify
  Simplify
  Do not simplify interpolation expressions on implicit receivers.
  Fix local function crash + add tests
  Substituted symbol equality (dotnet#41123)
  Fix test failures
  Rename from IncludeNonNullableReferenceTypeModifier to IncludeNotNullableReferenceTypeModifier (dotnet#41332)
  Set TEMP environment variable to $TempDir on CI machines (dotnet#41361)
  Document placeholders
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Feature - Nullable Reference Types Nullable Reference Types Test Test failures in roslyn-CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing nullable warning in generic methods
2 participants