Open jnvsor opened 3 weeks ago
Tested with both 5.x-dev and dev-master (Psalm dev-master@16b24bdc94e052b5ce69fd232a77416a1f6ec3e6)
5.x-dev
dev-master
I have an error that I can't reproduce in the sandbox. Inside an if that checks a false|string I cast it to int and it fails:
false|string
ERROR: Trace - src/Renderer/CliRenderer.php:99:21 - $tput: false|string (see https://psalm.dev/224) /** @psalm-trace $tput */ if ((bool) $tput) { self::$terminal_width = (int) $tput; } ERROR: InvalidCast - src/Renderer/CliRenderer.php:100:55 - false cannot be cast to int (see https://psalm.dev/103) self::$terminal_width = (int) $tput;
Two issues with this:
truthy-string
The code in question is here with the CI failure here
Not sure if you can see the output from GHA but it's just the false cannot be cast to int. All other errors are suppressed or baselined
false cannot be cast to int
Hey @jnvsor, can you reproduce the issue on https://psalm.dev? These will be used as phpunit tests when implementing the feature or fixing this bug.
Tested with both
5.x-dev
anddev-master
(Psalm dev-master@16b24bdc94e052b5ce69fd232a77416a1f6ec3e6)I have an error that I can't reproduce in the sandbox. Inside an if that checks a
false|string
I cast it to int and it fails:Two issues with this:
truthy-string
The code in question is here with the CI failure here
Not sure if you can see the output from GHA but it's just the
false cannot be cast to int
. All other errors are suppressed or baselined