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

Allow pattern matching null against pointer types when the pointer types contain nested type parameters #49915

Merged
merged 3 commits into from
Dec 14, 2020

Conversation

333fred
Copy link
Member

@333fred 333fred commented Dec 10, 2020

Fixes #49639.

I've gone through other references to IsNonNullableValueType, and none of them need updating. The rest of the uses center around type parameter constraint checking, which function pointers cannot be, and lifted conversion operators, where the underlying value type is being checked with this method, and function pointers cannot be that underlying type.

@333fred 333fred changed the title func ptr null comparison Allow pattern matching against function pointer types with nested type parameters Dec 10, 2020
@333fred 333fred added the Feature - Function Pointers Adding Function Pointers label Dec 10, 2020
@333fred 333fred marked this pull request as ready for review December 11, 2020 01:15
@333fred 333fred requested a review from a team as a code owner December 11, 2020 01:15
@333fred
Copy link
Member Author

333fred commented Dec 11, 2020

@dotnet/roslyn-compiler for review.

@AlekseyTs
Copy link
Contributor

AlekseyTs commented Dec 11, 2020

Done with review pass (commit 1) #Closed

@333fred
Copy link
Member Author

333fred commented Dec 11, 2020

@AlekseyTs addressed feedback.


In reply to: 743462458 [](ancestors = 743462458)

Copy link
Contributor

@AlekseyTs AlekseyTs left a comment

Choose a reason for hiding this comment

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

LGTM (commit 2). Please ensure to adjust the title to reflect the actual scope of the change when merging.

@333fred
Copy link
Member Author

333fred commented Dec 11, 2020

@dotnet/roslyn-compiler for a second review of this small change.

@333fred 333fred changed the title Allow pattern matching against function pointer types with nested type parameters Allow pattern matching null against pointer types when the pointer types contain nested type parameters Dec 14, 2020
@333fred 333fred merged commit 2c3fb8f into dotnet:master Dec 14, 2020
@333fred 333fred deleted the func-ptr-null-comparison branch December 14, 2020 23:27
@ghost ghost added this to the Next milestone Dec 14, 2020
@333fred
Copy link
Member Author

333fred commented Dec 14, 2020

Please ensure to adjust the title to reflect the actual scope of the change when merging.

Done.

333fred added a commit to 333fred/roslyn that referenced this pull request Dec 15, 2020
* upstream/master: (241 commits)
  Allow pattern matching `null` against pointer types when the pointer types contain nested type parameters (dotnet#49915)
  Remove document extension method and convert usages to use the text buffer extension method.
  VB: Strengthen implementation of `PropertySymbol.IsWritable` against NullReferenceException (dotnet#49962)
  Add switch to skip nullable analysis (dotnet#49876)
  Update dependencies from https://github.com/dotnet/roslyn build 20201211.16 (dotnet#49958)
  Treat record positional parameters as properties (dotnet#48329)
  [master] Update dependencies from dotnet/roslyn (dotnet#49395)
  VB: Ensure array access indexes undergo conversion to integer even when there is a mismatch with array rank. (dotnet#49907)
  Disable OOP when running as cloud environment client VS instance
  Rename workspace context method (and unify impls) to better represent the condition being checked
  Report non-Const locals used in an expression that must have a constant value. (dotnet#49912)
  Add support for more ServiceAudience values (dotnet#49914)
  Handle ref-containing structs returned by value from function-pointers (dotnet#49883)
  Fix error on out param of extern local function (dotnet#49860)
  Fix constructor exit warnings for generic NotNull (dotnet#49841)
  Loc updates
  Prefer more specific path map key (dotnet#49670)
  Rename `_availablelocalFunctionOrdinal` to `_availableLocalFunctionOrdinal` (dotnet#49901)
  Fix namespace so that external access wrapper type can be accessed from UT.
  XamlProjectService fixes (dotnet#49711)
  ...
@dibarbet dibarbet removed this from the Next milestone Dec 19, 2020
@dibarbet dibarbet added this to the 16.9.P3 milestone Dec 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected CS0037
5 participants