mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 12:24:49 +01:00
Fix #4760 - prevent unpacked vars from breaking call when checking unitialised properties
This commit is contained in:
parent
9c5cc02f90
commit
eba91f741b
@ -1328,7 +1328,7 @@ class ClassAnalyzer extends ClassLikeAnalyzer
|
||||
return new PhpParser\Node\Arg(
|
||||
new PhpParser\Node\Expr\Variable($param->name, $attributes),
|
||||
false,
|
||||
false,
|
||||
$param->is_variadic,
|
||||
$attributes
|
||||
);
|
||||
},
|
||||
|
@ -2179,6 +2179,18 @@ class PropertyTypeTest extends TestCase
|
||||
}
|
||||
}'
|
||||
],
|
||||
'noErrorForSplatArgs' => [
|
||||
'<?php
|
||||
class Foo {
|
||||
protected array $b;
|
||||
|
||||
protected function __construct(?string ...$bb) {
|
||||
$this->b = $bb;
|
||||
}
|
||||
}
|
||||
|
||||
class Bar extends Foo {}'
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user