+bool FunctionResolver::can_convert_arguments(const FunctionCall &call, const FunctionDeclaration &decl)
+{
+ if(decl.parameters.size()!=call.arguments.size())
+ return false;
+
+ for(unsigned j=0; j<call.arguments.size(); ++j)
+ {
+ const TypeDeclaration *arg_type = call.arguments[j]->type;
+ const TypeDeclaration *param_type = decl.parameters[j]->type_declaration;
+ if(arg_type==param_type)
+ continue;
+
+ const BasicTypeDeclaration *arg_basic = dynamic_cast<const BasicTypeDeclaration *>(arg_type);
+ const BasicTypeDeclaration *param_basic = dynamic_cast<const BasicTypeDeclaration *>(param_type);
+ if(arg_basic && param_basic && can_convert(*arg_basic, *param_basic))
+ continue;
+
+ return false;
+ }
+
+ return true;
+}
+