Last active
February 16, 2016 23:38
-
-
Save jcouv/055d1ee3730d3cf4686b to your computer and use it in GitHub Desktop.
Repro for stack overflow issue: https://github.com/dotnet/roslyn/issues/6536
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Fact] | |
public void TestStackOverflow() | |
{ | |
var longCode = ""; | |
for (var i = 0; i<3000; i++) | |
{ | |
longCode += @"""asdf"" + "; | |
} | |
var code = @"class Foo | |
{ | |
void Bar() | |
{ | |
string test = " + longCode + @" | |
} | |
}"; | |
var tree = SyntaxFactory.ParseSyntaxTree(code); | |
var position = 4000; | |
var trivia = tree.GetCompilationUnitRoot().FindTrivia(position); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment