Skip to content

CS1525 "Invalid expression term '/'" at wrong line when there is other comments prior to it #31774

@Gnbrkm41

Description

@Gnbrkm41

Version Used:
Visual Studio 2017 Community 15.9.4 with ReSharper Ultimate 2018.2.3
Visual Studio 2019 16.0.0 Preview 1.1
Steps to Reproduce:

  1. Type some comments (Can be either block comments or single-line comment)
  2. Type some code with a single forward slash in front of it

Expected Behavior:
CS1525 "Invalid expression term '/'" error should be displayed at the line where the code with incomplete comment header is (i.e. division operator with nothing in front of it?)

Actual Behavior:

2018-12-14 082359
(Ignore the red squiggle on the right side, at line 33; that one's ReSharper's warning)

2018-12-14 082806

2018-12-14 082720

The warning is displayed at the end of the line prior to the comment.

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

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions