-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Support Object type as a generic type constraint. #29809
Changes from all commits
25fd08a
426225b
941531b
f1636e4
ebeea03
1bb5763
00f0b8a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,6 +163,7 @@ internal enum MessageID | |
IDS_FeatureIndexingMovableFixedBuffers = MessageBase + 12744, | ||
|
||
IDS_InjectedDeclaration = MessageBase + 12745, | ||
IDS_FeatureObjectGenericTypeConstraint = MessageBase + 12746, | ||
} | ||
|
||
// Message IDs may refer to strings that need to be localized. | ||
|
@@ -204,6 +205,7 @@ internal static LanguageVersion RequiredVersion(this MessageID feature) | |
{ | ||
// C# 8 features. | ||
case MessageID.IDS_FeatureStaticNullChecking: // syntax and semantic check | ||
case MessageID.IDS_FeatureObjectGenericTypeConstraint: // semantic check | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Why use a separate feature? I expected this would be part of the nullable reference types feature. #Closed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think it is better to keep this as a separate feature, like other new constraints that syntactically aren't tied to nullable feature (don't use In reply to: 217125534 [](ancestors = 217125534) |
||
return LanguageVersion.CSharp8; | ||
|
||
// C# 7.3 features. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is moved as is from Symbol #ByDesign