diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Correctness/StackTypes.il b/ICSharpCode.Decompiler.Tests/TestCases/Correctness/StackTypes.il index 2fe4416e1..9c178a2ce 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Correctness/StackTypes.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Correctness/StackTypes.il @@ -22,7 +22,7 @@ extends [mscorlib]System.Object call void Program::InlineAssignByte() call void Program::Int32OrNativeTests() - call void Program::ByRefInstanceCallWithTypeMismatchTests() + call void Program::ByRefInstanceCallWithTypeMismatchTests() ret } // end of method Main diff --git a/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs b/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs index 6d771ae24..dc5abf2e4 100644 --- a/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs +++ b/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs @@ -1669,7 +1669,7 @@ namespace ICSharpCode.Decompiler.CSharp } internal TranslatedExpression TranslateTarget(ILInstruction target, bool nonVirtualInvocation, - bool memberStatic, IType memberDeclaringType, bool unwrapBoxingConversion = false) + bool memberStatic, IType memberDeclaringType) { // If references are missing member.IsStatic might not be set correctly. // Additionally check target for null, in order to avoid a crash. @@ -1680,9 +1680,6 @@ namespace ICSharpCode.Decompiler.CSharp .WithRR(new ThisResolveResult(memberDeclaringType, nonVirtualInvocation)); } else { var translatedTarget = Translate(target, memberDeclaringType); - if (unwrapBoxingConversion) { - translatedTarget = ExpressionBuilder.UnwrapBoxingConversion(translatedTarget); - } if (CallInstruction.ExpectedTypeForThisPointer(memberDeclaringType) == StackType.Ref) { // When accessing members on value types, ensure we use a reference of the correct type, // and not a pointer or a reference to a different type (issue #1333)