Mikhail Glukhikh
2680c8effd
K2: allow/disallow coercion-to-unit for callable references more precisely
...
Before this commit, K2 always applied coercion-to-unit for
callable references if expected type was Unit, and actual non-Unit.
However, this may not work in case when actual return type is
a type parameter and it must be inferred into Unit.
In this commit we started to disallow coercion-to-unit
for references with synthetic outer call (~ top-level in K1)
AND a type parameter as a return type (both should be true to disallow).
This provides better K1 consistency,
while still keeping some broken K1 cases working in K2.
See also added comment in CallableReferenceResolution.kt.
#KT-62565 Fixed
2023-12-12 13:52:29 +00:00
..
2023-11-08 15:45:48 +00:00
2023-11-08 15:45:48 +00:00
2023-12-12 13:52:29 +00:00
2023-12-12 13:52:29 +00:00
2023-11-08 15:45:48 +00:00
2023-11-08 15:45:48 +00:00
2023-07-27 10:28:52 +00:00
2023-06-22 07:09:15 +00:00
2021-11-10 22:00:01 +03:00
2022-02-23 14:21:59 +03:00
2022-02-23 14:21:59 +03:00
2022-11-15 15:06:58 +00:00
2022-11-15 15:06:58 +00:00
2022-11-15 15:06:58 +00:00
2022-11-15 15:06:58 +00:00
2022-02-07 17:21:59 +03:00
2022-02-07 17:21:59 +03:00
2022-03-11 15:36:05 +03:00
2023-11-08 15:45:48 +00:00
2021-05-25 13:28:27 +03:00
2023-11-08 15:45:48 +00:00
2022-07-22 16:03:52 +00:00
2022-07-27 15:29:41 +00:00
2022-07-22 16:03:52 +00:00
2022-07-22 16:03:52 +00:00
2021-08-25 21:53:23 +00:00
2021-06-25 18:41:14 +03:00
2022-11-15 15:06:58 +00:00
2022-11-15 15:06:58 +00:00
2022-03-23 21:13:33 +00:00
2023-11-08 15:45:48 +00:00
2021-05-25 13:28:27 +03:00
2022-07-22 16:03:52 +00:00
2023-09-06 11:32:57 +00:00
2023-11-08 15:45:48 +00:00
2022-07-22 16:03:52 +00:00
2022-07-22 16:03:52 +00:00
2023-06-22 07:09:15 +00:00
2023-06-22 07:09:15 +00:00
2023-04-19 20:12:38 +00:00
2021-05-25 13:28:26 +03: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
2022-07-22 16:03:52 +00:00
2023-09-22 13:49:59 +00:00
2021-06-07 15:25:47 +03:00
2021-05-25 13:28:27 +03:00
2022-07-22 16:03:52 +00:00
2023-06-07 16:45:28 +00:00
2023-11-08 15:45:48 +00:00
2021-10-26 19:37:57 +03:00
2021-10-26 19:37:57 +03:00
2023-10-24 07:27:07 +00:00
2021-10-01 22:09:33 +03:00
2021-10-01 22:09:33 +03:00
2022-05-27 13:56:34 +00:00
2022-05-27 13:56:34 +00:00
2023-08-02 08:00:33 +00:00
2023-08-02 08:00:33 +00:00
2022-07-22 16:03:52 +00:00
2023-11-08 15:45:48 +00:00
2022-07-22 16:03:52 +00:00
2023-09-04 08:05:07 +00:00
2022-07-22 16:03:52 +00:00
2022-03-23 21:13:33 +00:00
2023-07-10 10:26:43 +00:00
2021-09-27 16:12:27 +03:00
2021-11-12 15:20:45 +03:00
2022-07-27 15:29:41 +00:00
2022-12-09 15:10:03 +00:00
2022-12-09 15:10:03 +00:00
2022-03-23 09:54:46 +00:00
2022-07-22 16:03:52 +00:00
2022-07-22 16:03:52 +00:00
2021-05-25 13:28:26 +03:00
2021-05-25 13:28:26 +03:00
2022-04-05 15:50:43 +00:00
2022-11-15 15:06:58 +00:00