diff --git a/src/Psalm/Checker/FunctionLikeChecker.php b/src/Psalm/Checker/FunctionLikeChecker.php index 1073cc2d7..833bff864 100644 --- a/src/Psalm/Checker/FunctionLikeChecker.php +++ b/src/Psalm/Checker/FunctionLikeChecker.php @@ -617,7 +617,7 @@ abstract class FunctionLikeChecker implements StatementsSource $scalar_type_match_found = true; } } - if ($input_type_part->isScalarType()) { + if ($input_type_part->isScalarType() || $input_type_part->isScalar()) { if ($param_type_part->isScalarType()) { $scalar_type_match_found = true; } diff --git a/src/Psalm/Type.php b/src/Psalm/Type.php index 08d25da08..9fc588474 100644 --- a/src/Psalm/Type.php +++ b/src/Psalm/Type.php @@ -488,7 +488,8 @@ abstract class Type $this->value === 'string' || $this->value === 'float' || $this->value === 'bool' || - $this->value === 'false'; + $this->value === 'false' || + $this->value === 'numeric'; } return false;