Nikita Bobko
f4ba5aaf9a
[FE 1.0] Prohibit implicit Java actualization in K1
...
^KT-58545 Fixed
Review: https://jetbrains.team/p/kt/reviews/10561
It's not yet supported in K2 KT-59213
Related tests:
- ApiTest.testStdlib
- RuntimePublicAPITest.kotlinStdlibRuntimeMerged
- KotlinProjectViewTestGenerated.test_Arrays (in Kotlin plugin)
2023-07-25 22:30:09 +02:00
Kirill Rakhman
53ff4584d4
[FIR] Implement DEFAULT_VALUE_NOT_ALLOWED_IN_OVERRIDE diagnostic
...
#KT-59409 Fixed
2023-07-25 11:25:43 +00:00
Roman Efremov
cedfdbdc66
Fix test became invalid after KT-59739
...
^KT-58551
2023-07-24 14:25:26 +02:00
Roman Efremov
6611a55a60
[FE] Relax rules of matching @Target annotation on expect and actual
...
Allow `expect` targets to be subset of `actual`.
^KT-58551
2023-07-24 09:48:49 +00:00
Roman Efremov
ad84c83ee9
[FE] Skip more special annotations in KMP annotation matching
...
Many errors are reported in stdlib with these annotations
(SinceKotlin, Deprecated, so on).
But having them only on expect is a valid case. E.g. SinceKotlin added
if some old platform-specific API becomes commonized.
^KT-58551
2023-07-24 09:48:49 +00:00
Roman Efremov
1dcdcee452
[FE] Add test for intrinsic const evaluation in KMP annotation matching
...
^KT-58551
2023-07-24 09:48:49 +00:00
Roman Efremov
234f453173
[FE, IR] Don't check SOURCE annotations if actual declaration has no source
...
^KT-58551
2023-07-24 09:48:49 +00:00
Roman Efremov
454756a2b5
[IR] Don't check annotations on expect/actual fake overrides
...
^KT-58551
2023-07-24 09:48:48 +00:00
Roman Efremov
2980179bd7
[IR] Implement IR checker for expect actual annotations matching
...
^KT-58551
2023-07-24 09:48:48 +00:00
Roman Efremov
b6cae1adcc
[FE] Allow @OptionalExpectation to be present only on expect
...
^KT-58551
2023-07-24 09:48:48 +00:00
Roman Efremov
1a4ab9bb4b
[FE] Implement FE logic of expect actual annotations matching
...
This implementation only checks annotations set on expect/actual
declarations and requires further refinement (e.g. checking of other
annotation targets, class scopes within typealiases).
^KT-58551
2023-07-24 09:48:48 +00:00
Nikita Bobko
4f3ecedbca
[FE] Stop ignoring ABSTRACT_MEMBER_NOT_IMPLEMENTED for expect classes
...
^KT-59739 Fixed
Review: https://jetbrains.team/p/kt/reviews/11038/timeline
2023-07-24 09:15:11 +00:00
Ivan Kochurkin
8c39b2f71d
[FIR] Report missing NO_ELSE_IN_WHEN for when statement with expect enums and sealed classes
...
^KT-59404 Fixed
2023-07-20 11:04:17 +00:00
Kirill Rakhman
ff6b3350ae
[FIR] Resolve array literal with non-primitive-array expected type as arrayOf call
...
This lets us properly complete the call which fixes some issues with
false-positive type mismatches.
This change doesn't apply to array literals in annotation calls yet
because they are resolved as context-dependent.
This will be adapted in a following commit.
#KT-59581
2023-07-19 13:34:58 +00:00
Ivan Kochurkin
5f1e2764c3
[FIR] Fix some missing EXPECTED_DECLARATION_WITH_BODY
2023-07-19 10:14:08 +00:00
Ivan Kochurkin
8f4a580c17
[FIR] Report EXPECTED_CLASS_CONSTRUCTOR_DELEGATION_CALL
...
^KT-59069 Fixed
2023-07-19 10:14:08 +00:00
Kirill Rakhman
883102c4c6
[FIR] Always run expect actual matching for actual annotation/inline class primary constructor
...
Previously, we didn't run it when the primary constructor itself didn't
have the actual modifier even though the modifier is optional.
#KT-60120 Fixed
2023-07-17 12:06:37 +00:00
Roman Efremov
a79282cec1
[FE] Prohibit actual typealias to certain compiler annotations
...
^KT-58554
2023-07-13 16:12:59 +00:00
Ivan Kochurkin
f4a648aa3e
[K2, MPP] Fix NO_ACTUAL_FOR_EXPECT reporting for all modules including the platform ones
...
^KT-58483 Fixed
2023-07-13 16:01:26 +00:00
Roman Efremov
4a598afc36
[FE] Prohibit expect or actual opt-in annotations
...
^KT-58554
2023-07-13 08:15:42 +00:00
Nikolay Lunyak
b46d4e5399
[FIR] Check classes for EXPECTED_PRIVATE_DECLARATION
2023-07-10 09:28:54 +00:00
Kirill Rakhman
04f16d75d2
[K2 MPP] Fix hasStableParameterNames check for fake overrides
...
This fixes a false positive error regarding different
parameter names in expect actual matching with fake overrides.
#KT-59737 Fixed
2023-07-05 13:30:01 +00:00
Kirill Rakhman
c7ae3c75db
[FIR] Don't require delegated constructor calls for expect constructors
...
#KT-59640 Fixed
2023-07-03 10:17:22 +00:00
Kirill Rakhman
028921ade1
[FIR] Implement checker for value parameter default value type mismatch
...
#KT-58901 Fixed
2023-07-03 10:11:36 +00:00
Kirill Rakhman
c95a9ff55e
[FIR] Only mark declaration name with ACTUAL_WITHOUT_EXPECT
...
#KT-58827 Fixed
2023-06-22 14:59:19 +00:00
Dmitriy Novozhilov
1b24b95cde
[FIR] Check for subtyping during actualization of supertypes of expect class
...
^KT-59356 Fixed
2023-06-22 07:05:31 +00:00
Kirill Rakhman
6a073e0b17
[FIR] Fix duplicate spaces in FirPartialModifierRenderer
2023-06-21 08:36:46 +00:00
Dmitriy Novozhilov
d972b78627
[FIR] Allow actualization of expect classes by classes with wider visibility
...
^KT-59355 Fixed
2023-06-19 11:09:32 +00:00
Brian Norman
0ff9982b31
[FIR] Additional errors to distinguish resolution to classifier cases
...
When a call is resolved to a classifier, only a single error message was
being used for multiple cases. This lead to confusion as the default
message may not be applicable to a given error case. Added additional
errors and messages to distinguish between these error cases.
#KT-57251 Fixed
2023-06-16 16:26:50 +00:00
Mikhail Glukhikh
0ea0346ec1
FE MPP: add a test with expect value class B : interface with toString
...
Related to KT-54844
2023-06-14 07:09:16 +00:00
Dmitriy Novozhilov
29afd0dc97
[FIR] Properly match expect fun interfaces with java interfaces
2023-06-10 07:33:30 +00:00
Dmitriy Novozhilov
1418a2bcb8
[Test] Temporary update testdata till KT-58829 will be fixed
2023-06-10 07:33:30 +00:00
Dmitriy Novozhilov
af041f5bef
[Test] Update test according to KT-58899
2023-06-10 07:33:30 +00:00
Dmitriy Novozhilov
8b9079d026
[Expect/Actual] Add ability to skip matching of constructors of expect enums
...
In terms of MPP there are no such thing as `expect constructor` for enums,
but they are physically exist in FIR and IR, so we need a switch which
skips matching for them
FE 1.0 implementation did not touch to avoid any hidden changes
2023-06-10 07:33:29 +00:00
Dmitriy Novozhilov
ba41e8ec38
[IR] Use common expect/actual matching algorithm in IR actualizer
...
^KT-58578 Fixed
2023-06-10 07:33:29 +00:00
Roman Efremov
d2eb4a0abf
[FE] Prohibit default arguments in expect declarations actualized via typealias
...
Cases when default argument inhertied from super class are allowed.
Some tests for default arguments already exist and can be found in
`testData/diagnostics/tests/multiplatform/defaultArguments`, for example
`annotationsViaActualTypeAlias.kt`.
^KT-57614 Fixed
Merge-request: KT-MR-10356
Merged-by: Roman Efremov <Roman.Efremov@jetbrains.com >
2023-05-31 13:14:37 +00:00
Ivan Kochurkin
432c781ff7
[K2, MPP] Fix actualization of fake overrides (fixes a set of bugs in coroutines / ktor)
...
Split MissingFakeOverridesAdder on FakeOverridesActualizer and ActualFakeOverridesAdder
^KT-57984 Fixed
^KT-58003 Fixed
^KT-58124 Fixed
^KT-57833 Fixed
^KT-58153 Fixed
2023-05-24 14:54:51 +00:00
Roman Efremov
439cc88525
[FE] Prohibit expect external and expect tailrec
...
^KT-58536 Fixed
2023-05-23 12:43:51 +00:00
Dmitriy Novozhilov
b19116d3af
[FIR] Provide implementation of ExpectActualMatchingContext for FIR
...
^KT-58578
2023-05-19 10:19:17 +00:00
Dmitriy Novozhilov
6544220b3e
[FIR] Check only for visibility modifiers for NON_PRIVATE_OR_PROTECTED_CONSTRUCTOR_IN_SEALED error
...
^KT-58033 Fixed
2023-04-19 14:53:42 +00:00
Roman Efremov
c718c77c43
[FE] Check visibilities of expected and actual property setters are compatible
...
^KT-30905 Fixed
2023-04-06 13:10:30 +00:00
Roman Efremov
456d3e0f42
[FE] Prohibit expect fun interface to have non-fun actual counterpart
...
In K1 .isFun is always false for Java classes, so extra check
is added for that. This is not needed for K2, because .isFun is
true for all Java classes. Here it is not necessary to check
that interface has only one method, because such check will be
done in the place where interface implementation is created.
^KT-39362 Fixed
2023-04-05 07:31:58 +00:00
Roman Efremov
bcf4528763
[MPP] Forbid actual member in expect class
...
Such member descriptor will be actual and expect at the same time,
so we should run both checks.
^KT-40903 Fixed
2023-04-04 12:28:00 +00:00
Kirill Rakhman
3b0c36da3f
[FIR] Fix ClassCastException when rendering ACTUAL_WITHOUT_EXPECT
...
#KT-57320
2023-03-29 10:19:47 +00:00
Kirill Rakhman
60b227c519
[FIR] Sort HMPP dependencies topologically for symbol providers
...
This fixes an issue where an actual class from an intermediate module
has more supertypes than its expect declaration which leads to a
false-positive resolution error because a type reference resolves to the
expect class. The fix is to sort the dependencies topologically from
"most actual" to "most expect" when creating the list of symbol
providers.
#KT-57369 Fixed
2023-03-27 07:41:05 +00:00
Dmitrii Gridin
9a4a3d1f49
[LL FIR] introduce test with reversed resolve order
...
^KT-56543
Merge-request: KT-MR-9299
Merged-by: Dmitrii Gridin <dmitry.gridin@jetbrains.com >
2023-03-22 17:34:07 +00:00
Ivan Kochurkin
cd07eba25c
[K2, MPP] Fix reporting of MANY_INTERFACES_MEMBER_NOT_IMPLEMENTED
2023-03-22 01:28:19 +00:00
Ivan Kochurkin
60edf1def3
[K2, MPP] Support actualization of enums and annotations that have primary constructor with arguments
...
^KT-57241 Fixed
2023-03-22 01:28:18 +00:00
Ivan Kochurkin
44807b7bd4
[K2, MPP] Support actualization of actual function with dynamic arguments
...
^KT-57210 Fixed
2023-03-22 01:28:18 +00:00
Ivan Kochurkin
ec34b9fa7b
[K2, MPP] Restore ir functions actualization by argument types instead of full signatures
...
Refactor IrActualizer
2023-03-22 01:28:17 +00:00