Skip to content

Add Backed Enum test case when implementing an interface #7593

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

Conversation

agustingomes
Copy link
Contributor

@agustingomes agustingomes commented Oct 19, 2021

In the Enumeration RFC, it states Backed Enums can implement
interfaces, but it was not clear where the backed Enum type
would need to be placed in such situation.

This commit adds a test cases for those scenarios.

@agustingomes agustingomes changed the base branch from master to PHP-8.1 October 19, 2021 19:59
@Ayesh
Copy link
Member

Ayesh commented Oct 19, 2021

Nice catch, we apparently only have a test for Unit Enum implements in implements.phpt;

@agustingomes
Copy link
Contributor Author

@Ayesh indeed, that's the only one so far. I'll add an additional test for implementing multiple interfaces

In the Enumeration RFC, it states Backed Enums can implement
interfaces, but it was not clear where the backed Enum type
would need to be placed in such situation.

This commit adds a test case for these scenarios.

Signed-off-by: Agustin Gomes <[email protected]>
@agustingomes agustingomes force-pushed the backed-enum-with-interface-test-case branch from 31a2cca to 18e66aa Compare October 20, 2021 07:18
@nikic nikic closed this in 8bb19cb Oct 20, 2021
@agustingomes agustingomes deleted the backed-enum-with-interface-test-case branch October 20, 2021 09:32
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.

4 participants