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

Psalm does not warn about uninitialized property when using mixed #10589

Closed
kamil-tekiela opened this issue Jan 23, 2024 · 1 comment · Fixed by #10615
Closed

Psalm does not warn about uninitialized property when using mixed #10589

kamil-tekiela opened this issue Jan 23, 2024 · 1 comment · Fixed by #10615
Labels

Comments

@kamil-tekiela
Copy link
Contributor

Example: https://psalm.dev/r/69f34fdc0f

I expected to see MissingConstructor error.

Copy link

I found these snippets:

https://psalm.dev/r/69f34fdc0f
<?php

class Base
{
	private mixed $data;

    public function doSomething():void
    {
        if ($this->data) {
            StoreData::store($this->data);
        }
    }

}
Psalm output (using commit 3c90054):

ERROR: UndefinedClass - 10:13 - Class, interface or enum named StoreData does not exist

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

Successfully merging a pull request may close this issue.

2 participants