Disallow types named 'scoped'#62968
Merged
jcouv merged 1 commit intodotnet:release/dev17.4from Jul 28, 2022
Merged
Conversation
Member
|
All lowercase types are already disallowed, no? |
Member
Author
We only produce a warning wave warning for those. So we escalate to an error when we actually start using a lowercase word as contextual keyword. |
Youssef1313
reviewed
Jul 27, 2022
| @@ -478,7 +478,8 @@ internal static void ReportReservedTypeName(string? name, CSharpCompilation comp | |||
|
|
|||
| if (reportIfContextual(SyntaxKind.RecordKeyword, MessageID.IDS_FeatureRecords, ErrorCode.WRN_RecordNamedDisallowed) | |||
Member
There was a problem hiding this comment.
Curious why records is warning and other contextual keywords are errors?
Member
Author
There was a problem hiding this comment.
Would have to dig up the PR and/or LDM notes. Most likely this was evolution of our philosophy towards such breaks. Records came before we added the warning wave warning.
333fred
approved these changes
Jul 27, 2022
cston
approved these changes
Jul 27, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #62931
The breaking change was documented in https://github.com/dotnet/roslyn/pull/62788/files#diff-b58628cb08a707ff68b2546a1ad0ddf3a900aebb0ba899063c3ffe0a8ae7f07d
Relates to test plan #59194