Skip to content

Commit

Permalink
Fix #9267
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmuffme committed Dec 13, 2023
1 parent 955e7fe commit d04694f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ public static function verifyType(
$input_type,
$param_type,
true,
true,
!isset($param_type->getAtomicTypes()['true']),
$union_comparison_results,
);

Expand Down
11 changes: 11 additions & 0 deletions tests/FunctionCallTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2358,6 +2358,17 @@ function fooFoo(int $a): void {}
fooFoo("string");',
'error_message' => 'InvalidArgument',
],
'invalidArgumentFalseTrueExpected' => [
'code' => '<?php
/**
* @param true|string $arg
* @return void
*/
function foo($arg) {}
foo(false);',
'error_message' => 'InvalidArgument',
],
'builtinFunctioninvalidArgumentWithWeakTypes' => [
'code' => '<?php
$s = substr(5, 4);',
Expand Down

0 comments on commit d04694f

Please sign in to comment.