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
Feature description or problem with existing feature
The type of values within SplDoublyLinkedList is not recognized despite type annotations like SplDoublyLinkedList<string> or SplDoublyLinkedList<int>
Describe the solution you'd like
Improve type inference to recognize and infer the types of values in SplDoublyLinkedList based on their declared types in the annotations.
Additional context
some sample
/** @var SplDoublyLinkedList<string> */$list = newSplDoublyLinkedList;
// the $val should be recognized as stringforeach($listas$val){
}
$list->push("Abc");
$list->pop();
/** * * @return SplDoublyLinkedList<int> */functiongetList(): SplDoublyLinkedList
{
$list = newSplDoublyLinkedList;
$list->push(1);
$list->push(2);
$list->push(3);
return$list;
}
// the $val should be recognized as intforeach(getList() as$val){
}
getList()->pop();
getList()->push(1);
The text was updated successfully, but these errors were encountered:
Feature description or problem with existing feature
The type of values within SplDoublyLinkedList is not recognized despite type annotations like SplDoublyLinkedList<string> or SplDoublyLinkedList<int>
Describe the solution you'd like
Improve type inference to recognize and infer the types of values in SplDoublyLinkedList based on their declared types in the annotations.
Additional context
some sample
The text was updated successfully, but these errors were encountered: