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

Fix object constant inference #7542

Merged
merged 2 commits into from Jan 31, 2022
Merged

Fix object constant inference #7542

merged 2 commits into from Jan 31, 2022

Conversation

klimick
Copy link
Contributor

@klimick klimick commented Jan 31, 2022

Fix #7541

@@ -55,7 +55,8 @@ public static function infer(
Aliases $aliases,
FileSource $file_source = null,
?array $existing_class_constants = null,
?string $fq_classlike_name = null
?string $fq_classlike_name = null,
bool $const_inference = false
Copy link
Collaborator

Choose a reason for hiding this comment

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

why did you need to add a flag here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I mistakenly thought that adding New_ would break the existing inference.

@orklah orklah added the release:fix The PR will be included in 'Fixes' section of the release notes label Jan 31, 2022
@orklah
Copy link
Collaborator

orklah commented Jan 31, 2022

Test failure is unrelated, but it looks like you're on an outdated revision

@orklah orklah merged commit 041145d into vimeo:4.x Jan 31, 2022
@klimick
Copy link
Contributor Author

klimick commented Jan 31, 2022

Test failure is unrelated, but it looks like you're on an outdated revision

I've rebase main branch. Tests is ok now.

@orklah
Copy link
Collaborator

orklah commented Jan 31, 2022

Thanks!

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

Successfully merging this pull request may close these issues.

use const Foo\foo; infer const type as mixed
2 participants