-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VS crashes if xml is pasted in C# editor #16167
Labels
4 - In Review
A fix for the issue is submitted for review.
Area-Compilers
Bug
New Language Feature - Local Functions
Local Functions
Milestone
Comments
Here is a narrowed-down test case: [Fact, WorkItem(16167, "https://github.com/dotnet/roslyn/issues/16167")]
public void Bug16167Root()
{
var text = @"
using System;
using System.Collections.Generic;
using System.Linq;
class C
{
public static void Main(string[] args)
{
void Local1(bool b = args is string[] z1) {}
void Local2(bool b = M(out int z2)) {}
void Local3((int, int) ii = ((int a1, int a2) = (1, 2)) {}
}
public static M(out int z) z = 1;
}
";
var compilation = CreateCompilationWithMscorlib45(text);
var tree = compilation.SyntaxTrees[0];
var model = compilation.GetSemanticModel(tree);
foreach (var node in tree.GetRoot().DescendantNodes())
{
var _ = model.GetSymbolInfo(node);
}
} |
gafter
added a commit
to gafter/roslyn
that referenced
this issue
Jan 7, 2017
…re given a scope Fixes dotnet#16167
gafter
added
4 - In Review
A fix for the issue is submitted for review.
and removed
3 - Working
labels
Jan 7, 2017
gafter
added a commit
to gafter/roslyn
that referenced
this issue
Jan 12, 2017
…re given a scope Fixes dotnet#16167
This was also hit by the following Watson issue https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems?_a=edit&id=363720&triage=true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
4 - In Review
A fix for the issue is submitted for review.
Area-Compilers
Bug
New Language Feature - Local Functions
Local Functions
Version Used:
Steps to Reproduce:
Main
Expected Behavior:
Sea of red in the editor.
Actual Behavior:
VS crashes:
The text was updated successfully, but these errors were encountered: