System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.SyntaxParser.AddError[TNode](TNode node, ErrorCode code, Object[] args)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ConsumeUnexpectedTokens[TNode](TNode node)
at Microsoft.CodeAnalysis.CSharp.SyntaxFactory.ParseStatement(String text, Int32 offset, ParseOptions options, Boolean consumeFullText)
at QuoterService.Controllers.QuoterController.Get(String sourceText, NodeKind nodeKind, Boolean openCurlyOnNewLine, Boolean closeCurlyOnNewLine, Boolean preserveOriginalWhitespace, Boolean keepRedundantApiCalls, Boolean avoidUsingStatic)
public static class Doubler { public static int Double(int a) { return 2 * a; } }
Congratulations! You've found a bug in Quoter! Please open an issue at https://github.com/KirillOsenkov/RoslynQuoter/issues/new and paste the code you've typed above and this stack:
System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.SyntaxParser.AddError[TNode](TNode node, ErrorCode code, Object[] args) at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ConsumeUnexpectedTokens[TNode](TNode node) at Microsoft.CodeAnalysis.CSharp.SyntaxFactory.ParseStatement(String text, Int32 offset, ParseOptions options, Boolean consumeFullText) at QuoterService.Controllers.QuoterController.Get(String sourceText, NodeKind nodeKind, Boolean openCurlyOnNewLine, Boolean closeCurlyOnNewLine, Boolean preserveOriginalWhitespace, Boolean keepRedundantApiCalls, Boolean avoidUsingStatic)