Skip to content

Support php 8.0 union types for param/property/return #303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 19, 2019

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