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
unset
https://psalm.dev/r/ca6bce5b16
The second trace should only have array{b: 2}.
array{b: 2}
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php $test = ['a' => 1, 'b' => 2]; /** @psalm-trace $test */; unset($test['a']); /** @psalm-trace $test */;
Psalm output (using commit 9e1f7ad): INFO: Trace - 4:26 - $test: array{a: 1, b: 2} INFO: Trace - 6:26 - $test: array{a: 1, b: 2}
Sorry, something went wrong.
Affects trace only: https://psalm.dev/r/c95337fb10
<?php $test = ['a' => 1, 'b' => 2]; echo atan($test['a']); unset($test['a']); echo atan($test['a']); /** @psalm-trace $test */;
Psalm output (using commit 9e1f7ad): ERROR: InvalidArrayOffset - 9:11 - Cannot access value on variable $test using offset value of 'a', expecting 'b' INFO: MixedArgument - 9:11 - Argument 1 of atan cannot be mixed, expecting float INFO: Trace - 11:26 - $test: array{a: 1, b: 2}
Successfully merging a pull request may close this issue.
https://psalm.dev/r/ca6bce5b16
The second trace should only have
array{b: 2}
.The text was updated successfully, but these errors were encountered: