From ccdeded6baafb99767b8c2123a5ecf43e5c27aa0 Mon Sep 17 00:00:00 2001 From: mohe2015 Date: Fri, 29 Sep 2017 18:26:15 +0200 Subject: [PATCH] Fix failed decompilation of catch-when if the method is async. --- ICSharpCode.Decompiler/IL/Transforms/CopyPropagation.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ICSharpCode.Decompiler/IL/Transforms/CopyPropagation.cs b/ICSharpCode.Decompiler/IL/Transforms/CopyPropagation.cs index 5822105b6..28d5d83fc 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/CopyPropagation.cs +++ b/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 return v.IsSingleDefinition; case VariableKind.StackSlot: + case VariableKind.Exception: // Variables are be copied only if both they and the target copy variable are generated, // and if the variable has only a single assignment return v.IsSingleDefinition && target.Kind == VariableKind.StackSlot;