Ivan Kochurkin
42e5e43302
[FIR] Refactor FirTypeResolverImpl.resolveUserType
...
Fix IndexOutOfBoundsException on an attempt to cast an element
to inner class with type parameter
^KT-60921 Fixed
2023-10-03 19:49:56 +00:00
Alejandro Serrano Mena
c2dfe415f3
[Test] Operator ambiguity check with 'set'
...
When using `x[y] += z` the spec mandates attempting all possible combinations.
^KT-62138 Fixed
2023-10-03 08:23:29 +00:00
Mikhail Glukhikh
9cf1d36e5e
K2: don't use outer class type parameters during nested class TP resolve
...
Before this commit, we allowed access to outer class type parameters
during resolve of type parameter bounds of a nested class.
In fact, outer type parameters are accessible in this situation
only if it's an inner class (or a local class).
This commit forbids such a usage. In the earlier fix of KT-57209
the same was done for regular type reference resolve.
#KT-61459 Fixed
#KT-61959 Fixed
2023-10-03 06:34:02 +00:00
Mikhail Glukhikh
cdc197c723
K2: reproduce KT-61959
2023-10-03 06:34:01 +00:00
Mikhail Glukhikh
92470484bf
K2: reproduce KT-61459
2023-10-03 06:34:01 +00:00
Alejandro Serrano Mena
310e89f100
[FIR] Report type-aliased 'Nothing' as return type
...
This warning was issued in K1, but lost in K2
^KT-59420 Fixed
^KT-59429 Fixed
2023-10-03 06:22:35 +00:00
Dmitriy Dolovov
78a962f6d2
[KLIB] Deprecate -Xexpect-actual-linker CLI argument
...
This argument has been finally superseded by `-Xmetadata-klib`.
^KT-61136
2023-10-02 16:21:17 +00:00
Roman Efremov
81fd9a679d
[FIR] Prohibit expect class members with default values actualized
...
...by fake-override.
It is error without deprecation cycle because `expect` and `actual`
classes are still in Beta and expected impact of change is negligible.
^KT-62036 Fixed
2023-10-02 15:50:37 +00:00
Roman Efremov
02680442a0
[Test] Add tests for expect class default arguments which actualized
...
...by fake-override.
^KT-62036
2023-10-02 15:50:37 +00:00
Roman Efremov
7ad23aeb73
[Test] Drop forgotten TODO
...
^KT-62036
2023-10-02 15:50:37 +00:00
Egor Kulikov
c3010dd599
[FIR] Fix NPE on empty throws
...
^KT-60325 fixed
2023-10-02 14:37:00 +00:00
Vladimir Sukharev
3894e719b3
[FIR] Fix disappeared CANNOT_ALL_UNDER_IMPORT_FROM_SINGLETON
...
^KT-59965 Fixed
2023-10-02 11:59:33 +00:00
Alexander Korepanov
0f4c550ee0
[JS IR] Add JS BE diagnostic tests
...
Add tests for:
- EXPORTING_JS_NAME_CLASH
- EXPORTING_JS_NAME_CLASH_ES
^KT-61710
2023-09-23 19:49:17 +02:00
Alexander Korepanov
522952db1f
[JS IR] Run diagnostics by IR before the klib serialization
...
Implement an infrastructure for checking IR before JS klib serialization.
Implement the EXPORTING_JS_NAME_CLASH and EXPORTING_JS_NAME_CLASH_ES checks.
^KT-61710 Fixed
2023-09-23 19:49:17 +02:00
Igor Yakovlev
758484a01f
[Wasm] Fix generation optimised when expression with Nothing type
...
Fixed #KT-62147
2023-09-23 10:18:30 +02:00
Alejandro Serrano Mena
b1551c67e0
KT-59504 [FIR] Check _ on destructuring declarations
...
Previously the checker was ignoring them, leading to missing diagnostics
^KT-59504 Fixed
2023-09-22 21:46:09 +00:00
Kirill Rakhman
fbf68a5bcc
[FIR] Narrow down range of NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER
...
This uses the same approach as
INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION where we use a visitor
to find a call to a symbol that contains the type variable in question.
#KT-56140 Fixed
2023-09-22 13:49:59 +00:00
Mikhail Glukhikh
ae19cd91bf
K2: fix "private to this" determination logic in accordance with K1
...
#KT-61844 Fixed
2023-09-22 12:23:46 +00:00
Mikhail Glukhikh
b9302869d5
K2: reproduce KT-61844
2023-09-22 12:23:46 +00:00
Ilya Chernikov
141333bdcd
K2: Update extension receiver after checking in CheckExtensionReceiver
...
fixes receiver selection when the candidate has more that one possible
extension receiver
#KT-62129 fixed
2023-09-22 11:33:46 +00:00
Vladimir Sukharev
56eedfebee
[FIR] K2: Fix disappeared diagnostic UNDERSCORE_USAGE_WITHOUT_BACKTICKS on types
...
^KT-59985 Fixed
Merge-request: KT-MR-12282
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-09-22 11:18:19 +00:00
Ilya Kirillov
d98da87278
[FIR] Render dot-separated FQNs instead of slash-separated ones in diagnostics
...
^KT-62030 fixed
2023-09-22 10:48:31 +00:00
Vladimir Sukharev
42af684ab7
[FIR] Fix disappeared ILLEGAL_ESCAPE
...
^KT-59950 Fixed
2023-09-22 08:38:50 +00:00
Vladimir Sukharev
70ea0de2db
[FIR] Fix some disappeared AMBIGUOUS_ANONYMOUS_TYPE_INFERRED
...
^KT-59932
Merge-request: KT-MR-12312
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-09-22 07:47:12 +00:00
Brian Norman
e6669b51d4
[FIR] Check standalone companion object qualifiers are visible
2023-09-21 22:33:50 +00:00
Mikhail Glukhikh
156097fe17
Restore KotlinCompilerVersion.IS_PRE_RELEASE
...
This commit is a slightly modified revert of 4f29c113 .
IS_PRE_RELEASE allows to make LATEST_STABLE version behave as
experimental when this flag is set to true.
The general goal is to prepare fix of KT-62058; after this commit
one can do it by changing IS_PRE_RELEASE flag to true.
The fix of KT-62058 is planned to be done during bootstrapping.
This preparation and the future fix are parts of umbrella KT-61951.
2023-09-21 20:09:25 +00:00
Kirill Rakhman
ff812197a8
[Test] Update test data after changes to FIR rendering
2023-09-21 14:02:21 +00:00
Vladimir Sukharev
d7adc0ce32
[FIR] Fix K2: Introduced AMBIGUOUS_ANONYMOUS_TYPE_INFERRED
2023-09-21 13:46:00 +00:00
Pavel Kunyavskiy
cd409abfd8
[Fir2IR] Fix dispatch receiver of fake override lazy function
...
After the fix, it's at least consistent with what generated
for other fake overrides.
^KT-61386
2023-09-21 13:09:32 +00:00
Ivan Kochurkin
b5acd1da6a
[FIR] Fix local RETURN_TYPE_MISMATCH with flexible Unit and multiple Unit returns
2023-09-21 12:52:32 +00:00
Ivan Kochurkin
4b9e15dfa8
[FIR] Fix missing RETURN_TYPE_MISMATCH for labeled return statements
...
in lambda functions, ^KT-59907 Fixed
(cherry picked from commit 8e72f60996 )
2023-09-21 12:52:31 +00:00
Mikhail Glukhikh
c33a6a665d
Revert "Mute a pair of intrinsic trim tests for old BE in LV 2.0"
...
This reverts commit 876a0768e4 .
Related to KT-59171
2023-09-21 12:38:22 +00:00
Mikhail Glukhikh
a77b758efa
LV 2.0: drop reporting FIR_COMPILED_CLASS and relevant stuff
...
#KT-62056 Fixed
Related to KT-59171, KT-61951
2023-09-21 11:14:09 +00:00
Roman Efremov
b232dbf484
[K2] Temporary mute ACTUAL_ANNOTATION_CONFLICTING_DEFAULT_ARGUMENT_VALUE
...
...until tests fixed. Mute on TC is not enough
because user projects compilation are affected.
^KT-62104
2023-09-21 09:05:51 +00:00
Nikolay Lunyak
2801db0e59
[FIR] Unwrap substitution overrides for multiple default values
...
Otherwise, duplicate diagnostics may be reported on
subtypes of the type that actually declares the
problematic override.
2023-09-21 07:48:31 +00:00
Nikolay Lunyak
76fa812949
[FIR] Ensure K2 reports redundant diagnostics for default values
2023-09-21 07:48:31 +00:00
Nikolay Lunyak
8755cf75ac
[FIR] Improve the messages of the multiple defaults diagnostics
...
Mention the base functions where the default
values come from.
2023-09-21 07:48:30 +00:00
Kirill Rakhman
4e1dfcd2a8
[FIR] Improve readability of rendered types in diagnostics
...
#KT-61824 Fixed
#KT-61688 Fixed
2023-09-21 07:18:19 +00:00
Kirill Rakhman
e996760e7e
[FIR] Fix rendering of SUSPENSION_POINT_INSIDE_CRITICAL_SECTION
...
#KT-61826 Fixed
2023-09-21 07:18:19 +00:00
Kirill Rakhman
ed4386a962
[FIR] Fix rendering of NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS
2023-09-21 07:18:19 +00:00
Dmitriy Dolovov
848c88b1a5
[KLIB] Lift up -Xmetadata-klib CLI key from Native to Common args
...
This is a precondition for obsoleting and finally removing
`-Xexpect-actual-linker` CLI key, which became useless since
the removal of ExpectActualTable.
^KT-61136
2023-09-20 22:26:36 +00:00
Ivan Kochurkin
3cd4f7c3aa
[FIR] Consider @PlatformDependent annotation everywhere (including JS and Native)
...
^KT-57858 Fixed
Remove FirEmptyOverridesBackwardCompatibilityHelper since it's not used anymore
Remove overridesMemberWithPlatformDependent.kt test file since it becomes redundant
2023-09-20 17:12:52 +00:00
Mikhail Glukhikh
14bc20652e
K2: process also arguments while calculating postponed atoms
...
#KT-61933 Fixed
2023-09-20 15:42:03 +00:00
Mikhail Glukhikh
0c287c9945
K2: reproduce KT-61933
2023-09-20 15:42:03 +00:00
Roman Efremov
ad4d1a5ba8
[IR] Support ACTUAL_ANNOTATION_CONFLICTING_DEFAULT_ARGUMENT_VALUE in K2
...
It's implemented as IR checker because in K2 constant expressions are
evaluated on backend. FIR diagnostic removed because isn't needed.
"annotationViaActualTypeAlias" test has no `// FIR_IDENTICAL` because
diagnostic reported on entire typealias declaration instead of its name.
This is because in IR+LightTree we have only offsets, so can't navigate
to typealias name element.
^KT-59940 Fixed
2023-09-20 15:40:37 +00:00
Ivan Kochurkin
063835488f
Revert "[FIR] Fix missing RETURN_TYPE_MISMATCH for labeled return statements"
...
This reverts commit 8e72f60996
Since some intellij tests are failing
2023-09-20 12:29:41 +02:00
Vladimir Sukharev
e9d4de658d
[FIR2IR] Don't emit empty body of while/do_while loop
...
Merge-request: KT-MR-12283
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-09-20 10:06:00 +00:00
Kirill Rakhman
5b4409e34c
[FIR] Store abbreviated type in deserialized declarations as attribute
...
#KT-58542 Fixed
2023-09-20 09:31:29 +00:00
Ivan Kochurkin
8e72f60996
[FIR] Fix missing RETURN_TYPE_MISMATCH for labeled return statements
...
in lambda functions, ^KT-59907 Fixed
2023-09-20 09:06:37 +00:00
Kirill Rakhman
2e4d486131
[FIR] Use enhanced scope to guess array type in annotation loading
...
Otherwise, we return null for any java annotation because the
unenhanced scope doesn't contain any properties.
#KT-61856 Fixed
2023-09-20 08:02:37 +00:00