1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Fix missing function issue ref #251

This commit is contained in:
Matt Brown 2017-10-19 18:23:18 -04:00
parent dbcec1be38
commit c395930a06

View File

@ -672,6 +672,11 @@ class FunctionChecker extends FunctionLikeChecker
continue;
}
if (!MethodChecker::methodExists($project_checker, $mapping_function_id)) {
$mapping_return_type = Type::getMixed();
continue;
}
$return_type = MethodChecker::getMethodReturnType(
$project_checker,
$mapping_function_id
@ -686,6 +691,11 @@ class FunctionChecker extends FunctionLikeChecker
$mapping_return_type = $return_type;
}
} else {
if (!FunctionChecker::functionExists($statements_checker, $mapping_function_id)) {
$mapping_return_type = Type::getMixed();
continue;
}
$function_storage = FunctionChecker::getStorage(
$statements_checker,
$mapping_function_id