diff --git a/tests/PHPStanTests/nsrt/preg-match.php b/tests/PHPStanTests/nsrt/preg-match.php index c71875f..38957c7 100644 --- a/tests/PHPStanTests/nsrt/preg-match.php +++ b/tests/PHPStanTests/nsrt/preg-match.php @@ -110,6 +110,10 @@ function doMatchAllStrictGroups(string $s): void assertType('array{}', $matches); } assertType('array{}|array{0: list, test: list, 1: list}', $matches); + + if (Preg::isMatchAllStrictGroups('/Price: (?£|€)?\d+/', $s, $matches)) { + assertType('array{0: list, test: list, 1: list}', $matches); + } } // disabled until https://github.com/phpstan/phpstan-src/pull/3185 can be resolved