Skip to content
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

better understands value and name properties for enum #6838

Merged
merged 1 commit into from
Nov 6, 2021

Conversation

orklah
Copy link
Collaborator

@orklah orklah commented Nov 6, 2021

This will fix #6468 and fix #6470

@orklah orklah added the release:feature The PR will be included in 'Features' section of the release notes label Nov 6, 2021
@orklah orklah merged commit e28659e into vimeo:master Nov 6, 2021
if ($lhs_type_part instanceof Type\Atomic\TEnumCase) {
$statements_analyzer->node_data->setType(
$stmt,
new Type\Union([new Type\Atomic\TLiteralString($lhs_type_part->case_name)])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Type::getString($lhs_type_part->case_name) would have been shorter

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh, yeah, I forgot this helper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:feature The PR will be included in 'Features' section of the release notes
Projects
None yet
2 participants