Commit Graph

32 Commits

Author SHA1 Message Date
Vladimir Sukharev febac0dd5f [Tests] Migrate backend-independent tests from native to compiler/testData.
^KT-65979
2024-02-26 13:38:49 +00:00
vladislav.grechko 34bac48541 Add JVM ABI K1/K2 consistency tests 2023-12-26 10:18:19 +00:00
Pavel Kunyavskiy 733ca5a358 [K/N] Unmute tests already working on native
Also, add issue references for some tests
2023-06-06 14:29:21 +00:00
Mads Ager 59c2bde10a [K/N] Unmute passing tests. 2022-08-01 08:57:16 +00:00
Dmitriy Novozhilov aeb68f956c [FIR] Turn LEAKED_IN_PLACE_LAMBDA into a warning 2022-02-18 17:44:36 +03: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
Dmitriy Dolovov 1e8dbd4846 [Native][tests] Add ExperimentalContracts OPT_IN directive for kt47300.kt
Without this directive the test can't be compiled by Kotlin/Native, because the box() function which is annotated with @ExperimentalContracts is called from the generated test runner source code that itself is not marked by this annotation.
2021-11-11 12:33:00 +03:00
Roman Artemev 686e5e7f2b [TEST] Fix test data.
Due to JS IR runner doesn't override stdout test fails.
Remove using stdout from test.
2021-10-11 21:19:28 +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
Mikhail Glukhikh fc6403679a Rename !USE_EXPERIMENTAL test directive to !OPT_IN 2021-09-10 16:29:16 +03:00
Dmitry Petrov ce107d06d4 JVM_IR add test for KT-47300 2021-06-17 21:40:30 +03:00
pyos 1f9db7cf25 FE: properly clear the deferred generator stack
Before this commit the stack wasn't cleared for read variable case.
#KT-47168 Fixed
2021-06-11 15:56:20 +03:00
Dmitry Petrov f228c3bb04 Add tests for KT-45236 2021-04-21 17:24:41 +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
Dmitriy Novozhilov af5a635f85 [Test] Ignore error diagnostics from FIR in some BB tests 2021-01-12 18:35:39 +03:00
Dmitriy Novozhilov b416c669b0 [TEST] Update testdata due to dropped COMMON_COROUTINE_TEST directive 2020-12-10 01:31:04 +03:00
Ilmir Usmanov 3b5706972e Extract effect from lambda argument if it is in parentheses
Otherwise, contracts on the parameter have no effect.
 #KT-42044 Fixed
 #KT-26229 Fixed
2020-10-12 20:16:19 +02:00
Ilmir Usmanov b403b63f48 Ease field initialization check
Since there is already VAL_REASSIGNMENT diagnostics, we can safely only
for direct assignments.
 #KT-40893 Fixed
2020-08-07 14:22:18 +02:00
Ilmir Usmanov 4d21a496fe Minor. Update tests 2020-07-31 14:33:52 +02:00
Ilmir Usmanov 2c205410fa Check whether the field is indeed being initialized
in checkFieldInExactlyOnceLambdaInitialization
 #KT-40691 Fixed
2020-07-30 19:04:54 +02:00
Ilmir Usmanov f0006f2405 Minor. Add regression test
#KT-39374 Fixed
2020-06-05 21:30:24 +02:00
Ilmir Usmanov 8cc5f2abfb Forbid val field initialization inside EXACLTY_ONCE lambda
unless the lambda is inline. This way, final field will remain final.
2020-06-04 21:26:48 +02:00
Ilmir Usmanov 5f3e296f19 Fix bugs with capturing rhs into EXACTLY_ONCE lambda
There are multiple ways to declare a named variable-like entity in
Kotlin:
1. val/var variable declaration
2. destructuring declaration
3. parameter of a function
4. parameter of a lambda
5. destructured lambda parameter
6. for-loop's variable declaration
7. catch block exception declaration
8. val in when
9. field declaration

Out of them, only variable and field can be assignable, in other words,
they can be on the left hand side of an assignment.
Val/var variable declarations were already supported.
So, we needed to just support field initialization and tell the backend
that other ways are prohibited. Function and lambda parameters were
already been supported. So, the only thing to explain to the backend are
remaining ways.
 #KT-39113 Fixed
 #KT-34048 Fixed
2020-05-29 09:55:04 +02:00
Mikhail Glukhikh 0f0e5e603d [FIR2IR] Use IR built-in types, their symbols & constructors directly 2020-03-18 17:09:36 +03:00
Mikhail Glukhikh 0fee8a6946 FIR2IR: cache functions and their parents properly 2020-03-04 16:55:33 +03:00
Mikhail Zarechenskiy 3cf77d29b5 Unmute test for NI
It was fixed in 7f6c03c9
2020-02-17 10:29:45 +03:00
Mikhail Zarechenskiy abc5eb4740 [NI-MIGRATE-BAD] Update problematic/questionable tests
These tests are going to be reviewed in more detail before 1.4
2020-02-13 11:15:59 +03:00
Mark Punzalan 9df2f69f09 [FIR] Disable failing blackbox codegen tests for FIR. 2019-11-19 11:00:09 +03:00
Alexander Udalov 4164b620e8 Minor, remove obsolete directives and suppressions from contracts test data 2019-11-07 15:20:34 +01:00
Alexander Udalov 66e19b13ce IR: create shared variables for val-variables when needed
This is possible when a lambda's contract guarantees initialization of a
variable.
2019-11-07 15:20:34 +01:00
Ilmir Usmanov 08794d17a0 Do not box function argument if it is used in EXACTLY_ONCE lambda
Since we cannot change type of parameter, we cannot replace it with
box type.
 #KT-29510 Fixed
 #KT-29614 Fixed
 #KT-29385 Fixed
2019-09-30 17:42:17 +03:00
Ilmir Usmanov 8a01da6ec6 Support val initialization in non-inline function with EXACTLY_ONCE effect
by generating a box for the value.
 #KT-26126 Fixed
2018-12-28 15:09:11 +03:00