As referred by #17 (comment)
The library doesn't know what to do about template references in the same class, as in:
https://phpstan.org/r/9f0ab119-cd14-47f0-8a5a-ac8cb69f3b6c
The last three examples here have Generic<T> where T is defined in the same class.
/**
* @template T
*/
class A {
/**
* @return T
*/
public function m() {
// @phpstan-ignore-next-line
return '';
}
}
/**
* @extends A<Z>
* @template Z of int
*/
class C extends A {}
Library thinks m() returns a Z, instead of int.