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
Templated types defined as union types causing unexpected InvalidArgument
errors
#8280
Comments
I found these snippets: https://psalm.dev/r/dbb9cbe3c0<?php
/**
* @template T of int|numeric-string
*/
class Foo {}
function bar(Foo $foo): void {
echo $foo::class;
}
/** @var Foo<numeric-string> $foo */
$foo = new Foo();
bar($foo);
|
I suspect it was introduced by #8069 |
I found these snippets: https://psalm.dev/r/8ea443e090<?php
/**
* @template-covariant T of int|numeric-string
*/
class Foo {}
function bar(Foo $foo): void {
echo $foo::class;
}
/** @var Foo<numeric-string> $foo */
$foo = new Foo();
bar($foo);
|
Very interesting, thanks @AndrolGenhald. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue seems to have been introduced in 4.24.0.
https://psalm.dev/r/dbb9cbe3c0
The text was updated successfully, but these errors were encountered: