Open iam3yal opened 4 years ago
Tagging @agocke. Potentially an incremental parsing issue? @eyalsk I'm guessing if you save and close the file, and then reopen it/VS, that the error goes away?
@CyrusNajmabadi yup, seems like it, it comes and goes.
@eyalsk it looks like an extension is in use that doesn't support C# 8.0's range syntax .
@jinujoseph Okay, thank you, it would have been nice if VS could note what extension caused it.
I've disabled all of my addons which I only have a few, now, when you disable the addons the red squiggles don't disappear immediately so I need to start guessing, I find this experience unpleasant.
I repro'd the exact same thing yesterday but can't get it to repro today. I haven't updated anything.
Sounds like an incremental parsing bug somewhere
Possibly sharing a root cause with the SyntaxNode enumeration race condition? https://github.com/dotnet/roslyn/issues/41526
Tagging @agocke . I'm guessing incremental parsing bug here. Thank fully @eyalsk found a repro!
Version Used: 16.6.1
I'm not sure when it happens so can't provide reproductions steps but it happens in this section of the code.Steps to Reproduce:
Paste the following code:
Remove the opening braces from the
if
statement like so:Wait for red squiggles to appear.
Undo recent changes or add back the opening braces.
The red squiggles should still appear under the binary infix operator
..
saying "Identifier expected".Expected Behavior:
No red squiggles when the opening braces are added.
Actual Behavior:
Red squiggles but the code compiles just fine.