From 51430bccb2d0eb7cfb66b1334e3dd52e4ffab434 Mon Sep 17 00:00:00 2001 From: Jb Evain Date: Fri, 16 Dec 2011 15:11:39 +0100 Subject: [PATCH] Annotate struct creations with the Cecil constructor reference --- ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs b/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs index 6e9524fd3..d396af93b 100644 --- a/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs +++ b/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs @@ -999,6 +999,7 @@ namespace ICSharpCode.Decompiler.Ast // This is equivalent to 'target = new ValueType(args);'. ObjectCreateExpression oce = new ObjectCreateExpression(); oce.Type = AstBuilder.ConvertType(cecilMethod.DeclaringType); + oce.AddAnnotation(cecilMethod); AdjustArgumentsForMethodCall(cecilMethod, methodArgs); oce.Arguments.AddRange(methodArgs); return new AssignmentExpression(target, oce);