diff --git a/tests/TypeReconciliation/IssetTest.php b/tests/TypeReconciliation/IssetTest.php index fee46b96156..67a16d4ae3e 100644 --- a/tests/TypeReconciliation/IssetTest.php +++ b/tests/TypeReconciliation/IssetTest.php @@ -1153,6 +1153,15 @@ private function __construct() {} }', 'error_message' => 'RedundantPropertyInitializationCheck', ], + 'setArbitraryListElementAfterIsset' => [ + 'code' => ' $list */ + function foo(array &$list, int $offset): void { + if (isset($list[$offset])) {} + $list[$offset] = ""; + }', + 'error_message' => 'ReferenceConstraintViolation' + ], ]; } }