Skip to content

Commit

Permalink
minor #6050 DX: TypeIntersectionTransformer - prove to not touch T_AM…
Browse files Browse the repository at this point in the history
…PERSAND_FOLLOWED_BY_VAR_OR_VARARG (keradus)

This PR was squashed before being merged into the master branch (closes #6050).

Discussion
----------

DX: TypeIntersectionTransformer - prove to not touch T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG

Commits
-------

0edba53 DX: TypeIntersectionTransformer - prove to not touch T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG
  • Loading branch information
SpacePossum committed Oct 5, 2021
2 parents 2f4652f + 0edba53 commit 0708baf
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ function foo(){}
',
];

if (\PHP_VERSION_ID >= 80100) {
yield 'ensure T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG is not modified' => [
'<?php $a = $b&$c;',
[
6 => T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG,
],
];
}

yield 'arrow function' => [
'<?php $a = fn(int&null $item): int&null => $item * 2;',
[
Expand Down

0 comments on commit 0708baf

Please sign in to comment.