-
Notifications
You must be signed in to change notification settings - Fork 685
Closed
Labels
Description
https://getpsalm.org/r/03a2f11ca3
<?php
/** @param void ...$_p*/
function type(...$_p): void {}
class C {
/** @var int[] */
const N = [];
}
type(C::N);Expected: should complain about array<mixed,int> provided
Actual: complains about array<empty,empty> provided
There's at least one usage of @var on constants in Psalm's tests:
Lines 66 to 69 in 0ef71a4
| /** | |
| * @var string[] | |
| */ | |
| protected const VALUES = []; |
Additionally, psalm seems to ignore @var and const initialization contradiction:
<?php
class C {
/** @var int */
public const N = "aaaa"; // should produce issues, but doesn't
}bugreportuser