From 76bf619c7776d2ebaf72e020e23cef80111e8581 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sun, 12 Jun 2016 15:44:26 +0200 Subject: [PATCH] Update NRefactory to fix incorrect method type arguments on calls to non-generic methods from within generic methods. --- .../TypeSystem/SpecializingDecompilerTypeSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.Decompiler/TypeSystem/SpecializingDecompilerTypeSystem.cs b/ICSharpCode.Decompiler/TypeSystem/SpecializingDecompilerTypeSystem.cs index 6b4e7b0a8..86777361d 100644 --- a/ICSharpCode.Decompiler/TypeSystem/SpecializingDecompilerTypeSystem.cs +++ b/ICSharpCode.Decompiler/TypeSystem/SpecializingDecompilerTypeSystem.cs @@ -51,7 +51,7 @@ namespace ICSharpCode.Decompiler public IField Resolve(Mono.Cecil.FieldReference fieldReference) { IField field = context.Resolve(fieldReference); - if (field != null && field.Substitution != TypeParameterSubstitution.Identity) + if (field != null) field = (IField)field.Specialize(substitution); return field; } @@ -59,7 +59,7 @@ namespace ICSharpCode.Decompiler public IMethod Resolve(Mono.Cecil.MethodReference methodReference) { IMethod method = context.Resolve(methodReference); - if (method != null && method.Substitution != TypeParameterSubstitution.Identity) + if (method != null) method = (IMethod)method.Specialize(substitution); return method; }