-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Area-CompilersConcept-Diagnostic ClarityThe issues deals with the ease of understanding of errors and warnings.The issues deals with the ease of understanding of errors and warnings.
Description
Version Used:
Microsoft Visual Studio Community 2019 Preview
Version 16.8.0 Preview 3.1
C# Tools 3.8.0-3.20458.6+b446afd34759150c2ea3b86ab794104e12e64db1
Steps to Reproduce:
- Write code:
class X
{
partial public string Foo();
}- Observe CS0267 on
partialmodifier. - Be confused by error message.
Expected Behavior:
Error message communicating invalid partial placement taking new partial methods (non-void) into account. I don't have a good proposal, but maybe addition of 'or method return type' would be enough.
Actual Behavior:
CS0267 says
The partial modifier can only appear immediately before 'class', 'record', 'struct', 'interface' or 'void'
It misses the non-void return type allowed on C#9 partial methods.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-CompilersConcept-Diagnostic ClarityThe issues deals with the ease of understanding of errors and warnings.The issues deals with the ease of understanding of errors and warnings.