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

t is null with LangVersion 7 should produce a diagnostic #34695

Merged
merged 1 commit into from
Apr 6, 2019

Conversation

gafter
Copy link
Member

@gafter gafter commented Apr 2, 2019

Fixes #34678

@gafter gafter added this to the 16.1 milestone Apr 2, 2019
@gafter gafter self-assigned this Apr 2, 2019
@gafter gafter marked this pull request as ready for review April 5, 2019 00:37
@gafter gafter requested review from a team as code owners April 5, 2019 00:37
@@ -31,6 +31,7 @@ internal class CSharpUpgradeProjectCodeFixProvider : AbstractUpgradeProjectCodeF
"CS8371", // warning CS8371: Field-targeted attributes on auto-properties are not supported in language version 7.2. Please use language version 7.3 or greater.
"CS8400", // error CS8400: Feature is not available in C# 8.0. Please use language version X or greater.
"CS8401", // error CS8401: To use '@$' instead of '$@" for a verbatim interpolated string, please use language version 8.0 or greater.
"CS8511", // error CS8511: An expression of type 'T' cannot be handled by a pattern of type '<null>'. Please use language version 'preview' or greater to match an open type with a constant pattern.
Copy link
Member

Choose a reason for hiding this comment

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

Is your comment here right that it should say please use 'preview' or greater?

Copy link
Member Author

Choose a reason for hiding this comment

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

During preview, yes. Eventually, when C# 8 is release, it would say 8.0.

@gafter
Copy link
Member Author

gafter commented Apr 5, 2019

@dotnet/roslyn-compiler @agocke Can you review this please?

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.

LGTM

Copy link
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:

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