Commit Graph

7489 Commits

Author SHA1 Message Date
Pavel Kunyavskiy 62fb3df7f0 [K/N] Disable scope initialization on constant access
^KT-57098
2023-03-15 09:03:19 +00:00
Vladimir Sukharev 5bd0a1a0ba Disable some tests due to open issues and incompatibility with K1/MPP
Merge-request: KT-MR-9206
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-03-15 06:55:27 +00:00
Alexander Udalov f0fba7be64 K2: add bytecode listing tests
#KT-57171 Fixed
2023-03-14 21:57:26 +01:00
Ivan Kylchik 49fdfc2992 Suppress some JMV IR inliner delegation tests for K2 2023-03-14 20:47:46 +00:00
Ivan Kylchik d2e92fd70d Add additional test cases and notes for KT44429 2023-03-14 20:47:45 +00:00
Ivan Kylchik 0af4ef8ee9 Fix typo in test name: inlinInDefault -> inlineInDefault 2023-03-14 20:47:43 +00:00
Ivan Kylchik b812a6c6f5 Ignore tests that are currently not working with IR inliner 2023-03-14 20:47:42 +00:00
Ivan Kylchik bb401c39d9 Add several new SMAP tests
Some of them are still failing and suppose to be
fixed later
2023-03-14 20:47:39 +00:00
Pavel Kunyavskiy dc2e072af2 [K/N] Make exception handling in initializers more consistent with jvm
^KT-57091
2023-03-14 12:59:14 +00:00
vladislav.grechko 35dfcb61bb Fix specialization of equality comparison calls for inline classes
Receiver of equals() call should be checked instead of argument

^KT-57261: Fixed
2023-03-13 23:39:35 +00:00
vladislav.grechko 8039e30bbd Fix condition of generating equals-impl0 call
This methods should not be called when instances of different inline
classes are being compared

^KT-57242: Fixed
2023-03-13 23:39:34 +00:00
Evgeniy.Zhelenskiy 948714e7e5 [IR] Fix delegating MFVC constructors
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2023-03-13 19:49:10 +01:00
Svyatoslav Kuzmich a99ea1d3ce [Wasm] Support enumValues and enumValueOf functions
^KT-57276 Fixed

Merge-request: KT-MR-9169
Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
2023-03-13 14:13:31 +00:00
Evgeniy.Zhelenskiy 3b5ad0681f [IR] Fix compiler bugs with MFVC to let KorGE run
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2023-03-13 13:09:56 +00:00
Evgeniy.Zhelenskiy 9b3fc34f78 [IR] Add for statement to tests for MFVC returning from inline functions
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2023-03-13 13:09:56 +00:00
Evgeniy.Zhelenskiy 19424702e0 [IR] Fix mutable shared reference of MFVC type
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2023-03-13 13:09:55 +00:00
Kirill Rakhman b476eee6e3 [FIR2IR] Simplify generation of bound callable reference receivers
Remove a bunch of custom logic to determine when a callable reference is
bound or not (and hence mustn't have a receiver). Instead, a helper
extension is introduced to determine when a callable reference is bound
by checking if dispatch/extensionReceiver is not FirNoReceiver and the
referenced member is not static.

#KT-57253 Fixed
2023-03-13 08:48:39 +00:00
Mikhail Glukhikh a3f0e429e3 K2: report empty intersection warnings from completion properly 2023-03-11 10:15:25 +00:00
Nikolay Krasko 57934a6870 Revert "Revert "[K2/N] KT-57026, KT-57208: Adjust Native & JS test infrastructures for MPP testing""
This reverts commit c0c692844e.
2023-03-10 14:24:49 +01:00
Nikolay Krasko c0c692844e Revert "[K2/N] KT-57026, KT-57208: Adjust Native & JS test infrastructures for MPP testing"
This reverts commit 6964121c15.
2023-03-10 13:14:10 +00:00
Kirill Rakhman 0e721c8fc2 [FIR2IR] Fix generation of val initialization after smart-cast
If neither setter nor backing field were found for an assignment call,
search overridden properties for backing fields.

^KT-57105 Fixed
2023-03-10 09:30:51 +00:00
Vladimir Sukharev 6964121c15 [K2/N] KT-57026, KT-57208: Adjust Native & JS test infrastructures for MPP testing
Merge-request: KT-MR-9081
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-03-09 18:56:30 +00:00
Svyatoslav Kuzmich 525317962c [Wasm] Test js(code) with vararg parameter 2023-03-09 12:50:14 +00:00
Svyatoslav Kuzmich d5b958f744 [Wasm] Support default parameter values in functions with js(code) 2023-03-09 12:50:14 +00:00
vladislav.grechko 17e6099b53 Initialize 'source' property of FirCatch objects properly
^KT-56923: Fixed
^KT-56755: Fixed
2023-03-08 12:03:35 +00:00
Kirill Rakhman c4255cdb0f [FIR2IR] Fix adapted callable reference to nested class constructor
^KT-56829 Fixed
2023-03-08 08:36:52 +00:00
Kirill Rakhman e0baeb53db [FIR] Fix substituted synthetic property with overridden getter only
When building the original for a substitution override for a synthetic
property, use the initial setter as fallback when unsubstituting it
returns null. This can happen when a generic class overrides the getter
of a synthetic property of a non-generic class. Then the setter is never
substituted, therefore there is nothing to unsubstitute.

^KT-57168 Fixed
2023-03-08 08:35:02 +00:00
Ilya Chernikov b3d0a0a1c8 FIR LT: support labelled destructured declarations
add missing conversion in the LT to FIR converter
#KT-56759 fixed
2023-03-08 07:28:35 +00:00
Igor Chevdar 315d9089b0 [box-tests] Another version of reproducer for KT-56965 2023-03-08 06:48:52 +00:00
Igor Chevdar 99ec3215d9 [box-tests] Added a reproducer for KT-57053 2023-03-08 06:48:51 +00:00
Evgeniy.Zhelenskiy 88f293d4a9 [IR] Support reflection for MFVC
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2023-03-07 21:44:43 +00:00
Evgeniy.Zhelenskiy 5b868becf4 [IR] Hide regular class constructor with MFVC parameters
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2023-03-07 21:44:41 +00:00
Pavel Mikhailovskii 9db5ea66a6 KT-57103 Don't inline references to generic synthetic Java properties in K1 2023-03-07 17:35:04 +00:00
Zalim Bashorov 4d7cf81ed0 [Wasm] Stop supporting "_export.js" in test infra, use import/export capability in relevant tests
* It works slightly differently in SpiderMonkey.
* It was a hack.
2023-03-06 23:19:02 +01:00
Zalim Bashorov bec827b654 [Wasm] Update SpiderMonkey to 112.0a1 (2023-03-04-09-52-24) 2023-03-06 23:19:02 +01:00
Alexander Udalov 47c48efa33 JVM IR: do not generate extension receiver parameter as ACC_MANDATED
Otherwise Java reflection is not able to load its type as a
parameterized type.

 #KT-40857 Fixed
2023-03-06 20:57:52 +00:00
Kirill Rakhman b80970b09f [FIR] Fix references to generic synthetic properties
When synthetic properties are built from a substitution override,
set originalForSubstitutionOverride, too.

^KT-56251 Fixed
2023-03-06 09:45:02 +00:00
vladislav.grechko 7033d78641 Fix SAM conversion generation condition
Remove check if array is passed to vararg parameter as it's not
relevant anymore and leads to ^KT-51821.

^KT-51821: Fixed
2023-03-04 12:53:48 +00:00
Sergej Jaskiewicz f40278c036 An option to allow out-of-scope type parameters in IrManglerComputer
In the lowered IR there are often references to type parameters whose
containers are not in the current scope. This is incorrect semantically,
but it works in practice due to erasure, so when the mangler is used on
the lowered IR, we don't want to crash the compiler.
2023-03-03 22:08:57 +00:00
Svyatoslav Kuzmich 01fcc84d73 [Wasm] Refactor callingWasmDirectly.kt test from @JsFun to @WasmImport 2023-03-03 19:39:11 +00:00
Svyatoslav Kuzmich 7175b9f31c [Wasm] Migrate usages of @JsFun to js("code") 2023-03-03 19:39:10 +00:00
Svyatoslav Kuzmich 71e6b19760 [Wasm] Support restricted version of js("code") (KT-56955) 2023-03-03 19:39:09 +00:00
Svyatoslav Kuzmich 3c35328c09 [Wasm] Fix overriding external fun with default parameters (Fix KT-56976) 2023-03-03 12:33:53 +00:00
Kirill Rakhman 1f0e6321b0 [FIR2IR] Use companion as bound receiver if expected type requires it
A::foo is preferably resolved as an unbound reference to A.foo, however
if A.Companion is a subtype of A and the expected type has one fewer
parameter than the type of the unbound reference, generate a bound
reference with the companion as receiver.

^KT-56519 Fixed
2023-03-02 10:55:46 +00:00
Nikolay Lunyak bcfafc601e Add EnumEntries to minimal-stdlib-for-tests
This change allows to revert adding `WITH_STDLIB` directive
to tests which happened at `a9343aeb`.

Co-authored-by: Alexander Udalov <Alexander.Udalov@jetbrains.com>
2023-03-02 10:23:38 +00:00
Kirill Rakhman 3b9724d20e [FIR] Desugar increment/decrement in body resolve phase
The expression needs to be resolved first to determine if there is a
receiver that needs to be extracted to a temporary variable. Also, the
special case for prefix increment/decrement on local variable without
delegates requires resolution to check if the variable is local.

^KT-56771 Fixed
^KT-56659 Fixed
2023-03-02 10:19:57 +00:00
Kirill Rakhman d00513599b [FIR2IR] Expand typealias in callable reference receiver generation
^KT-56750 Fixed
2023-03-02 08:20:04 +00:00
Ivan Kochurkin ee53c5780f [FIR] Extract K2 MPP test data to the separated directory 2023-03-01 22:10:11 +00:00
Ivan Kochurkin f1fef62f76 [FIR] Consider default values from expect function during serialization
It's not possible to unmute some tests for K2 because it causes testData structure changing

If change testData, NATIVE doesn't work even with `IGNORE_BACKEND`
2023-03-01 22:10:07 +00:00
Ivan Kochurkin d87619e06e [FIR & IR] Support of default values for arguments in expect functions
Add FirActualDeclarationChecker that checks expect/actual return types

^KT-56331 Fixed, ^KT-56334 Fixed
2023-03-01 22:10:07 +00:00