NullReferenceException in return
statements on void
methods
#264
Labels
Milestone
return
statements on void
methods
#264
Error
System.NullReferenceException: Object reference not set to an instance of an object.
at Cecilifier.Core.AST.ExpressionVisitor.VisitReturnStatement(ReturnStatementSyntax node) in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Core/AST/ExpressionVisitor.cs:line 144
at Microsoft.CodeAnalysis.CSharp.Syntax.ReturnStatementSyntax.Accept(CSharpSyntaxVisitor visitor)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node)
at Cecilifier.Core.AST.ExpressionVisitor.Visit(IVisitorContext ctx, String ilVar, SyntaxNode node) in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Core/AST/ExpressionVisitor.cs:line 128
at Cecilifier.Core.AST.StatementVisitor.VisitReturnStatement(ReturnStatementSyntax node) in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Core/AST/StatementVisitor.cs:line 173
at Microsoft.CodeAnalysis.CSharp.Syntax.ReturnStatementSyntax.Accept(CSharpSyntaxVisitor visitor)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node)
at Cecilifier.Core.AST.StatementVisitor.Visit(SyntaxNode node) in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Core/AST/StatementVisitor.cs:line 37
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.DefaultVisit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor.VisitBlock(BlockSyntax node)
at Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax.Accept(CSharpSyntaxVisitor visitor)
at Cecilifier.Core.AST.StatementVisitor.Visit(IVisitorContext context, String ilVar, CSharpSyntaxNode node) in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Core/AST/StatementVisitor.cs:line 28
at Cecilifier.Core.AST.MethodDeclarationVisitor.VisitBlock(BlockSyntax node) in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Core/AST/MethodDeclarationVisitor.cs:line 57
at Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax.Accept(CSharpSyntaxVisitor visitor)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.DefaultVisit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor.VisitMethodDeclaration(MethodDeclarationSyntax node)
at Cecilifier.Core.AST.MethodDeclarationVisitor.<>n__1(MethodDeclarationSyntax node)
at Cecilifier.Core.AST.MethodDeclarationVisitor.<>c__DisplayClass5_0.b__0(String _) in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Core/AST/MethodDeclarationVisitor.cs:line 70
at Cecilifier.Core.AST.SyntaxWalkerBase.WithCurrentMethod(String declaringTypeName, String localVariable, String methodName, String[] paramTypes, Action
1 action) in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Core/AST/SyntaxWalkerBase.cs:line 253 at Cecilifier.Core.AST.MethodDeclarationVisitor.ProcessMethodDeclarationInternal(SyntaxNode node, String declaringTypeName, String variableName, IMethodSymbol methodSymbol, SyntaxTokenList modifiersTokens, String simpleName, String methodName, Boolean refReturn, Action
1 runWithCurrent, SyntaxList1 attributes, SeparatedSyntaxList
1 parameters, IList1 typeParameters) in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Core/AST/MethodDeclarationVisitor.cs:line 168 at Cecilifier.Core.AST.MethodDeclarationVisitor.ProcessMethodDeclaration[T](T node, String variableName, String simpleName, String fqName, Boolean refReturn, Action
1 runWithCurrent, IList`1 typeParameters) in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Core/AST/MethodDeclarationVisitor.cs:line 198at Cecilifier.Core.AST.MethodDeclarationVisitor.VisitMethodDeclaration(MethodDeclarationSyntax node) in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Core/AST/MethodDeclarationVisitor.cs:line 64
at Microsoft.CodeAnalysis.CSharp.Syntax.MethodDeclarationSyntax.Accept(CSharpSyntaxVisitor visitor)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node)
at Cecilifier.Core.AST.TypeDeclarationVisitor.VisitMethodDeclaration(MethodDeclarationSyntax node) in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Core/AST/TypeDeclarationVisitor.cs:line 92
at Microsoft.CodeAnalysis.CSharp.Syntax.MethodDeclarationSyntax.Accept(CSharpSyntaxVisitor visitor)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.DefaultVisit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor.VisitClassDeclaration(ClassDeclarationSyntax node)
at Cecilifier.Core.AST.TypeDeclarationVisitor.VisitClassDeclaration(ClassDeclarationSyntax node) in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Core/AST/TypeDeclarationVisitor.cs:line 41
at Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax.Accept(CSharpSyntaxVisitor visitor)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node)
at Cecilifier.Core.AST.CompilationUnitVisitor.VisitDeclaredTypesSortedByDependencies() in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Core/AST/CompilationUnitVisitor.cs:line 60
at Cecilifier.Core.AST.CompilationUnitVisitor.VisitCompilationUnit(CompilationUnitSyntax node) in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Core/AST/CompilationUnitVisitor.cs:line 22
at Microsoft.CodeAnalysis.CSharp.Syntax.CompilationUnitSyntax.Accept(CSharpSyntaxVisitor visitor)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node)
at Cecilifier.Core.Cecilifier.Process(Stream content, CecilifierOptions options) in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Core/Cecilifier.cs:line 51
at Cecilifier.Web.Startup.ProcessWebSocketAsync(WebSocket webSocket, Int32 remoteIpAddressHashCode, Byte[] buffer) in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Web/Startup.cs:line 205
at Cecilifier.Web.Startup.ProcessWebSocketAsync(WebSocket webSocket, Int32 remoteIpAddressHashCode, Byte[] buffer) in /home/adriano/Projects/study/DotNet/Cecilifier/Cecilifier.Web/Startup.cs:line 235
Associated snippet:
The text was updated successfully, but these errors were encountered: