From b6cd1f3ccba8c7b87f6dd283e349fd068da0bde8 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 25 Jul 2016 21:48:46 +0900 Subject: [PATCH] Use correct annotation to detect custom operators. --- .../CSharp/Transforms/ReplaceMethodCallsWithOperators.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler/CSharp/Transforms/ReplaceMethodCallsWithOperators.cs b/ICSharpCode.Decompiler/CSharp/Transforms/ReplaceMethodCallsWithOperators.cs index 01628408a..fe75fc727 100644 --- a/ICSharpCode.Decompiler/CSharp/Transforms/ReplaceMethodCallsWithOperators.cs +++ b/ICSharpCode.Decompiler/CSharp/Transforms/ReplaceMethodCallsWithOperators.cs @@ -255,7 +255,7 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms // detect increment/decrement if (assignment.Right.IsMatch(new PrimitiveExpression(1))) { // only if it's not a custom operator - if (assignment.Annotation() == null) { + if (assignment.Annotation() == null) { UnaryOperatorType type; // When the parent is an expression statement, pre- or post-increment doesn't matter; // so we can pick post-increment which is more commonly used (for (int i = 0; i < x; i++))