mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 12:55:26 +01:00
d09e420939
I initially added these as part of my TryAnalyzer rewrite to allow testing complicated `finally` types like this: ``` $foo = 1; try { $foo = 2; } catch (Exception $_) { $foo = 3; } finally { $bar = $foo; /** @psalm-check-type-exact $bar = 1|2|3 */; } /** @psalm-check-type-exact $bar = 2|3 */; ``` Using the `'assertions'` in tests doesn't work since the type is different inside the `finally`. I decided to extract the new annotation from the rest of my changes and do a separate pull request since I think others may find it useful, and it should be much easier to review than the entire TryAnalyzer rewrite. |
||
---|---|---|
.. | ||
type_syntax | ||
adding_assertions.md | ||
assertion_syntax.md | ||
supported_annotations.md | ||
templated_annotations.md | ||
typing_in_psalm.md |