Nikolay Lunyak
f0720c1d12
[FIR] Fix K2 behavior according to RULES1
...
The compiler should only report diagnostics for
comparisons over builtins and identity-less types,
other incompatibilities should be reported
via inspections.
It's ok that in `equalityChecksOnIntegerTypes`
instead of `EQUALITY_NOT_APPLICABLE_WARNING` we get
`EQUALITY_NOT_APPLICABLE`, because
`ProperEqualityChecksInBuilderInferenceCalls`
is already active by default.
This change also replaces the notion of a representative superclass
with the least upper bound.
This makes complex types like
intersection/flexible transparent to
RULES1-based compatibility checks.
One way to look at it is to think
that this is an automatic way of handling
type parameters: automatic picking of
"interesting" bounds, and checking them against one another.
Note that `TypeIntersector.intersectTypes`
for `Int` and `T` where `T` is a type parameter
may return both `{Int & T}` or `null`
depending on `T`-s bounds. At the same time,
for type parameters `T` and `K` it will
always return `{T & K}`.
`ConeTypeIntersector.intersectTypes`, on the
other hand, will always return `{Int & T}`
irrespectively of the bounds. Meaning, the two
intersectors differ in corner cases.
`lowerBoundIfFlexible` call in `isLiterallyTypeParameter` is backed by
the `equalityOfFlexibleTypeParameters` test.
^KT-35134 #fixed-in-k2
^KT-22499 #fixed-in-k2
^KT-46383 #fixed-in-k2
2023-03-31 15:01:50 +00:00
..
2023-03-02 10:23:38 +00:00
2021-05-20 12:22:21 +03:00
2021-05-20 12:22:21 +03:00
2021-05-25 13:28:26 +03:00
2021-05-25 13:28:26 +03:00
2021-05-25 13:28:26 +03:00
2021-05-25 13:28:26 +03:00
2020-12-16 19:52:25 +03:00
2023-03-02 10:23:38 +00:00
2020-12-16 19:52:25 +03:00
2021-08-12 18:42:26 +03:00
2022-02-25 11:46:27 +00:00
2022-02-25 11:46:27 +00:00
2021-10-21 19:39:36 +03:00
2022-02-25 11:46:27 +00:00
2022-02-25 11:46:27 +00:00
2021-10-21 19:39:36 +03:00
2023-03-31 15:01:50 +00:00
2022-02-25 11:46:27 +00:00
2021-10-21 19:39:36 +03:00
2021-11-26 11:26:21 +03:00
2021-09-10 07:07:42 +03:00
2023-03-02 10:23:38 +00:00
2021-02-09 16:04:40 +03:00
2023-03-02 10:23:38 +00:00
2021-08-06 22:57:17 +03:00
2023-03-02 10:23:38 +00:00
2023-03-02 10:23:38 +00:00
2021-10-21 19:39:36 +03:00
2021-10-21 19:39:36 +03:00
2021-06-25 16:37:35 +03:00
2021-10-21 19:39:39 +03:00
2021-10-21 19:39:36 +03:00
2021-06-25 16:37:35 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2023-03-02 10:23:38 +00:00
2021-07-22 20:39:56 +03:00
2020-12-16 19:52:25 +03:00
2023-03-02 10:23:38 +00:00
2021-07-22 20:39:56 +03:00
2020-12-16 19:52:25 +03:00
2023-03-02 10:23:38 +00:00
2020-12-16 19:52:25 +03:00
2023-03-02 10:23:38 +00: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
2023-03-02 10:23:38 +00:00
2021-06-25 16:37:34 +03:00
2021-06-25 16:37:34 +03:00
2020-12-16 19:52:25 +03:00
2023-03-02 10:23:38 +00:00
2023-03-02 10:23:38 +00:00
2023-03-02 10:23:38 +00:00
2023-03-02 10:23:38 +00:00
2020-12-16 19:52:25 +03:00
2023-03-02 10:23:38 +00:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2023-03-02 10:23:38 +00:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2023-03-02 10:23:38 +00:00
2022-02-25 11:46:27 +00:00
2022-02-25 11:46:27 +00:00
2022-02-25 11:46:27 +00:00
2022-02-25 11:46:27 +00:00
2021-12-21 16:36:19 +03:00
2021-12-21 16:36:19 +03:00
2021-12-21 16:36:19 +03:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2023-03-02 10:23:38 +00:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2023-03-02 10:23:38 +00: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
2023-03-02 10:23:38 +00:00
2022-07-22 16:03:52 +00:00
2022-07-22 16:03:52 +00:00
2022-07-22 16:03:52 +00:00
2023-02-24 14:58:18 +00:00
2021-06-08 18:59:48 +03:00
2021-07-13 10:35:01 +03:00
2021-06-08 18:59:48 +03:00
2021-06-08 18:59:48 +03:00
2021-04-13 21:36:33 +03:00
2023-02-15 08:13:46 +00:00
2021-05-25 13:28:27 +03:00
2023-02-15 08:13:46 +00:00
2021-05-28 15:36:24 +03:00
2021-05-25 13:28:26 +03:00
2021-05-25 13:28:27 +03:00
2021-05-25 13:28:29 +03:00
2022-02-25 11:46:27 +00:00
2022-02-25 11:46:27 +00:00
2021-08-04 19:33:45 +03:00
2021-09-12 16:04:18 +03:00
2021-09-12 16:04:18 +03:00
2021-09-12 16:04:18 +03:00
2021-09-12 16:04:18 +03:00
2022-02-25 11:46:27 +00:00
2022-02-10 21:20:47 +00: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
2021-05-20 17:24:30 +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
2021-02-09 16:04:40 +03:00
2023-02-15 08:13:43 +00:00
2023-02-15 08:13:43 +00:00
2021-02-09 16:04:40 +03:00
2023-03-02 10:23:38 +00:00
2022-02-25 11:46:27 +00:00
2023-03-02 10:23:38 +00:00
2023-03-02 10:23:38 +00:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2023-03-02 10:23:38 +00:00
2022-02-25 11:46:27 +00:00
2022-02-25 11:46:27 +00:00
2021-02-12 13:36:38 +03:00
2022-02-25 11:46:27 +00:00
2023-03-02 10:23:38 +00:00
2021-07-21 17:53:05 +03:00
2021-07-21 17:53:05 +03:00
2023-03-02 10:23:38 +00:00
2021-07-21 17:53:05 +03:00
2023-03-02 10:23:38 +00:00
2021-07-21 17:53:05 +03:00
2023-03-02 10:23:38 +00:00
2021-02-09 16:04:40 +03:00
2020-12-16 19:52:25 +03:00
2023-03-02 10:23:38 +00:00
2023-03-22 17:34:07 +00:00
2023-03-22 17:34:07 +00:00
2023-03-02 10:23:38 +00:00
2020-12-16 19:52:25 +03:00
2020-12-16 19:52:25 +03:00
2023-03-02 10:23:38 +00: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
2023-03-11 10:15:23 +00:00
2023-03-11 10:15:22 +00:00
2023-03-11 10:15:23 +00:00
2023-03-31 15:01:50 +00:00
2021-12-21 16:36:19 +03:00
2023-02-15 08:13:46 +00:00
2021-05-25 13:28:27 +03:00
2021-11-17 15:26:38 +03:00
2021-10-27 19:42:45 +03:00
2022-11-10 13:10:58 +00:00
2021-08-06 22:57:12 +03:00
2021-08-06 22:57:15 +03:00
2021-05-05 18:20:51 +03:00
2020-12-16 19:52:25 +03:00
2021-05-25 13:28:29 +03:00