Commit Graph

75 Commits

Author SHA1 Message Date
Mikhail Glukhikh 6ed7c041b4 K1/K2: add various tests for context receiver tower resolve priority
Related to KT-64531, KT-64488
#KT-64531 As Designed
2024-02-14 09:55:51 +00:00
Evgeniy.Zhelenskiy 7eab4b672d [K1, K2, CLI] Mark whole position range of compiler diagnostics in CLI
#KT-64989
2024-02-08 12:59:31 +00:00
anzhela.sukhanova 7587f73846 [Test] KT-61937: add tests with context functions and naming clash
Update tests for ^KT-61937


Merge-request: KT-MR-13678
Merged-by: Anzhela Sukhanova <anzhela.sukhanova@jetbrains.com>
2024-01-18 08:27:31 +00:00
Tomas Husak 91465d7110 [FIR] KT-59421 add checker context receiver property backing field 2023-12-13 07:12:11 +00:00
Tomas Husak d7eb67a436 [FIR] KT-59368 context receiver subtyping checker 2023-12-06 17:34:05 +00:00
Nikolay Lunyak 427c067cd8 [FIR] Forbid typeRef-named labels without +ContextReceivers
^KT-63068 Fixed
2023-11-22 13:22:45 +00:00
Anastasia.Nekrasova fb0461f422 [K2] Disappeared UNSUPPORTED_FEATURE (3)
Added a check for the enabled context receivers feature flag for @ContextFunctionTypeParams.

^KT-59913
2023-11-22 06:04:13 +00:00
Anastasia.Nekrasova c04767f1f4 [K2] Disappeared UNSUPPORTED_FEATURE (2)
Added a check for the enabled context receivers feature flag for declaration.

^KT-59913
2023-11-22 06:04:13 +00:00
Anastasia.Nekrasova 685c8e4fe7 [K2] Disappeared UNSUPPORTED_FEATURE (1)
Added a check for the enabled context receivers feature flag for typeRef.

^KT-59913
2023-11-22 06:04:13 +00:00
Nikolay Lunyak 425d5e808b [FIR] Link some tests with issues
Just in case.

^KT-59874
2023-11-14 15:19:33 +00:00
Nikolay Lunyak d03039b949 [FIR] Don't generate property fields when context receivers are present
^KT-59874
2023-11-14 15:19:32 +00:00
Kirill Rakhman 0682a1f76d [FIR] Remove line breaks after context receivers in diagnostic messages
#KT-62944 Fixed
2023-11-02 08:58:28 +00:00
Ilya Chernikov 268d058bbb Implement missing invoke resolution branch with context receivers
#KT-61937 fixed
Note: the current implementation only resolves for a single receiver
in each group. See KT-62712 and KT-62709 for the followup.
2023-10-19 19:39:31 +00:00
Kirill Rakhman fa77e3952d [FIR] Bring equivalent call behavior closer to K1
#KT-61159 Fixed
2023-08-21 12:11:58 +00:00
Kirill Rakhman 5b9c35de2e [Tests] Update test data with error suppression warnings
#KT-61129 Fixed
2023-08-18 13:29:20 +00:00
Nikolay Lunyak 7151e6a41c [FIR] Report UNSUPPORTED_CONTEXTUAL_DECLARATION_CALL
^KT-59969 Fixed
2023-08-04 15:17:21 +00:00
Kirill Rakhman 951b299268 [FIR] Rewrite redeclaration checks
#KT-60124 Fixed
#KT-60573 Fixed
2023-07-27 08:06:20 +00:00
Brian Norman 61acd2b6f5 [FIR] Do not allow context receivers on value classes
#KT-59413 Fixed
2023-07-07 11:41:59 +00:00
Kirill Rakhman 5abab2197b [FIR] Adapt positioning of NO_VALUE_FOR_PARAMETER to match K1 2023-07-04 16:00:45 +00:00
Ilya Kirillov 1bbcae5ed2 [FIR] fix resolve contract violation from scopes
We cannot call lazy resolve to STATUS phase from scopes as scopes may be accessed on a STATUS phase or earlier

^KT-54890
^KTIJ-23587 fixed
2023-01-13 21:32:51 +00:00
Ilya Kirillov 644d1bf0d0 [FIR] ignore tests which fail because of resolve contracts violation 2022-12-12 16:21:07 +00:00
Pavel Mikhailovskii 08767d572b KT-51247 Fix resolution of functional types with context receivers 2022-12-09 15:29:39 +00:00
Evgeniy.Zhelenskiy 0c70b60988 [IR] Add context receiver test on MFVC
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2022-11-30 18:55:33 +00:00
Dmitriy Novozhilov 0e84bf2053 [FIR] Don't report ARGUMENT_TYPE_MISMATCH on error types 2022-11-22 15:46:19 +00:00
Ilya Chernikov 5b3816cce5 Test infra: refactor IGNORE_BACKEND directive
treat it as a general one, introduce *_K1 and *_K2 variants for
more specific ignoring
2022-11-12 16:28:23 +01:00
Nikolay Lunyak fcd3e4f4c5 [FIR JS] KT-51740: Alter positioning of NO_VALUE_FOR_PARAMETER 2022-09-30 21:39:20 +03:00
Dmitry Khalanskiy 4cbee3cde7 Fix KT-51478
The issue was that, when various context elements were available
to fulfill a need for an extension receiver, but none of them were
applicable to it, the compiler behaved the same way as if there
was no extension receiver at all.

https://youtrack.jetbrains.com/issue/KT-51478/Inapplicable-receiver-diagnostic-expected-when-there-are-two-context-receiver-candidates
2022-09-20 10:32:32 +00:00
Anastasia.Shadrina 292c0c4383 [FE] KT-51234 Check subtyping between context receivers 2022-05-17 15:27:27 +00:00
Anastasia.Shadrina d857142514 KT-51243 Fix parameterized contextual lambda
^KT-51243 Fixed
2022-05-17 15:27:26 +00:00
Denis.Zharkov 3d06a92eea K1: Adjust positioning for NO_CONTEXT_RECEIVER 2022-04-06 16:05:41 +00:00
Denis.Zharkov 512446843b FIR: Support typeRef-name label for this 2022-04-06 16:05:37 +00:00
Denis.Zharkov dfc736161a FIR: Fix overload resolution with context receivers 2022-04-06 16:05:35 +00:00
Denis.Zharkov 4349060db1 K1: Support referencing class context receivers in a form of this@Name 2022-04-06 16:05:34 +00:00
Denis.Zharkov 202413c2f4 FIR: Add context receivers from the containing class to constructors 2022-04-06 16:05:33 +00:00
Denis.Zharkov b2d5bf3eae FIR: Adjust diagnostics test data after resolution of context receivers 2022-04-06 16:05:32 +00:00
Victor Petukhov 27fa632630 [FE 1.0] Update test data with new error type representation 2022-03-23 21:13:33 +00:00
Anastasia.Shadrina a86b4d767e [FE] KT-50878 Prohibit using contextual declarations without -Xcontext-receivers 2022-01-21 17:21:59 +03:00
Anastasia.Shadrina ea33da3a8d [FE] Fix: do not report ambiguous label if label map is empty 2021-12-21 10:41:46 +03:00
Anastasia.Shadrina 343a860553 [FE] Make OverloadChecker take CR into account 2021-12-14 15:19:42 +03:00
Ivan Kylchik b131c52889 Drop all usages of WITH_RUNTIME directive 2021-12-13 18:07:11 +03:00
Anastasiya Shadrina 4d3035e2f7 [Parser] Do not support local contextual declarations 2021-12-03 20:22:17 +03:00
Anastasiya Shadrina 2d088196ce [FE] Fill DESCRIPTOR_TO_CONTEXT_RECEIVER_MAP only with CR enabled 2021-12-02 20:25:06 +03:00
Anastasiya Shadrina 9e2271399e [FE] Render context receivers for functions, properties, and classes 2021-12-02 20:25:05 +03:00
Anastasiya Shadrina 2b30c1eb5d [FE] Do not change original semantics in LabelResolver 2021-12-02 20:25:00 +03:00
Anastasiya Shadrina 5d76f979cf [Tests] Minor: add FIR_IDENTICAL to typeParameterAsContextReceiver.kt 2021-12-02 20:24:59 +03:00
Anastasiya Shadrina a70036c945 [Tests] Add a test with type parameter as a context receiver 2021-12-02 20:24:58 +03:00
Anastasiya Shadrina 752bc299f1 [FE, Tests] Passing context(A, B) where context(B, A) expected 2021-12-02 20:24:56 +03:00
Anastasiya Shadrina ac27fda965 [FE] Report ambiguity when label can refer to multiple receivers 2021-12-02 20:24:44 +03:00
Anastasiya Shadrina 7ab9b68ad5 [FE] Move type-related checks to TypeResolver 2021-12-02 20:24:41 +03:00
Anastasiya Shadrina c59ed6344e [Tests] Make build green again 2021-12-02 20:24:31 +03:00