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

Validate attribute usage - check argument value expressions #4610

Closed
ondrejmirtes opened this issue Nov 18, 2020 · 2 comments
Closed

Validate attribute usage - check argument value expressions #4610

ondrejmirtes opened this issue Nov 18, 2020 · 2 comments

Comments

@ondrejmirtes
Copy link

https://psalm.dev/r/abfe5a5e56

Expected: access to an undefined constant

@psalm-github-bot
Copy link

I found these snippets:

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

#[Attribute]
class Foo
{
    public function __construct(int $i)
    {
    }
}

#[Foo(self::BAR_CONST)]
class Bar
{
}
Psalm output (using commit be275ae):

No issues!

@AndrolGenhald
Copy link
Collaborator

Fixed by #7713, now reports UndefinedConstant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants