Skip to content

Commit

Permalink
Improve feature toggling exception for type offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
SerafimArts committed Jan 10, 2025
1 parent 3ef7a31 commit 2047664
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/grammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@
// In case of offset access type
case $child instanceof Node\Stmt\TypeStatement:
if ($this->offsets === false) {
throw FeatureNotAllowedException::fromFeature('square bracket type offsets', $offset);
throw FeatureNotAllowedException::fromFeature('type offsets', $offset);
}

$statement = new Node\Stmt\TypeOffsetAccessNode($statement, $child);
Expand Down
2 changes: 1 addition & 1 deletion resources/grammar.pp2
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ TypesList -> {
// In case of offset access type
case $child instanceof Node\Stmt\TypeStatement:
if ($this->offsets === false) {
throw FeatureNotAllowedException::fromFeature('square bracket type offsets', $offset);
throw FeatureNotAllowedException::fromFeature('type offsets', $offset);
}
$statement = new Node\Stmt\TypeOffsetAccessNode($statement, $child);
Expand Down

0 comments on commit 2047664

Please sign in to comment.