Browse Source

Fix failed decompilation of catch-when if the method is async.

pull/886/head
mohe2015 8 years ago
parent
commit
ccdeded6ba
  1. 1
      ICSharpCode.Decompiler/IL/Transforms/CopyPropagation.cs

1
ICSharpCode.Decompiler/IL/Transforms/CopyPropagation.cs

@ -83,6 +83,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms
// note: the initialization by the caller is the first store -> StoreCount must be 1 // note: the initialization by the caller is the first store -> StoreCount must be 1
return v.IsSingleDefinition; return v.IsSingleDefinition;
case VariableKind.StackSlot: case VariableKind.StackSlot:
case VariableKind.Exception:
// Variables are be copied only if both they and the target copy variable are generated, // Variables are be copied only if both they and the target copy variable are generated,
// and if the variable has only a single assignment // and if the variable has only a single assignment
return v.IsSingleDefinition && target.Kind == VariableKind.StackSlot; return v.IsSingleDefinition && target.Kind == VariableKind.StackSlot;

Loading…
Cancel
Save