Skip to content

Fix #80596 - broken anonymous class union typehint errors #6601

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

Closed
wants to merge 2 commits into from

Conversation

danog
Copy link
Contributor

@danog danog commented Jan 13, 2021

@afilina
Copy link
Contributor

afilina commented Jan 13, 2021

Can we have a test to verify the bugfix? Example of a PR that fixes 2 bugs and has one test case for each: #6599

@danog
Copy link
Contributor Author

danog commented Jan 13, 2021

Sure, done!

@afilina
Copy link
Contributor

afilina commented Jan 13, 2021

LGTM.

For those wondering about expected behavior, self is supposed to be supported in union types as per the RFC (see under "Type grammar")

@php-pulls php-pulls closed this in f9fbba4 Jan 14, 2021
@nikic
Copy link
Member

nikic commented Jan 14, 2021

I've slightly adjusted the fix by moving the truncation into class name resolution, rather than type concatenation.

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.

3 participants