diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArrayFunctionArgumentsAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArrayFunctionArgumentsAnalyzer.php index 9be7d09d7..119a15bcc 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArrayFunctionArgumentsAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArrayFunctionArgumentsAnalyzer.php @@ -300,15 +300,6 @@ class ArrayFunctionArgumentsAnalyzer array_unshift($properties, $arg_value_type); $by_ref_type = new Union([$objectlike_list->setProperties($properties)]); - } elseif ($array_type instanceof TList) { - $by_ref_type = Type::combineUnionTypes( - $by_ref_type, - new Union( - [ - Type::getNonEmptyListAtomic($arg_value_type), - ] - ) - ); } else { $by_ref_type = Type::combineUnionTypes( $by_ref_type, diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ArrayFetchAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ArrayFetchAnalyzer.php index 15d5b546d..1823abb16 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ArrayFetchAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ArrayFetchAnalyzer.php @@ -238,9 +238,6 @@ class ArrayFetchAnalyzer $array_value_type = Type::getMixed(); } elseif ($array_type instanceof TArray) { $array_value_type = $array_type->type_params[1]; - } elseif ($array_type instanceof TList) { - $array_value_type = $array_type->type_param; - } else { $array_value_type = $array_type->getGenericValueType(); } @@ -266,8 +263,6 @@ class ArrayFetchAnalyzer if ($array_type instanceof TArray) { $const_array_key_type = $array_type->type_params[0]; - } elseif ($array_type instanceof TList) { - $const_array_key_type = Type::getInt(); } else { $const_array_key_type = $array_type->getGenericKeyType(); } @@ -634,7 +629,6 @@ class ArrayFetchAnalyzer if ($type instanceof TArray || $type instanceof TKeyedArray - || $type instanceof TList || $type instanceof TClassStringMap ) { self::handleArrayAccessOnArray(