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

UnitEnum interface has a readonly property $name, BackedEnum has $value #7464

Closed
vudaltsov opened this issue Jan 22, 2022 · 2 comments · Fixed by #7467
Closed

UnitEnum interface has a readonly property $name, BackedEnum has $value #7464

vudaltsov opened this issue Jan 22, 2022 · 2 comments · Fixed by #7467
Milestone

Comments

@vudaltsov
Copy link
Contributor

https://psalm.dev/r/abb1e80b69

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/abb1e80b69
<?php

static fn (\UnitEnum $tag): string => $tag->name;

static fn (\BackedEnum $tag): string|int => $tag->value;
Psalm output (using commit e0d3c3f):

ERROR: UndefinedClass - 3:12 - Class, interface or enum named UnitEnum does not exist

ERROR: UndefinedClass - 5:12 - Class, interface or enum named BackedEnum does not exist

@weirdan
Copy link
Collaborator

weirdan commented Jan 24, 2022

Duplicate of #7364

@weirdan weirdan marked this as a duplicate of #7364 Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants