You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then it would emit another warning for the $k * 4 statement explicitly.
To me mixed should behave like unknown in TS, hence an initialisation of a variable with a mixed value should end up in creating a variable of mixed type.
It looks like
totallyTyped
is being paranoid without a good reason.Let's take this code for example (https://psalm.dev/r/715ca196f9):
Nothing there requires the
$k
to be of a known type, thegettype
accepts amixed
argument.Yet, there is no (at least I could not find) way to satisfy the linter and keep the type of the array values unknown (or rather - irrelevant).
I have found something relevant #652 but I still struggle to see how it would be possible to type this example.
The text was updated successfully, but these errors were encountered: