Commit Graph

98 Commits

Author SHA1 Message Date
Artem Kobzar 55d41db2ce [K/JS] Include jsFirEs6Test into jsFirCompilerTest tests 2023-11-24 22:09:43 +00:00
Brian Norman 10ed26991d [FIR] Extract LHS receiver of assignment operator statements
#KT-53490 Fixed
2023-07-12 11:41:33 +00:00
Svyatoslav Kuzmich a3e2d2804c [Wasm] Update testData after adding K2 and new test infra support.
- Actualize muted K2 tests
- Actualize muted K1 tests with module systems because legacy Wasm test
  infra had no respect for "// MODULE: ..." test directives
2023-06-25 10:20:40 +02:00
Alexander Udalov 1588b07472 Tests: unmute light analysis tests passing with JVM_IR 2023-06-22 17:10:51 +02:00
Kirill Rakhman 793e3552e7 [FIR] Add tests for K2-only suspend operators get/set/contains
#KT-57169
2023-05-30 16:48:53 +00:00
Nikita Bobko ac40010501 [FE] Prohibit open val deferred initialization
^KT-57553 Fixed
Review: https://jetbrains.team/p/kt/reviews/9967

Other related tests:
- testUninitializedOrReassignedVariables
- testUseOfPropertiesWithoutPrimary
- @TestMetadata("compiler/testData/diagnostics/tests/secondaryConstructors")
- testAugmentedAssignmentInInitializer
- testInitOpenSetter
- testInitOverrideInConstructorComplex
- testPropertyInitializationOrder
2023-05-23 14:12:28 +03:00
Nikolay Lunyak e2403c801f [FIR] KT-55747: Report error for operator fun mod
^KT-55747 Fixed

Merge-request: KT-MR-8522
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
2023-01-30 08:48:33 +00:00
Vladimir Sukharev 924898afb7 [K/N] KFC-446: K2 platform: Native alpha
Merge-request: KT-MR-7905
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-01-04 16:10:40 +00:00
Dmitriy Novozhilov 1b27d60307 [FIR] Support @OnlyInputTypes annotation
^KT-54807 Fixed
2022-11-22 15:46:17 +00:00
Victor Petukhov 96d1f89836 [BE] Support until operator in back-ends 2022-05-31 08:42:56 +00:00
Alexander Udalov ba20549e13 Fix JVM target in tests using boolean comparisons
These tests don't work on JVM target 1.6 after 6d664bcd10 because we're
generating `Boolean.compare` which is only available since 1.8. (It is
not a big deal because JVM target 1.6 is prohibited for users now.)
2022-05-06 03:47:25 +02:00
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00
Svyatoslav Kuzmich aa5f98f919 [JS] Remove KJS_WITH_FULL_RUNTIME for tests that already have WITH_RUNTIME 2021-10-07 22:36:18 +03:00
Svyatoslav Kuzmich 6eb81517a0 [Wasm] Unmute passed Wasm tests 2021-10-02 06:14:35 +00:00
Svyatoslav Kuzmich c88cde2f8b [Wasm] DONT_TARGET_WASM_BACKEND => IGNORE_BACKEND in testdata 2021-10-02 06:14:35 +00:00
Svyatoslav Kuzmich ab9a23cbfa [Wasm][Stdlib] Reuse K/N collections and StringBuilder 2021-10-01 17:18:49 +03:00
Andrey Zinovyev b1c8669b43 [FIR] Resolve infix calls to infix functions only
Implements INFIX_MODIFIER_REQUIRED diagnostics
2021-05-20 13:46:27 +03:00
Andrey Zinovyev 58c7aa9937 [FIR] Don't replace custom compareTo with default one in primitives 2021-05-13 18:04:43 +03:00
Victor Petukhov cc1cb463b2 Remove NonStrictOnlyInputTypesChecks LF and introduce opposite – StrictOnlyInputTypesChecks, set default as strict 2021-03-29 16:17:30 +03:00
Victor Petukhov 94e6ec7dfd Fix test after 27846f4532 2021-02-25 22:29:45 +03:00
Victor Petukhov 27846f4532 Add tests for obsolete issues (KT-42722, KT-39880) 2021-02-25 15:30:29 +03:00
Dmitry Petrov 744a0fcd25 PSI2IR KT-45022 object in LHS of compound assignment 2021-02-18 20:24:16 +03:00
Alexander Udalov 73aa465ee9 Add tests for issues fixed in JVM IR
Note that KT-30696 is fixed only in the single-module case, and KT-42012
is not fixed fully (see KT-44855).

 #KT-30041
 #KT-30629
 #KT-30696
 #KT-30933
 #KT-32351
 #KT-32749
 #KT-38849
 #KT-42012
 #KT-42990
 #KT-44234
 #KT-44529
 #KT-44631
 #KT-44647
2021-02-10 21:42:10 +01:00
Svyatoslav Kuzmich fdd7fa5aea [Wasm] Mute codegen box tests 2020-11-09 16:04:43 +03:00
Dmitriy Novozhilov 1dc3c93efa [FIR] Don't assume types with not found symbol as error types 2020-09-11 12:13:33 +03:00
Alexander Udalov 74c6d2b951 Do not generate non-standard compareTo as primitive comparison in all backends
Previous changes related to this in the old JVM backend were in
582b1c5e66 and
0482f7e9c5, but they did not affect the
`ProperIeee754Comparisons` mode which became the default in 1.4.0. As a
result, we had a regression here.

Since the `PRIMITIVE_NUMERIC_COMPARISON_INFO` slice is used in psi2ir to
determine how to generate the comparison, this fixes the regression both
in the old JVM backend, and in all IR backends.

 #KT-41426 Fixed
2020-08-27 19:00:11 +02:00
Jinseong Jeon 3e9ac75cfc FIR: record use of backing field symbol to indeed add a backing field 2020-08-25 19:29:58 +03:00
Juan Chen bfac0355bf WIP: [FIR] unmute testKt14227 with FULL_JDK
The test used to fail because it has an augmented assignment for
elements in a HashMap of Strings, and "plus" fails to resolve due to
ambiguity: besides String.plus, BigDecimal.plus in the standard
library is also considered. BigDecimal is not resolved and thus
isError returns true. During type checking, the context has
isErrorTypeEqualsAnything set to true, and BigDecimal is now regarded
as a super type of String and BigDecimal.plus is a valid
candidate. Adding the directive "FULL_JDK" enables resolving of
BigDecimal so that BigDecimal.plus is excluded.
2020-06-01 16:47:15 +03:00
Jinseong Jeon 57fe01c375 FIR2IR: populate overriddenSymbols for overriding functions
#KT-38416 Fixed
2020-04-27 11:50:24 +03:00
Mikhail Zarechenskiy befa1e114c Add tests for obsolete issues
#KT-38092 Obsolete
 #KT-38179 Obsolete
 #KT-35105 Obsolete
 #KT-36696 Obsolete
 #KT-36947 Obsolete
 #KT-37337 Obsolete
 #KT-37309 Obsolete
 #KT-37727 Obsolete
 #KT-37735 Obsolete
 #KT-37853 Obsolete
 #KT-37920 Obsolete
 #KT-37709 Obsolete
 #KT-37706 Obsolete
2020-04-20 04:10:37 +03:00
Jinseong Jeon c370b86141 IR: consolidate generation of synthetic members for data class 2020-04-13 17:30:05 +03:00
Mikhail Glukhikh 5c758af0a6 [FIR] Use ScopeSession from resolve transformer in FIR2IR 2020-04-09 15:22:55 +03:00
Mikhail Glukhikh d7460d47de [FIR] Generate dispatch & extension receivers for variable assignments 2020-04-03 17:21:21 +03:00
Mikhail Glukhikh a0978a50e8 [FIR2IR] Correct 'this' conversion when it points to non-closest class 2020-03-30 16:57:52 +03:00
Mikhail Glukhikh b27152f903 Replace some FIR syntax errors with more proper diagnostics 2020-03-27 16:46:59 +03:00
Jinseong Jeon de0c9a5c73 FIR: use dispatch receiver of the enclosing function if any. 2020-03-25 08:27:21 +03:00
Mikhail Glukhikh 1036d8a35a [FIR] Provide dispatch receiver for 'field' synthetic variable 2020-03-18 17:09:36 +03:00
Mikhail Glukhikh c0f8be5d4e [FIR2IR] Generate setter call for assignments, if any 2020-03-18 17:09:35 +03:00
Dmitriy Novozhilov 2b986194fb [FIR] Add desugaring of array assignments and resolve of it
#KT-37516 Fixed
2020-03-18 11:31:53 +03:00
Mikhail Glukhikh 20c4a7b244 [FIR2IR] Introduce staged transformation (first step)
Now FE IR -> BE IR transformation is performed in multiple stages
controller by Fir2IrConverter. Stages are
 * files & classes registration
 * supertypes & type parameters handling
 * functions & properties signature generation
 * body generation

After each step we have guarantee (with exception of local classes &
type inference combination, and external symbols) that required symbols
(class/function/property/variable/type parameter)
are already bound to real declarations and have correct parents.

This commit also fixes incorrect parents for local classes
2020-03-13 12:18:02 +03:00
Mikhail Glukhikh 1812b490a1 FIR: set anonymous object constructor return type properly 2020-03-11 16:01:57 +03:00
Mikhail Glukhikh 0fee8a6946 FIR2IR: cache functions and their parents properly 2020-03-04 16:55:33 +03:00
Denis Zharkov 8fca343ef0 FIR: Support FirComparisonOperator in Fir2Ir
^KT-31163 Fixed
2020-02-27 18:21:34 +03:00
Mikhail Glukhikh 8c21f04bf4 FIR2IR: determine type parameters before value parameters
Type parameters can be referred from value parameters,
so we should determine them earlier to be able to set their indexes
2020-02-20 18:34:51 +03:00
Mark Punzalan 9df2f69f09 [FIR] Disable failing blackbox codegen tests for FIR. 2019-11-19 11:00:09 +03:00
Alexander Udalov c3729c8189 Reorganize codegen tests for old language versions
Put all files under a single "oldLanguageVersions" directory under test
data of each test
2019-11-07 18:49:27 +01:00
Kristoffer Andersen 8af3b3e51e [Backend] Reorganize version 1.0 codegen tests
- Extract all backend codegen tests that specifically target behaviour
  in to-be-deprecated functionality from language versions < 1.3"
- Remove those tests from the JVM IR test suite.
2019-10-24 16:51:19 +02:00
Anton Bannykh aad9cbbf01 [JS IR BE] Fix tests failing due to reduced runtime 2019-10-04 17:30:45 +03:00
Mikhail Zarechenskiy f8449bf15a [NI] Clear partially resolved calls after resolve of top-level call
#KT-32433 Fixed
2019-09-09 11:04:17 +03:00
Mikhael Bogdanov 4c59d161d4 Support basic reification in IR 2019-04-08 13:10:22 +02:00