|
|
|
|
@ -330,13 +330,6 @@ namespace ICSharpCode.Decompiler.IL.Transforms
@@ -330,13 +330,6 @@ namespace ICSharpCode.Decompiler.IL.Transforms
|
|
|
|
|
return null; |
|
|
|
|
foreach (var v in context.Function.Descendants.OfType<ILFunction>().SelectMany(f => f.Variables)) |
|
|
|
|
{ |
|
|
|
|
if (v.Kind != VariableKind.Local && v.Kind != VariableKind.DisplayClassLocal && v.Kind != VariableKind.StackSlot) |
|
|
|
|
{ |
|
|
|
|
if (!(v.Kind == VariableKind.Parameter && v.Index == -1)) |
|
|
|
|
continue; |
|
|
|
|
if (v.Type.Equals(field.Type)) |
|
|
|
|
return v; |
|
|
|
|
} |
|
|
|
|
if (!(TransformDisplayClassUsage.IsClosure(context, v, out var varType, out _) && varType.Equals(field.Type))) |
|
|
|
|
continue; |
|
|
|
|
return v; |
|
|
|
|
|