diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/Call/FunctionCallReturnTypeFetcher.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Call/FunctionCallReturnTypeFetcher.php index 41dbfc510..a843e945a 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/Call/FunctionCallReturnTypeFetcher.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/Call/FunctionCallReturnTypeFetcher.php @@ -331,6 +331,7 @@ class FunctionCallReturnTypeFetcher Type::getInt() ]); $keyed_array->sealed = true; + $keyed_array->is_list = true; return new Union([$keyed_array]); case 'get_called_class': @@ -446,6 +447,7 @@ class FunctionCallReturnTypeFetcher Type::getInt() ]); $keyed_array->sealed = true; + $keyed_array->is_list = true; if ((string) $first_arg_type === 'false') { return new Union([$keyed_array]); diff --git a/tests/FunctionCallTest.php b/tests/FunctionCallTest.php index dc0185bc6..dc5195640 100644 --- a/tests/FunctionCallTest.php +++ b/tests/FunctionCallTest.php @@ -1054,9 +1054,9 @@ class FunctionCallTest extends TestCase $d = hrtime(false);', 'assertions' => [ '$a' => 'int', - '$b' => 'array{0: int, 1: int}', - '$c' => 'array{0: int, 1: int}|int', - '$d' => 'array{0: int, 1: int}', + '$b' => 'array{int, int}', + '$c' => 'array{int, int}|int', + '$d' => 'array{int, int}', ], ], 'PHP73-hrtimeCanBeFloat' => [