1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Revert "Coerce value with array-offset to array|ArrayAccess"

This reverts commit a8a67bc7e7.
This commit is contained in:
Matthew Brown 2019-08-07 00:36:45 -04:00
parent a8a67bc7e7
commit b5eb63bb2d
2 changed files with 0 additions and 17 deletions

View File

@ -125,10 +125,6 @@ class Reconciler
$new_base_key = $base_key . '[' . $array_key . ']';
if (strpos($array_key, '\'') !== false) {
if (!isset($existing_types[$base_key])) {
$new_types[$base_key][] = ['~array', '~ArrayAccess'];
}
$new_types[$base_key][] = ['!string'];
$new_types[$base_key][] = ['!=falsy'];
}

View File

@ -528,19 +528,6 @@ class ArrayAccessTest extends TestCase
/** @psalm-suppress MixedPropertyFetch */
print_r([&$a->foo->bar]);',
],
'coerceAfterIsset' => [
'<?php
/**
* @return array|ArrayAccess
*/
function getBar(array $array) {
if (isset($array["foo"]["bar"])) {
return $array["foo"];
}
return [];
}'
],
];
}