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
Nested templates regression since 5.3 #9241
Comments
I found these snippets: https://psalm.dev/r/af716b51e1<?php
declare(strict_types=1);
/**
* @template T
*/
interface Value
{
}
/**
* @implements Value<int>
*/
final class IntValue implements Value
{
}
/**
* @template T
* @template TValue of Value<T>
*/
interface ValueProcessor
{
/**
* @param TValue $value
* @return T
*/
public function process(Value $value): mixed;
}
/**
* @implements ValueProcessor<int, IntValue>
*/
final class IntValueProcessor implements ValueProcessor
{
public function process(Value $value): mixed
{
return '';
}
}
|
Interestingly the problem disappears if I remove |
I found these snippets: https://psalm.dev/r/1a20f5a3a4<?php
declare(strict_types=1);
/**
* @template T
*/
interface Value
{
}
/**
* @implements Value<int>
*/
final class IntValue implements Value
{
}
/**
* @template T
* @template TValue of Value<T>
*/
interface ValueProcessor
{
/**
* @param TValue $value
* @return T
*/
public function process(Value $value): mixed;
}
/**
* @implements ValueProcessor<int, IntValue>
*/
final class IntValueProcessor implements ValueProcessor
{
public function process(Value $value)
{
return '';
}
}
|
Closing in favor of #9245 which has a simpler example. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's what Psalm v5.2 correctly reports for https://psalm.dev/r/af716b51e1:
Psalm v5.3 reports
No issues!
The text was updated successfully, but these errors were encountered: