Skip to content

Commit 66850e4

Browse files
Fix icsharpcode#2270: I love deleting code that causes problems and no longer makes any sense at all!
1 parent c4930a8 commit 66850e4

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -330,13 +330,6 @@ private ILVariable ResolveAncestorScopeReference(ILInstruction inst)
330330
return null;
331331
foreach (var v in context.Function.Descendants.OfType<ILFunction>().SelectMany(f => f.Variables))
332332
{
333-
if (v.Kind != VariableKind.Local && v.Kind != VariableKind.DisplayClassLocal && v.Kind != VariableKind.StackSlot)
334-
{
335-
if (!(v.Kind == VariableKind.Parameter && v.Index == -1))
336-
continue;
337-
if (v.Type.Equals(field.Type))
338-
return v;
339-
}
340333
if (!(TransformDisplayClassUsage.IsClosure(context, v, out var varType, out _) && varType.Equals(field.Type)))
341334
continue;
342335
return v;

0 commit comments

Comments
 (0)