|
|
|
@ -204,7 +204,6 @@ namespace ICSharpCode.Decompiler.IL.Transforms
@@ -204,7 +204,6 @@ namespace ICSharpCode.Decompiler.IL.Transforms
|
|
|
|
|
|
|
|
|
|
bool ValidateDisplayClassUses(ILVariable v, DisplayClass displayClass) |
|
|
|
|
{ |
|
|
|
|
Debug.Assert(v == displayClass.Variable); |
|
|
|
|
foreach (var ldloc in v.LoadInstructions) |
|
|
|
|
{ |
|
|
|
|
if (!ValidateUse(displayClass, ldloc)) |
|
|
|
@ -239,7 +238,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms
@@ -239,7 +238,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms
|
|
|
|
|
return false; |
|
|
|
|
case StLoc stloc when stloc.Variable.IsSingleDefinition && stloc.Value == use: |
|
|
|
|
displayClassCopyMap[stloc.Variable] = v; |
|
|
|
|
return true; |
|
|
|
|
return ValidateDisplayClassUses(stloc.Variable, displayClass); |
|
|
|
|
default: |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|