You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php/** * @template TTKey * @template TTValue * * @extends ArrayObject<TTKey, TTValue> */class iter extends ArrayObject {
/** * @return self<TTKey, TTValue> */publicfunctionstabilize(): self {
return$this;
}
}
class a {
/** * @return iter<int, static> */publicfunctionret(): iter {
returnnewiter([$this]);
}
}
class b extends a {}
$a = (newa)->ret();
$a = $a->stabilize();
/** @psalm-trace $a */;
Psalm output (using commit 028ac7f):
INFO: Trace - 30:23 - $a: iter<int, a&iter<int, a&static>>
INFO: UnusedVariable - 29:1 - $a is never referenced or the value is not used
https://psalm.dev/r/c4714e538a
The text was updated successfully, but these errors were encountered: