Bug report
Referencing a constant from self:: in an @implements annotation leads to memory limit exhaustion.
Code snippet that reproduces the problem
<?php declare(strict_types = 1);
/** @template T */
interface I {
}
/** @implements I<self::X> */
class B implements I {
const X = 'x';
}
(I was not able to create a playground link, because it crashes as well.)
Expected output
No error
Did PHPStan help you today? Did it make you happy in any way?
Yes!