You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tokenizer/PHP: bug fix for static typed properties with union/intersection types
Just like the `var` keyword, the `static` keyword can also be used stand-alone with property declarations.
https://3v4l.org/sbaDM
In that case, the tokenization of the `|` operator was not changed to `T_TYPE_UNION` and the `&` operator was not changed to `T_TYPE_INTERSECTION` as the `static` keyword can also be used in return type declarations, so was seen as part of the type declaration.
Fixed now by removing the `T_STATIC` token from the `$allowed` list before walking backwards from the operator.
Includes tests.
0 commit comments