Skip to content

[release/6.0.2xx] Fix invalid cast of type parameter - #2643

Merged
agocke merged 1 commit into
dotnet:release/6.0.2xxfrom
sbomer:fixInvalidCast
Feb 24, 2022
Merged

[release/6.0.2xx] Fix invalid cast of type parameter#2643
agocke merged 1 commit into
dotnet:release/6.0.2xxfrom
sbomer:fixInvalidCast

Conversation

@sbomer

@sbomer sbomer commented Feb 22, 2022

Copy link
Copy Markdown
Member

Brings the fix @agocke made as part of #2540 to 6.0.2. Fixes #2642.

Customer Impact

Updating VS from 17 to 17.1 brings in a 6.0.2 SDK which causes the analyzer to crash on a project that previously worked, producing a warning. The warning also shows up in CI when using the 6.0.2 SDK, and fails the build with warnaserror. See details in #2642.

Testing

Unit tests confirmed the issue and the fix. This was originally discovered as part of running the analyzer over itself and the linker in #2523.

Risk

Very low risk - this turns a cast to a type check, and skips the case which used to throw an InvalidCastException.

@sbomer
sbomer requested a review from marek-safar as a code owner February 22, 2022 21:15
@sbomer
sbomer requested review from agocke and vitek-karas February 22, 2022 21:15

@jeffschwMSFT jeffschwMSFT left a comment

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.

Approved. We should take for consideration in 6.0.2xx

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.

5 participants