Conversation
|
The endtoend test failure with PHPUnit is, I think, a true positive. I'll update the baseline in that repo. |
| break; | ||
| } | ||
|
|
||
| /** @psalm-suppress MixedArgument */ |
There was a problem hiding this comment.
It makes $a mixed here?
It seemed correctly inferred to hello before
There was a problem hiding this comment.
Yeah, unfortunately that was dodgy too: https://psalm.dev/r/a1a5253dc3. Since assignments in conditionals are a known pain, I thought this was a reasonable compromise (there are many assignment in conditional tests, and this was the only one affected).
|
Seems great! While you're in this code, I'd be grateful if you could leave a little comment to explain the role of the different scope and contexts objects for analyzing the if(). I tried to check this code a few times but I get lost with the if_context, outer_scope, post_if_context etc... |
45ba737 to
9461caa
Compare
25c8471 to
9c6f380
Compare
|
Thanks! |
Handling of
ifconditions had a path I called "mic drop" that dealt with the following codeWhile a useful shortcut, this created a bunch of special cases that don't work if an empty
else {}is appended to theifcondition — many examples intests/TypeReconciliation/TypeAlgebraTest.phpfail when that emptyelse {}is used.This PR contains the necessary fixes to make most everything work as expected without the mic drop hack.