Skip to content

Commit 94532ef

Browse files
committed
fix
1 parent fb0c189 commit 94532ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Type/Regex/RegexGroupParser.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ final class RegexGroupParser
4343

4444
private static ?Parser $parser = null;
4545

46+
/** @var array<string, array{array<int, RegexCapturingGroup>, list<string>}|null> */
4647
private static array $resultCache = [];
4748

4849
public function __construct(
@@ -261,7 +262,7 @@ private function walkRegexAst(
261262
$astWalkResult = $astWalkResult->addCapturingGroup($group);
262263

263264
if ($alternation !== null) {
264-
$alternation->pushGroup($combinationIndex, $group);
265+
$alternation = $alternation->pushGroup($combinationIndex, $group);
265266
}
266267
}
267268

0 commit comments

Comments
 (0)