Skip to content

CS0201 (Only assignment, call....) doesn't mention await #27180

@Neme12

Description

@Neme12

The old compiler used to report:
Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement

Roslyn:
Only assignment, call, increment, decrement, and new object expressions can be used as a statement

reported here: https://stackoverflow.com/questions/50514829/why-a-declaration-doesnt-give-a-cs0201-compiler-error/50515400#answer-50515400

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-CompilersBugConcept-Diagnostic ClarityThe issues deals with the ease of understanding of errors and warnings.help wantedThe issue is "up for grabs" - add a comment if you are interested in working on it

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions