Skip to content

Conversation

@TysonAndre
Copy link
Contributor

To avoid crashing existing applications such as language servers,
the existing typeDeclaration properties continue to be of type
Node|Token.

An additional otherTypeDeclarations property was added to support union
types. Normally, it will either be null, or contain alternating
BarTokens and nodes/tokens for types.

Add various tests of union types in parameters, properties, and return
types.

Fixes #302

To avoid crashing existing applications such as language servers,
the existing typeDeclaration properties continue to be of type
Node|Token.

An additional otherTypeDeclarations property was added to support union
types. Normally, it will either be null, or contain alternating
BarTokens and nodes/tokens for types.

Add various tests of union types in parameters, properties, and return
types.

Fixes microsoft#302
@TysonAndre
Copy link
Contributor Author

@roblourens - This is ready for another look.

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@roblourens roblourens merged commit 6c701e3 into microsoft:master Nov 19, 2019
@TysonAndre TysonAndre deleted the parse-union-type branch March 27, 2021 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support PHP 8.0 Union types RFC

3 participants