Skip to content

Incremental parsing breaks and crashes VS when adding using variable declaration with incorrect modifiers #36413

@tmat

Description

@tmat

Start with the following code:

namespace N
{
    public class C
    {
        public void F()
        { 
           public readonly int Temp = 0;
           var z = 1;
        }
    }
}

Then type using in front of public readonly int Temp = 0;.

namespace N
{
    public class C
    {
       
        public void F()
        { 
          using public readonly int Temp = 0;
          var z = 1;
        }
    }
}

VS crashes.

Metadata

Metadata

Assignees

Labels

Area-CompilersTenet-ReliabilityCustomer telemetry indicates that the product is failing in a crash/hang/dataloss manner.

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