1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 13:51:54 +01:00
AndrolGenhald d09e420939 Add @psalm-check-type and @psalm-check-type-exact.
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.
2022-02-17 10:37:13 -06:00
..
2022-01-11 10:03:00 -06:00
2022-02-17 03:52:07 +02:00
2021-12-15 04:42:37 +01:00
2022-01-14 21:13:34 +01:00
2022-01-31 10:28:47 +01:00
2022-01-22 18:05:32 +01:00
2022-02-13 19:38:45 +01:00
2022-01-18 18:25:18 +01:00
2022-01-18 23:07:35 +01:00
2022-01-31 10:28:47 +01:00
2022-01-22 00:00:45 +00:00
2022-01-19 19:29:16 +01:00
2022-01-13 19:01:56 -05:00
2022-02-14 00:12:31 +01:00