Skip to content

Commit 2047664

Browse files
committed
Improve feature toggling exception for type offsets
1 parent 3ef7a31 commit 2047664

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

resources/grammar.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@
707707
// In case of offset access type
708708
case $child instanceof Node\Stmt\TypeStatement:
709709
if ($this->offsets === false) {
710-
throw FeatureNotAllowedException::fromFeature('square bracket type offsets', $offset);
710+
throw FeatureNotAllowedException::fromFeature('type offsets', $offset);
711711
}
712712

713713
$statement = new Node\Stmt\TypeOffsetAccessNode($statement, $child);

resources/grammar.pp2

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ TypesList -> {
135135
// In case of offset access type
136136
case $child instanceof Node\Stmt\TypeStatement:
137137
if ($this->offsets === false) {
138-
throw FeatureNotAllowedException::fromFeature('square bracket type offsets', $offset);
138+
throw FeatureNotAllowedException::fromFeature('type offsets', $offset);
139139
}
140140

141141
$statement = new Node\Stmt\TypeOffsetAccessNode($statement, $child);

0 commit comments

Comments
 (0)