Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed May 3, 2024
1 parent 0776d8c commit 0bc6969
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -955,9 +955,12 @@ public static function verifyType(
) {
$potential_method_ids = [];

$builder = $param_type->getBuilder();
$builder->removeType('callable');
$param_type_without_callable = $builder->freeze();
$param_type_without_callable = new Union(array_filter(

Check failure on line 958 in src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentAnalyzer.php

View workflow job for this annotation

GitHub Actions / build

ArgumentTypeCoercion

src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentAnalyzer.php:958:54: ArgumentTypeCoercion: Argument 1 of Psalm\Type\Union::__construct expects non-empty-array<array-key, Psalm\Type\Atomic>, but parent type array<string, Psalm\Type\Atomic> provided (see https://psalm.dev/193)
$param_type->getAtomicTypes(),
static function (Atomic $atomic) {
return !$atomic instanceof Atomic\TCallableInterface;
})
);

foreach ($input_type->getAtomicTypes() as $input_type_part) {
if ($input_type_part instanceof TList) {
Expand Down

0 comments on commit 0bc6969

Please sign in to comment.