Tianyu Geng
7bb81ef157
FIR: add equality call checker
...
Added checker for FirEqualityOperatorCall. It's surfaced as one of the
following diagnostics depending on the PSI structure and types under
comparison:
* INCOMPATIBLE_TYPES(_WARNING)
* EQUALITY_NOT_APPLICABLE(_WARNING)
* INCOMPATIBLE_ENUM_COMPARISON_ERROR
Comparing with FE1.0, the current implementation is more conservative
and only highlights error if the types are known to follow certain
contracts with `equals` method. Otherwise, the checker reports warnings
instead.
However, the current checker is more strict in the following situations:
1. it now rejects incompatible enum types like `Enum<E1>` and
`Enum<E2>`, which was previously accepted
2. it now rejects incompatible class types like `Class<String>` and
`Class<Int>`, which was previously accepted
3. the check now takes smart cast into consideration, so
`if (x is String) x == 3` is now rejected
2021-05-06 17:50:32 +03:00
..
2021-03-29 16:12:29 +03:00
2020-05-22 02:51:57 +03:00
2021-04-13 21:36:33 +03:00
2020-05-22 02:51:57 +03:00
2021-04-13 21:36:33 +03:00
2020-05-22 02:51:57 +03:00
2020-12-16 19:52:25 +03:00
2020-05-22 02:51:57 +03:00
2020-12-16 19:52:25 +03:00
2020-05-22 02:51:57 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2021-04-19 15:46:38 +03:00
2020-05-22 02:51:57 +03:00
2021-02-09 16:04:40 +03:00
2020-05-22 02:51:57 +03:00
2020-12-16 19:52:25 +03:00
2020-05-22 02:51:57 +03:00
2020-05-22 02:51:57 +03:00
2020-05-22 02:51:57 +03:00
2020-05-22 02:51:57 +03:00
2020-05-22 02:51:57 +03:00
2021-02-09 16:04:40 +03:00
2021-02-09 16:04:40 +03:00
2020-05-22 02:51:57 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2021-02-09 16:04:40 +03:00
2020-12-16 19:52:25 +03:00
2021-02-09 16:04:40 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-05-22 02:51:57 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-05-22 02:51:57 +03:00
2020-05-22 02:51:57 +03:00
2020-05-22 02:51:57 +03:00
2020-05-22 02:51:57 +03:00
2020-12-16 19:52:25 +03:00
2020-05-22 02:51:57 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2021-03-03 12:27:11 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2021-04-13 21:36:33 +03:00
2020-05-22 02:51:57 +03:00
2021-04-13 21:36:31 +03:00
2020-12-16 19:52:25 +03:00
2021-04-13 21:36:31 +03:00
2020-12-16 19:52:25 +03:00
2021-04-12 23:49:55 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-05-22 02:51:57 +03:00
2021-02-09 16:04:40 +03:00
2021-02-09 16:04:40 +03:00
2021-03-29 16:12:29 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2021-02-09 16:04:40 +03:00
2021-02-09 16:04:40 +03:00
2020-05-22 02:51:57 +03:00
2021-02-09 16:04:40 +03:00
2021-02-09 16:04:40 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-05-22 02:51:57 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2021-02-12 13:36:38 +03:00
2020-05-22 02:51:57 +03:00
2021-02-09 16:04:40 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2021-02-12 13:36:38 +03:00
2020-12-16 19:52:25 +03:00
2021-03-29 16:12:29 +03:00
2021-02-09 16:04:40 +03:00
2021-02-12 13:36:38 +03:00
2021-05-06 17:50:32 +03:00
2021-03-29 16:12:29 +03:00
2021-04-15 14:59:30 +03:00
2021-03-29 16:12:29 +03:00
2021-05-05 18:20:51 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00