{"action":"created","issue":{"url":"https://api.github.com/repos/AlexAlbala/Alter-Native/issues/6","repository_url":"https://api.github.com/repos/AlexAlbala/Alter-Native","labels_url":"https://api.github.com/repos/AlexAlbala/Alter-Native/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/AlexAlbala/Alter-Native/issues/6/comments","events_url":"https://api.github.com/repos/AlexAlbala/Alter-Native/issues/6/events","html_url":"https://github.com/AlexAlbala/Alter-Native/issues/6","id":167244897,"number":6,"title":"Simple .NET C# Hello World Doesn't Translate.","user":{"login":"DLLarson","id":175455,"avatar_url":"https://avatars.githubusercontent.com/u/175455?v=3","gravatar_id":"","url":"https://api.github.com/users/DLLarson","html_url":"https://github.com/DLLarson","followers_url":"https://api.github.com/users/DLLarson/followers","following_url":"https://api.github.com/users/DLLarson/following{/other_user}","gists_url":"https://api.github.com/users/DLLarson/gists{/gist_id}","starred_url":"https://api.github.com/users/DLLarson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DLLarson/subscriptions","organizations_url":"https://api.github.com/users/DLLarson/orgs","repos_url":"https://api.github.com/users/DLLarson/repos","events_url":"https://api.github.com/users/DLLarson/events{/privacy}","received_events_url":"https://api.github.com/users/DLLarson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-24T17:51:04Z","updated_at":"2016-09-21T07:00:34Z","closed_at":null,"body":"Hi,\r\n\r\nI've been looking at this project to see how well it works but it seems to fail with almost any of our .NET 2.0 assemblies we tried it with. \r\n\r\nAfter some debugging I narrowed it down to Nullable types. As an example, this simple program will not translate:\r\n\r\npublic class Hello1\r\n{\r\n   public static void Main()\r\n   {\r\n      bool? foobar;\r\n      foobar = true;\r\n      System.Console.WriteLine(\"Hello, World! The nullable is: \" + foobar);\r\n   }\r\n}\r\n\r\nIt kicks out an error...\r\nExecuting alternative command --> translate\r\nLoaded Assembly HelloNullable, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null\r\nfoobar/ does not exists. Created\r\nDecompiling assembly: HelloNullable, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null\r\nOutput language is C++\r\nalternative: \r\nbool?\r\n  at ICSharpCode.NRefactory.Cpp.Resolver.GetTypeName (ICSharpCode.NRefactory.Cpp.Ast.AstType type) <0x41728b20 + 0x002d7> in <filename unknown>:0 \r\n  at ICSharpCode.NRefactory.Cpp.Visitors.CSharpToCppConverterVisitor.ICSharpCode.NRefactory.CSh\r\n:    \r\n: \r\n  at AlterNative.Program.DecompileAssembly (Mono.Cecil.AssemblyDefinition adef, System.String outputDir, System.String location) <0x41608ed0 + 0x0049e> in <filename unknown>:0 \r\n  at AlterNative.Program.Run () <0x415fee20 + 0x0040b> in <filename unknown>:0 \r\n\r\nDale\r\n"},"comment":{"url":"https://api.github.com/repos/AlexAlbala/Alter-Native/issues/comments/248528056","html_url":"https://github.com/AlexAlbala/Alter-Native/issues/6#issuecomment-248528056","issue_url":"https://api.github.com/repos/AlexAlbala/Alter-Native/issues/6","id":248528056,"user":{"login":"malarinv","id":6194663,"avatar_url":"https://avatars.githubusercontent.com/u/6194663?v=3","gravatar_id":"","url":"https://api.github.com/users/malarinv","html_url":"https://github.com/malarinv","followers_url":"https://api.github.com/users/malarinv/followers","following_url":"https://api.github.com/users/malarinv/following{/other_user}","gists_url":"https://api.github.com/users/malarinv/gists{/gist_id}","starred_url":"https://api.github.com/users/malarinv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malarinv/subscriptions","organizations_url":"https://api.github.com/users/malarinv/orgs","repos_url":"https://api.github.com/users/malarinv/repos","events_url":"https://api.github.com/users/malarinv/events{/privacy}","received_events_url":"https://api.github.com/users/malarinv/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T07:00:34Z","updated_at":"2016-09-21T07:00:34Z","body":"Thanks for this great project!. \r\nI got a similar exception when converting to c++\r\n\r\n```\r\nExecuting alternative command --> translate\r\nLoaded Assembly P2Engine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null\r\nDecompiling assembly: P2Engine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null\r\nOutput language is C++\r\nAdding /Users/malar/Public/Devel/Alter-Native to resolver search directories\r\nalternative: \r\nSpecified argument was out of the range of valid values.\r\nParameter name: index\r\n  at System.Linq.Enumerable.ElementAt[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Int32 index) [0x00054] in <63992662b765477a898ef49cdcc99ee2>:0 \r\n  at ICSharpCode.NRefactory.Cpp.Visitors.CSharpToCppConverterVisitor.ICSharpCode.NRefactory.CSharp.IAstVisitor<object,ICSharpCode.NRefactory.Cpp.AstNode>.VisitBaseReferenceExpression (ICSharpCode.NRefactory.CSharp.BaseReferenceExpression baseReferenceExpression, System.Object data) [0x0000c] in <a531d3b57da34992a13c1153174e6c8f>:0 \r\n  at ICSharpCode.NRefactory.CSharp.BaseReferenceExpression.AcceptVisitor[T,S] (ICSharpCode.NRefactory.CSharp.IAstVisitor`2[T,S] visitor, T data) [0x00001] in <c550f08c0d684eaa9637cb8030c663d6>:0 \r\n  at ICSharpCode.NRefactory.Cpp.Visitors.CSharpToCppConverterVisitor.ICSharpCode.NRefactory.CSharp.IAstVisitor<object,ICSharpCode.NRefactory.Cpp.AstNode>.VisitMemberReferenceExpression (ICSharpCode.NRefactory.CSharp.MemberReferenceExpression memberReferenceExpression, System.Object data) [0x0000e] in <a531d3b57da34992a13c1153174e6c8f>:0 \r\n  at ICSharpCode.NRefactory.CSharp.MemberReferenceExpression.AcceptVisitor[T,S] (ICSharpCode.NRefactory.CSharp.IAstVisitor`2[T,S] visitor, T data) [0x00001] in <c550f08c0d684eaa9637cb8030c663d6>:0 \r\n  at ICSharpCode.NRefactory.Cpp.Visitors.CSharpToCppConverterVisitor.ICSharpCode.NRefactory.CSharp.IAstVisitor<object,ICSharpCode.NRefactory.Cpp.AstNode>.VisitInvocationExpression (ICSharpCode.NRefactory.CSharp.InvocationExpression invocationExpression, System.Object data) [0x00101] in <a531d3b57da34992a13c1153174e6c8f>:0 \r\n  at ICSharpCode.NRefactory.CSharp.InvocationExpression.AcceptVisitor[T,S] (ICSharpCode.NRefactory.CSharp.IAstVisitor`2[T,S] visitor, T data) [0x00001] in <c550f08c0d684eaa9637cb8030c663d6>:0 \r\n  at ICSharpCode.NRefactory.Cpp.Visitors.CSharpToCppConverterVisitor.ICSharpCode.NRefactory.CSharp.IAstVisitor<object,ICSharpCode.NRefactory.Cpp.AstNode>.VisitExpressionStatement (ICSharpCode.NRefactory.CSharp.ExpressionStatement expressionStatement, System.Object data) [0x00007] in <a531d3b57da34992a13c1153174e6c8f>:0 \r\n  at ICSharpCode.NRefactory.CSharp.ExpressionStatement.AcceptVisitor[T,S] (ICSharpCode.NRefactory.CSharp.IAstVisitor`2[T,S] visitor, T data) [0x00001] in <c550f08c0d684eaa9637cb8030c663d6>:0 \r\n  at ICSharpCode.NRefactory.Cpp.Visitors.CSharpToCppConverterVisitor.ConvertNodes[T] (System.Collections.Generic.IEnumerable`1[T] nodes, ICSharpCode.NRefactory.Cpp.AstNodeCollection`1[T] result) [0x00016] in <a531d3b57da34992a13c1153174e6c8f>:0 \r\n  at ICSharpCode.NRefactory.Cpp.Visitors.CSharpToCppConverterVisitor.ICSharpCode.NRefactory.CSharp.IAstVisitor<object,ICSharpCode.NRefactory.Cpp.AstNode>.VisitBlockStatement (ICSharpCode.NRefactory.CSharp.BlockStatement blockStatement, System.Object data) [0x0001b] in <a531d3b57da34992a13c1153174e6c8f>:0 \r\n  at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor[T,S] (ICSharpCode.NRefactory.CSharp.IAstVisitor`2[T,S] visitor, T data) [0x00001] in <c550f08c0d684eaa9637cb8030c663d6>:0 \r\n  at ICSharpCode.NRefactory.Cpp.Visitors.CSharpToCppConverterVisitor.ICSharpCode.NRefactory.CSharp.IAstVisitor<object,ICSharpCode.NRefactory.Cpp.AstNode>.VisitConstructorDeclaration (ICSharpCode.NRefactory.CSharp.ConstructorDeclaration constructorDeclaration, System.Object data) [0x0005c] in <a531d3b57da34992a13c1153174e6c8f>:0 \r\n  at ICSharpCode.NRefactory.CSharp.ConstructorDeclaration.AcceptVisitor[T,S] (ICSharpCode.NRefactory.CSharp.IAstVisitor`2[T,S] visitor, T data) [0x00001] in <c550f08c0d684eaa9637cb8030c663d6>:0 \r\n  at ICSharpCode.NRefactory.Cpp.Visitors.CSharpToCppConverterVisitor.ICSharpCode.NRefactory.CSharp.IAstVisitor<object,ICSharpCode.NRefactory.Cpp.AstNode>.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration, System.Object data) [0x001df] in <a531d3b57da34992a13c1153174e6c8f>:0 \r\n  at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor[T,S] (ICSharpCode.NRefactory.CSharp.IAstVisitor`2[T,S] visitor, T data) [0x00001] in <c550f08c0d684eaa9637cb8030c663d6>:0 \r\n  at ICSharpCode.NRefactory.Cpp.Visitors.CSharpToCppConverterVisitor.ICSharpCode.NRefactory.CSharp.IAstVisitor<object,ICSharpCode.NRefactory.Cpp.AstNode>.VisitCompilationUnit (ICSharpCode.NRefactory.CSharp.CompilationUnit compilationUnit, System.Object data) [0x00020] in <a531d3b57da34992a13c1153174e6c8f>:0 \r\n  at ICSharpCode.NRefactory.CSharp.CompilationUnit.AcceptVisitor[T,S] (ICSharpCode.NRefactory.CSharp.IAstVisitor`2[T,S] visitor, T data) [0x00001] in <c550f08c0d684eaa9637cb8030c663d6>:0 \r\n  at ICSharpCode.ILSpy.Cpp.CppLanguage.RunTransformsAndGenerateCode (ICSharpCode.Decompiler.Ast.AstBuilder astBuilder, ICSharpCode.Decompiler.ITextOutput output, ICSharpCode.ILSpy.DecompilationOptions options, Mono.Cecil.ModuleDefinition module) [0x00038] in <0b7bf9b000ba4d6ebe18149d2c695fa3>:0 \r\n  at ICSharpCode.ILSpy.Cpp.CppLanguage.DecompileType (Mono.Cecil.TypeDefinition type, ICSharpCode.Decompiler.ITextOutput output, ICSharpCode.ILSpy.DecompilationOptions options) [0x00021] in <0b7bf9b000ba4d6ebe18149d2c695fa3>:0 \r\n  at AlterNative.Program.DecompileAssembly (Mono.Cecil.AssemblyDefinition adef, System.String outputDir, System.String location) [0x00162] in <93daf4e2f8a04cc4ab8ac3f986e434a0>:0 \r\n  at AlterNative.Program.Run () [0x001ce] in <93daf4e2f8a04cc4ab8ac3f986e434a0>:0 \r\n```"}}
{"actor":{"display_login":"malarinv"}}