diff --git a/ICSharpCode.Decompiler/IL/ILReader.cs b/ICSharpCode.Decompiler/IL/ILReader.cs index 19ba9683c..92763b11b 100644 --- a/ICSharpCode.Decompiler/IL/ILReader.cs +++ b/ICSharpCode.Decompiler/IL/ILReader.cs @@ -151,7 +151,7 @@ namespace ICSharpCode.Decompiler.IL /// void Warn(string message) { - //Debug.Fail(message); + Debug.Fail(message); } void ReadInstructions(Dictionary> outputStacks, CancellationToken cancellationToken) diff --git a/ICSharpCode.Decompiler/IL/Instructions/BinaryNumericInstruction.cs b/ICSharpCode.Decompiler/IL/Instructions/BinaryNumericInstruction.cs index 457037c1e..0eca8dcf2 100644 --- a/ICSharpCode.Decompiler/IL/Instructions/BinaryNumericInstruction.cs +++ b/ICSharpCode.Decompiler/IL/Instructions/BinaryNumericInstruction.cs @@ -59,6 +59,7 @@ namespace ICSharpCode.Decompiler.IL this.Sign = sign; this.CompoundAssignmentType = compoundAssignmentType; this.resultType = ComputeResultType(opCode, left.ResultType, right.ResultType); + Debug.Assert(resultType != StackType.Unknown); Debug.Assert(CompoundAssignmentType == CompoundAssignmentType.None || IsValidCompoundAssignmentTarget(Left)); } diff --git a/ICSharpCode.Decompiler/Util/CollectionExtensions.cs b/ICSharpCode.Decompiler/Util/CollectionExtensions.cs index accb32b73..cd4c7356b 100644 --- a/ICSharpCode.Decompiler/Util/CollectionExtensions.cs +++ b/ICSharpCode.Decompiler/Util/CollectionExtensions.cs @@ -19,7 +19,7 @@ namespace ICSharpCode.Decompiler { if (stack.Count == 0) return default(T); - return stack.Pop(); + return stack.Peek(); } public static void AddRange(this ICollection collection, IEnumerable input)