Skip to content

Warn on __refvalue null dereference:#34135

Merged
chsienki merged 2 commits intodotnet:masterfrom
chsienki:refvalue_nullable
Mar 15, 2019
Merged

Warn on __refvalue null dereference:#34135
chsienki merged 2 commits intodotnet:masterfrom
chsienki:refvalue_nullable

Conversation

@chsienki
Copy link
Copy Markdown
Member

  • Store the nullable annotation of the type passed to __refvalue
  • Use that information in nullable walker to report nullability warnings
  • Add test

Fixes #32446

@chsienki chsienki added this to the 16.1.P1 milestone Mar 14, 2019
@chsienki chsienki marked this pull request as ready for review March 15, 2019 02:39
@chsienki chsienki requested a review from a team as a code owner March 15, 2019 02:39
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: Null="disallow" could be removed, as it does not improve the generated code.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

#nullable enable is unnecessary, since you already have options: WithNonNullTypesTrue()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: empty line below

Copy link
Copy Markdown
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks (iteration 1)

@jcouv jcouv self-assigned this Mar 15, 2019
Copy link
Copy Markdown
Member

@jaredpar jaredpar left a comment

Choose a reason for hiding this comment

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

:shipit:

- Store the nullable annotation of the type passed to __refvalue
- Use that information in nullable walker to report nullability warnings
- Add test
@chsienki chsienki force-pushed the refvalue_nullable branch from 594e689 to 0da1d48 Compare March 15, 2019 18:40
@chsienki chsienki merged commit 5277d32 into dotnet:master Mar 15, 2019
333fred added a commit to 333fred/roslyn that referenced this pull request Mar 19, 2019
* dotnet/master: (345 commits)
  Update indexers based on analyzer receiver (dotnet#34134)
  Skip test DecimalBinaryOp_03 (dotnet#34199)
  Remove earlier nullable documentation (dotnet#34153)
  Rewrite FindReferencesTests as theories
  Apply a hang mitigating timeout to ExecuteCommand
  Warn on __refvalue null dereference: (dotnet#34135)
  Update dependencies from https://github.com/dotnet/arcade build 20190312.7 (dotnet#34112)
  Update vs branch for 16.1
  Fix struct layout error when nullable enabled: (dotnet#34128)
  Remove IgnoreInsignificantNullableModifiersDifference (dotnet#34096)
  Add the correct nullable annotations to generated iterator code (dotnet#33986)
  Move Rename implementation to new fully loaded document API.
  handle encapsulate field command
  change the way extract method handle partial load
  handle orangize document
  Add back Go to definition method.
  Revert "Move Go to definition to new fully loaded document API."
  Revert "Move Find references implementation to new fully loaded document API."
  Move Find references implementation to new fully loaded document API.
  Track nullable state across boxing conversions (dotnet#34087)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants