|
|
|
@ -906,7 +906,13 @@ namespace ICSharpCode.Decompiler.Ast
@@ -906,7 +906,13 @@ namespace ICSharpCode.Decompiler.Ast
|
|
|
|
|
target = ((DirectionExpression)target).Expression; |
|
|
|
|
target.Remove(); // detach from DirectionExpression
|
|
|
|
|
} |
|
|
|
|
if (cecilMethodDef != null && cecilMethodDef.DeclaringType.IsInterface) { |
|
|
|
|
|
|
|
|
|
if (cecilMethodDef != null) { |
|
|
|
|
// convert null.ToLower() to ((string)null).ToLower()
|
|
|
|
|
if (target is NullReferenceExpression) |
|
|
|
|
target = target.CastTo(AstBuilder.ConvertType(cecilMethod.DeclaringType)); |
|
|
|
|
|
|
|
|
|
if (cecilMethodDef.DeclaringType.IsInterface) { |
|
|
|
|
TypeReference tr = byteCode.Arguments[0].InferredType; |
|
|
|
|
if (tr != null) { |
|
|
|
|
TypeDefinition td = tr.Resolve(); |
|
|
|
@ -917,6 +923,7 @@ namespace ICSharpCode.Decompiler.Ast
@@ -917,6 +923,7 @@ namespace ICSharpCode.Decompiler.Ast
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
target = new TypeReferenceExpression { Type = AstBuilder.ConvertType(cecilMethod.DeclaringType) }; |
|
|
|
|
} |
|
|
|
|