Skip to content

Error recovery doesn't recover at end of method with error, leading to incorrect completion list #16595

@dpoeschl

Description

@dpoeschl

Version Used: Dev15 RC2

Steps to Reproduce:

  1. Paste C# code:
class C
{
    void M()
    {
        for (int i = 0; i < 10; i++)
        {
            if ($$ BooleanMethod1())
            {
                int x = 7;
            }
        }
    }

    bool BooleanMethod1() { return true; }
    bool BooleanMethod2() { return true; }
    void InnocentMethod() { }
}
  1. Remove the $$ and start typing another boolean method name, say "Boo"

Expected: The completion list contains the three other methods in C, and error recovery doesn't go on to squiggle the other methods in C
Actual: Error recovery doesn't recover at the end of M() despite all curly braces matching up, and goes on to invalidate some of the other methods in C which should be completely unrelated

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions