Open svick opened 5 years ago
Possible duplicate of #23330
Hey! I'm trying to repro this bug on master Commit hash: f09c4b76a42616dd04ee9aef5510d1a3082e35ab and on my local Version 16.7.2 whichever Roslyn that is and it doesn't seem to repro
EDIT: My bad. Still repros
Version Used: 2.9.0, 2.11.0-beta3-63513-06
Steps to Reproduce:
Run the following code:
Expected Behavior:
Both syntax trees report the missing semicolon error just after the closing parenthesis on line 5. In other words, in both cases, the reported location should be (5,12).
Actual Behavior:
In the second syntax tree, the reported location is (5, 10), i.e. on the opening parenthesis:
I think this happens because the
SyntaxDiagnosticInfo
is created with offset of -2 when the tree is parsed, which works correctly for the original tree. But when the whitespace is updated, the offset causes the incorrect location.