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

False positive with Reflector #4481

Closed
enumag opened this issue Nov 5, 2020 · 1 comment
Closed

False positive with Reflector #4481

enumag opened this issue Nov 5, 2020 · 1 comment
Labels

Comments

@enumag
Copy link
Contributor

enumag commented Nov 5, 2020

https://psalm.dev/r/6ba7d30ced

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/6ba7d30ced
<?php

class A {
    public int $b = 0;
}

interface X {
    public function y(Reflector $i):void;
}

function t(X $x): void {
	$x->y(new ReflectionProperty('A', 'b'));
}
Psalm output (using commit b3ff107):

ERROR: InvalidArgument - 12:8 - Argument 1 of X::y expects Reflector, ReflectionProperty provided

@weirdan weirdan added the bug label Nov 5, 2020
@muglug muglug closed this as completed in e9dd16f Nov 5, 2020
danog pushed a commit to danog/psalm that referenced this issue Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants