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-04-22 13:10:54 +03:00
2021-03-24 17:48:39 +03:00
2021-03-11 13:25:51 +03:00
2019-12-12 16:11:46 +03:00
2020-10-21 14:01:31 +03:00
2020-10-05 19:48:11 +03:00
2021-03-03 12:27:11 +03:00
2020-10-15 14:22:38 +03:00
2020-10-15 14:22:38 +03:00
2021-03-03 12:27:11 +03:00
2020-10-15 14:22:38 +03:00
2020-10-15 14:22:38 +03:00
2020-03-05 16:48:47 +03:00
2021-03-17 15:04:44 +03:00
2018-07-05 10:42:49 +03:00
2021-03-17 15:04:44 +03:00
2018-07-05 10:42:49 +03:00
2019-12-12 16:11:46 +03:00
2019-12-12 16:11:46 +03:00
2021-04-01 20:07:50 +03:00
2019-12-12 16:11:46 +03:00
2020-08-11 16:17:01 +03:00
2019-12-12 16:11:46 +03:00
2019-12-12 16:11:46 +03:00
2019-12-12 16:11:46 +03:00
2019-02-14 12:31:42 +03:00
2021-03-03 12:27:11 +03:00
2019-12-12 16:11:46 +03:00
2021-04-22 13:10:54 +03:00
2020-12-16 19:52:25 +03:00
2021-04-13 08:25:16 +03:00
2021-04-13 08:25:16 +03:00
2021-04-13 08:25:16 +03:00
2021-04-13 08:25:16 +03:00
2021-04-13 08:25:16 +03:00
2021-04-13 08:25:16 +03:00
2021-04-19 15:11:16 +03:00
2019-12-26 10:54:06 +03:00
2021-04-02 13:33:52 +03:00
2020-10-12 20:16:21 +02:00
2020-10-12 20:16:21 +02:00
2019-12-12 16:11:46 +03:00
2020-06-19 15:53:09 +03:00
2020-12-16 19:52:25 +03:00
2021-03-04 17:56:29 +03:00
2020-06-19 15:53:09 +03:00
2019-12-12 16:11:46 +03:00
2018-07-05 10:42:49 +03:00
2018-07-05 10:42:49 +03:00
2019-12-12 16:11:46 +03:00
2018-07-05 10:42:49 +03:00
2018-07-05 10:42:49 +03:00
2020-03-05 09:39:40 +03:00
2019-12-12 16:11:46 +03:00
2019-12-12 16:11:46 +03:00
2019-12-12 16:11:46 +03:00
2020-03-05 09:39:40 +03:00
2020-03-05 09:39:40 +03:00
2018-10-25 19:10:39 +03:00
2019-12-12 16:11:46 +03:00
2019-12-12 16:11:46 +03:00
2019-12-12 16:11:46 +03:00
2020-03-05 09:39:40 +03:00
2020-03-05 09:39:40 +03:00
2021-05-06 17:50:32 +03:00
2020-03-05 09:39:40 +03:00
2020-03-05 09:39:40 +03:00
2020-03-05 09:39:40 +03:00
2021-04-02 13:33:52 +03:00
2019-12-12 16:11:46 +03:00
2020-03-05 09:39:40 +03:00
2020-03-05 09:39:40 +03:00
2019-12-12 16:11:46 +03:00
2020-02-14 11:41:30 +01:00
2019-12-12 16:11:46 +03:00
2020-06-19 15:53:09 +03:00
2018-10-25 19:10:39 +03:00
2020-06-19 15:53:09 +03:00
2020-08-21 15:08:37 +03:00
2020-03-05 09:39:40 +03:00
2019-12-12 16:11:46 +03:00
2019-12-12 16:11:46 +03:00
2019-12-12 16:11:46 +03:00
2019-12-12 16:11:46 +03:00
2021-03-04 17:56:29 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2021-04-06 12:30:41 +03:00
2019-12-12 16:11:46 +03:00
2020-03-05 09:39:40 +03:00
2020-03-05 09:39:40 +03:00
2018-10-31 19:00:29 +03:00
2019-12-12 16:11:46 +03:00
2018-10-31 19:00:29 +03:00
2018-10-31 19:00:29 +03:00
2020-03-05 09:39:40 +03:00
2020-03-05 09:39:40 +03:00
2020-03-05 09:39:40 +03:00
2019-12-12 16:11:46 +03:00
2019-12-12 16:11:46 +03:00
2021-03-04 17:56:29 +03:00
2019-12-12 16:11:46 +03:00
2019-12-12 16:11:46 +03:00
2021-03-03 12:27:11 +03:00
2020-06-19 15:53:09 +03:00
2019-12-12 16:11:46 +03:00
2018-07-25 12:08:20 +03:00
2020-06-19 15:53:09 +03:00
2020-03-05 09:39:40 +03:00
2021-04-22 13:10:54 +03:00
2019-12-25 14:59:05 +03:00
2020-03-05 09:39:40 +03:00
2020-08-11 16:17:01 +03:00
2021-05-05 18:20:51 +03:00
2020-12-16 19:52:25 +03:00
2021-04-02 14:36:14 +03:00
2019-12-12 16:11:46 +03:00
2018-06-07 15:45:53 +03:00
2020-03-05 09:39:40 +03:00
2020-06-19 15:53:09 +03:00
2020-03-05 09:39:40 +03:00