public override Expression VisitMethodCall(MethodCall call)
{
// This is a workaround for a bug in the CCI resolver. It can't cope with calls to methods
// in which some parameters were nulled out because of an error. We check for that case here
// and null out the entire method call. Reported to Herman on 10/23/04.
NameBinding nbCallee = call.Callee as NameBinding;
if (nbCallee != null && nbCallee.BoundMembers.Count > 0)
{
ZMethod calleeMethod = (ZMethod)nbCallee.BoundMembers[0];
for (int n = calleeMethod.Parameters.Count, i = 0; i < n; i++)
{
if (calleeMethod.Parameters[i] == null)
return null;
}
}
// end workaround
Expression result = base.VisitMethodCall(call);
return result;
}