Skip to content

Commit 15a99db

Browse files
committed
added test
1 parent cc19fc3 commit 15a99db

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/PHPStan/Analyser/nsrt/bug-13674.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,10 @@ public function sayHello($arrayA, $listA, int $i): void
2626
assertType('list<int>', $listA);
2727
}
2828
assertType('list<int>', $listA);
29+
30+
if (!isset($listA[$i])) {
31+
return;
32+
}
33+
assertType('non-empty-list<int>', $listA);
2934
}
3035
}

0 commit comments

Comments
 (0)