We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@psalm-this-out
__construct()
https://psalm.dev/r/2c2d54f466
Expected: no errors. Got: IfThisIsMismatch.
IfThisIsMismatch
As a result, now I have to typehint the object manually: https://psalm.dev/r/6d5e4476ea
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php /** * @template T of string */ final class App { /** @psalm-this-out self<"idle"> */ public function __construct() {} /** * @psalm-if-this-is self<"idle"> * @psalm-this-out self<"started"> */ public function start(): void {} } $app = new App(); $app->start();
Psalm output (using commit 71bb951): ERROR: IfThisIsMismatch - 18:7 - Class type must be App<'idle'> current type App<string>
<?php /** * @template T of string */ final class App { /** * @psalm-if-this-is self<"idle"> * @psalm-this-out self<"started"> */ public function start(): void {} } /** @var App<'idle'> */ $app = new App(); $app->start();
Psalm output (using commit 71bb951): No issues!
Sorry, something went wrong.
Process @psalm-this-out on __construct() as well
5277ef4
Fixes vimeo#9649
def0489
Successfully merging a pull request may close this issue.
https://psalm.dev/r/2c2d54f466
Expected: no errors.
Got:
IfThisIsMismatch
.As a result, now I have to typehint the object manually:
https://psalm.dev/r/6d5e4476ea
The text was updated successfully, but these errors were encountered: