Skip to content

Switch 'use auto prop' to use NRT and make us more null safe.#46194

Merged
CyrusNajmabadi merged 1 commit intodotnet:masterfrom
CyrusNajmabadi:nrtUseAutoProp
Jul 22, 2020
Merged

Switch 'use auto prop' to use NRT and make us more null safe.#46194
CyrusNajmabadi merged 1 commit intodotnet:masterfrom
CyrusNajmabadi:nrtUseAutoProp

Conversation

@CyrusNajmabadi
Copy link
Contributor

Fixes #46102

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner July 21, 2020 20:23
Comment on lines 17 to +21
internal abstract class AbstractUseAutoPropertyAnalyzer<
TPropertyDeclaration, TFieldDeclaration, TVariableDeclarator, TExpression> : AbstractBuiltInCodeStyleDiagnosticAnalyzer
TPropertyDeclaration,
TFieldDeclaration,
TVariableDeclarator,
TExpression> : AbstractBuiltInCodeStyleDiagnosticAnalyzer
Copy link
Contributor

Choose a reason for hiding this comment

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

This is rough. It would be more readable like this:

internal abstract class AbstractUseAutoPropertyAnalyzer<TPropertyDeclaration, TFieldDeclaration, TVariableDeclarator, TExpression>
    : AbstractBuiltInCodeStyleDiagnosticAnalyzer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

wrapped type parameters are used a fair bit in the codebase.

Copy link
Contributor

@sharwell sharwell Jul 22, 2020

Choose a reason for hiding this comment

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

I'm only referring to this location, which changed as part of this pull request from a more readable form to a less readable form. A simple revert of this change would be equally acceptable, if not preferred.

@sharwell
Copy link
Contributor

Were you able to reproduce the failure in a test?

@CyrusNajmabadi
Copy link
Contributor Author

i was not. this attemps to beef up our null handling here to either remove hte issue entirely, or allow us to pinpoint where the issue is happening. the report as is is too incomplete to do anythign with.

Copy link
Member

@genlu genlu left a comment

Choose a reason for hiding this comment

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

:shipit:

@CyrusNajmabadi CyrusNajmabadi merged commit 4ac6c62 into dotnet:master Jul 22, 2020
@ghost ghost added this to the Next milestone Jul 22, 2020
@CyrusNajmabadi CyrusNajmabadi deleted the nrtUseAutoProp branch July 22, 2020 18:44
@RikkiGibson RikkiGibson modified the milestones: Next, 16.8.P2 Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NRE from UseAutoProperty.AbstractUseAutoPropertyCodeFixProvider`5.<ProcessResultAsync>

5 participants