Bug report
The current version (0.12.33) complains that Generator doesn't have a method throw(). Version 0.12.32 didn't have this issue. It seems to only happen when the Generator type is declared.
Code snippet that reproduces the problem
With type declaration:
https://phpstan.org/r/2e1b8339-5519-4e10-9994-f034d125d2ab
Without it:
https://phpstan.org/r/f69069bc-daee-408b-a39f-d65c23a18eab
Expected output
No error should be reported.