From 323417070a959bd9024c02faf76e922cd9018302 Mon Sep 17 00:00:00 2001 From: Evan Shaw Date: Mon, 4 Mar 2024 21:39:18 +1300 Subject: [PATCH] Additional array fetch test case --- tests/TypeReconciliation/EmptyTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/TypeReconciliation/EmptyTest.php b/tests/TypeReconciliation/EmptyTest.php index d144faa39e9..bce863e0d34 100644 --- a/tests/TypeReconciliation/EmptyTest.php +++ b/tests/TypeReconciliation/EmptyTest.php @@ -771,6 +771,13 @@ function bar() { }', 'error_message' => 'RedundantConditionGivenDocblockType', ], + 'redundantEmptyArrayFetch' => [ + 'code' => ' $a */; + assert(isset($a["a"])); + if (empty($a["a"])) {}', + 'error_message' => 'DocblockTypeContradiction', + ], ]; } }