By the way, I also get NullReferenceException with my nearby code.
Here is the detailed stack trace, I'm looking for a short reproductible case:
- Code: Select all
[cobra] Binding use directives
[cobra] Binding inheritance
[cobra] Binding interface
[cobra] Binding implementation
[cobra]
[cobra] Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
[cobra] at TypeExpr.WriteSharpDef(SharpWriter sw, Boolean parens) in c:\home\dev\src\dotnet\projects\cobralanguage\Source\Expr.cobra:line 3587
[cobra] at DotExpr._writeSharpDef(SharpWriter sw) in c:\home\dev\src\dotnet\projects\cobralanguage\Source\BinaryOpExpr.cobra:line 4408
[cobra] at BinaryOpExpr.WriteSharpDef(SharpWriter sw, Boolean parens) in c:\home\dev\src\dotnet\projects\cobralanguage\Source\BinaryOpExpr.cobra:line 3961
[cobra] at Expr.WriteSharpDef(SharpWriter sw) in c:\home\dev\src\dotnet\projects\cobralanguage\Source\Expr.cobra:line 2996
[cobra] at Expr.WriteSharpDefInContext(SharpWriter sw, Boolean parens) in c:\home\dev\src\dotnet\projects\cobralanguage\Source\Expr.cobra:line 2985
[cobra] at Expr.WriteSharpDefInContext(SharpWriter sw) in c:\home\dev\src\dotnet\projects\cobralanguage\Source\Expr.cobra:line 2967
[cobra] at AttributeDecl.WriteSharpDef(SharpWriter sw, String prefix) in c:\home\dev\src\dotnet\projects\cobralanguage\Source\Attributes.cobra:line 4574
[cobra] at AssemblyDecl.WriteSharpDef(SharpWriter sw) in c:\home\dev\src\dotnet\projects\cobralanguage\Source\Attributes.cobra:line 4586
[cobra] at NameSpace.WriteSharpDef(SharpWriter sw) in c:\home\dev\src\dotnet\projects\cobralanguage\Source\NameSpace.cobra:line 609
[cobra] at CobraModule.WriteSharpDef() in c:\home\dev\src\dotnet\projects\cobralanguage\Source\Module.cobra:line 464
[cobra] at Compiler.WriteSharp() in c:\home\dev\src\dotnet\projects\cobralanguage\Source\Compiler.cobra:line 46
[cobra] at ClrBackEnd.GenerateCode(Boolean writeTestInvocation) in c:\home\dev\src\dotnet\projects\cobralanguage\Source\BackEndClr\backendclr\SharpGenerator.cobra:line 21
[cobra] at Compiler._compileFilesNamed(IList`1 paths, Boolean writeTestInvocation, Boolean stopAfterBindInt) in c:\home\dev\src\dotnet\projects\cobralanguage\Source\Compiler.cobra:line 309
[cobra] at Compiler.CompileFilesNamed(IList`1 paths, Boolean writeTestInvocation, Boolean stopAfterBindInt) in c:\home\dev\src\dotnet\projects\cobralanguage\Source\Compiler.cobra:line 264
[cobra] at CommandLine.DoCompile(List`1 paths, Boolean willPrintSuccessMsg, Boolean writeTestInvocation, Boolean stopAfterBindInt) in c:\home\dev\src\dotnet\projects\cobralanguage\Source\CommandLine.cobra:line 570
[cobra] at CommandLine.DoCompile(List`1 paths) in c:\home\dev\src\dotnet\projects\cobralanguage\Source\CommandLine.cobra:line 548
[cobra] at CommandLine.Run(List`1 args) in c:\home\dev\src\dotnet\projects\cobralanguage\Source\CommandLine.cobra:line 529
[cobra] at CommandLine.Run() in c:\home\dev\src\dotnet\projects\cobralanguage\Source\CommandLine.cobra:line 485
[cobra] at CobraMain.Main() in c:\home\dev\src\dotnet\projects\cobralanguage\Source\cobra.cobra:line 13