|
|
|
@ -209,10 +209,12 @@ namespace ICSharpCode.Decompiler.CSharp
@@ -209,10 +209,12 @@ namespace ICSharpCode.Decompiler.CSharp
|
|
|
|
|
} else { |
|
|
|
|
if (method.IsStatic) |
|
|
|
|
requireTarget = !expressionBuilder.IsCurrentOrContainingType(method.DeclaringTypeDefinition) || method.Name == ".cctor"; |
|
|
|
|
else if (method.Name == ".ctor") |
|
|
|
|
requireTarget = true; // always use target for base/this-ctor-call, the constructor initializer pattern depends on this
|
|
|
|
|
else if (target.Expression is BaseReferenceExpression) |
|
|
|
|
requireTarget = (callOpCode != OpCode.CallVirt && method.IsVirtual); |
|
|
|
|
else |
|
|
|
|
requireTarget = !(target.Expression is ThisReferenceExpression) || method.Name == ".ctor"; |
|
|
|
|
requireTarget = !(target.Expression is ThisReferenceExpression); |
|
|
|
|
} |
|
|
|
|
bool targetCasted = false; |
|
|
|
|
bool argumentsCasted = false; |
|
|
|
|