From a8a78da710b3c6e34dc29f3364b554c42e4aee80 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 12 Jun 2016 21:08:39 +0900 Subject: [PATCH] Fix generics issue in ConvertConstructorCallIntoInitializerVisitor: use non-specialized fields for comparison --- .../CSharp/Transforms/ConvertConstructorCallIntoInitializer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler/CSharp/Transforms/ConvertConstructorCallIntoInitializer.cs b/ICSharpCode.Decompiler/CSharp/Transforms/ConvertConstructorCallIntoInitializer.cs index a87c2b86a..b88b3622b 100644 --- a/ICSharpCode.Decompiler/CSharp/Transforms/ConvertConstructorCallIntoInitializer.cs +++ b/ICSharpCode.Decompiler/CSharp/Transforms/ConvertConstructorCallIntoInitializer.cs @@ -128,7 +128,7 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms if (!m.Success) break; - IField field = m.Get("fieldAccess").Single().GetSymbol() as IField; + IField field = (m.Get("fieldAccess").Single().GetSymbol() as IField)?.MemberDefinition as IField; if (field == null) break; AstNode fieldOrEventDecl = members.FirstOrDefault(f => f.GetSymbol() == field);