Commit Graph

86 Commits

Author SHA1 Message Date
Evgeniy.Zhelenskiy ec2e96f3e4 Regenerate inline class tests as 1 arg value classes 2021-12-15 17:14:22 +00:00
Dmitry Petrov e47871f98b JVM_IR KT-50215 KT-50076 extra test 2021-12-13 20:34:57 +03:00
Ilya Goncharov 6adcbe081e [JS IR] Consider erasing type parameters in return type in js signatures 2021-12-13 16:16:59 +00:00
Evgeniy.Zhelenskiy b1d1f87318 [Tests] Introduce reversible source file preprocessor 2021-12-10 18:19:17 +03:00
Evgeniy.Zhelenskiy cb4ec932d7 [Tests] Introduce replacing source transformer 2021-12-10 18:19:17 +03:00
Evgeniy.Zhelenskiy cd1d77e760 [Tests] Regenerate tests with correct postfix 2021-12-10 18:19:17 +03:00
Evgeniy.Zhelenskiy c27b647ce8 [Tests] Native tests runTest applies source transformers 2021-12-10 18:19:16 +03:00
Evgeniy.Zhelenskiy e62c6e3eac [Tests] All tests correct generation 2021-12-10 18:19:16 +03:00
Dmitry Petrov 3017397960 JVM_IR fix string concatenation performance issues
KT-50080 KT-50084 KT-50140
2021-12-09 15:32:13 +03:00
Dmitry Petrov 93713a9ad4 JVM_IR KT-47939 use FunInterfaceConstructorReference as base class 2021-12-08 14:12:41 +03:00
Dmitry Petrov 0ccd7a7e0c KT-47939 fun interface constructor reference should throw NPE for null 2021-12-08 14:12:41 +03:00
Dmitry Petrov e179598457 JVM_IR KT-47939 equality for fun interface constructor references 2021-12-08 14:12:38 +03:00
Dmitry Petrov 58f1504aaf KT-47939 basic fun interface constructor reference box test 2021-12-08 14:12:37 +03:00
Alexander Udalov 1471602c9f JVM IR: do not optimize properties with -Xno-optimized-callable-references
#KT-50019 Fixed
2021-12-08 03:15:49 +01:00
Ilmir Usmanov f47a3a3d1c Minor. Regenerate tests 2021-12-08 00:11:55 +01:00
Ilmir Usmanov bb53ba4a2e Enable delegation by interface for inline classes in old FE
#KT-27435
2021-12-08 00:11:54 +01:00
Dmitriy Novozhilov e8868a2eff [Test] Regenerate tests 2021-12-07 13:06:50 +03:00
Victor Petukhov ce2c6f5d1f [FE 1.0] Don't mark type variable as READY_FOR_FIXATION_DECLARED_UPPER_BOUND_WITH_SELF_TYPES if it has complex dependency to other type variables
^KT-49838 Fixed
2021-12-07 11:41:13 +03:00
Mads Ager 529944fe9c [JVM_IR] Fix inline class default method codegen.
Do not coroutine transform static inline class replacements that
forward to a default interface suspend method. No boxing has to
take place on return (as the default interface method always
boxes) so we can simply forward the call.

^KT-49645 Fixed
2021-12-06 17:29:59 +01:00
Dmitry Petrov 7206c06d26 IR KT-50039 don't initialize outer 'this' in delegating constructor 2021-12-06 17:31:37 +03:00
Dmitriy Dolovov 0f745032af [Native][tests] External tests: Generate tests only relevant for Native 2021-12-06 17:28:23 +03:00
Mikhael Bogdanov ea58c858d1 JvmDefault. Support @JvmDefaultWithCompatibility annotation
#KT-48217 Fixed
2021-12-06 14:20:24 +01:00
Anastasiya Shadrina 4d3035e2f7 [Parser] Do not support local contextual declarations 2021-12-03 20:22:17 +03:00
Anastasiya Shadrina 13c8531f3a [Tests] Regenerate NativeExtBlackBoxTestGenerated.kt 2021-12-02 20:25:02 +03:00
Anastasiya Shadrina 08570a37b8 [PSI2IR] Check how contextual functional type works with IR 2021-12-02 20:24:56 +03:00
Anastasiya Shadrina a760865767 [PSI2IR] Generate safe calls correctly 2021-12-02 20:24:54 +03:00
Anastasiya Shadrina 4d0eb74d79 [Tests] Make sure desugaring works with context receivers 2021-12-02 20:24:52 +03:00
Anastasiya Shadrina bd4e51f304 [FE, PSI2IR] Pass context receivers when calling typealias constructor 2021-12-02 20:24:50 +03:00
Anastasiya Shadrina fb99df235e [Tests] Regenerate tests after rebase 2021-12-02 20:24:49 +03:00
Ilmir Usmanov b26a81435f Do not add continuation parameter for super interface bridges
If there is superinterface (more specifically, fun interface) in one
file with default suspend function, we lower the function, adding
continuation parameter. Then, when we compile another file with a child,
we generate a bridge to the default suspend function, which is already
lowered. So, we do not need to add the continuation parameter.

If the child is in the same file, then we add continuation parameter
after we create a bridge, so, AddContinuationLowering can encounter
bridges to suspend default functions in superinterfaces with
continuation parameter only in multifile examples.

 #KT-47549 Fixed
2021-12-02 10:09:22 +00:00
Alexander Udalov be6409f0af Fix property lookup in data class component generation
#KT-49812 Fixed
 #KT-49936 Fixed
2021-12-02 01:43:39 +01:00
Ilmir Usmanov 8e8a6e6108 Do not count receivers in default parameters mask
If we implement default function with default parameters in inline
class, the receivers will be added to parameter list
(see ac7538a269). But since they
are not present in source parameters, we should not count them when we
compute mask for default parameters.

 #KT-49977 Fixed
2021-11-30 15:09:16 +00:00
Mads Ager 09da67767e [JVM_IR] Fix mangling of inline class inherited interface methods.
^KT-49864 Fixed
2021-11-30 03:33:56 +03:00
Alexander Udalov 3f47725eb9 Add regression test for coroutines issue KT-49294 2021-11-29 22:09:59 +01:00
Mikhail Glukhikh c15c7f7dc8 FE: fix visibility check in LazyImportScope #KT-23727 Fixed 2021-11-28 11:32:07 +03:00
Alexander Udalov 4df937ff7f JVM IR: keep property for $receiver field of optimized delegated properties
For properties which delegate to other property via the getValue
operator from stdlib (see KT-39054), we generate `$receiver` field which
stores the receiver of the property reference used in the delegate. The
problem was that this backing field was missing `correspondingProperty`.
It's needed because it is used as a map key to store static fields in
`JvmCachedDeclarations.getStaticBackingField`. If it's null, accesses to
the static $receiver fields are not remapped correctly in
`RemapObjectFieldAccesses` and
`MoveOrCopyCompanionObjectFieldsLowering`, which led to ICCE or NSFE.

 #KT-49793 Fixed
2021-11-26 19:21:16 +01:00
Alexander Udalov 29c1fe1be1 Minor, move tests on KT-39054 into a subdirectory 2021-11-26 19:18:25 +01:00
Denis.Zharkov a7859e0332 FIR: Fix wrong ACCIDENTAL_OVERRIDE on fake override property with JvmName 2021-11-26 19:39:36 +03:00
Dmitry Petrov 88f41d006a FIR2IR don't generate delegates for default interface members 2021-11-25 13:25:36 +03:00
Mikhail Glukhikh 0058d7e3d6 Add BB test for problem fixed with c2ab91d0 2021-11-24 15:30:33 +03:00
Dmitriy Dolovov 9c1c1805a3 [Native][tests] Log test process stdout/stderr when failed on timeout 2021-11-24 13:30:21 +03:00
Dmitriy Dolovov 3e0761b4fc [Native][tests] Minor. Refactor AbstractRunner.RunResult 2021-11-24 13:30:15 +03:00
Dmitriy Dolovov 1d721f03b2 [Native][tests] Destroy test process that has not finished on time 2021-11-24 13:30:09 +03:00
Dmitriy Dolovov 536bfe5bf9 [Native][tests] Use more compact paths to produced binaries 2021-11-24 10:25:16 +03:00
Dmitriy Dolovov 34627633c4 [Native][tests] Add an ability to fail tests on exceeded timeout 2021-11-24 10:25:10 +03:00
Dmitriy Dolovov a2ad9026a6 [Native][tests] Make file content comparison to be OS-neutral 2021-11-24 10:25:04 +03:00
Dmitriy Dolovov bd3ae12e0a [Native][tests] Minor. Update comments for TestModule/TestCase/TestCaseGroup 2021-11-24 10:24:59 +03:00
Dmitriy Dolovov 7ea66076eb [Native][tests] Minor. Rename effectivePackageName to nominalPackageName 2021-11-24 10:24:52 +03:00
Dmitriy Dolovov 3fa5363434 [Native][tests] Fix sanitization of logged command-line arguments 2021-11-24 10:24:42 +03:00
Mads Ager 8255118204 [JVM] Do not extend local ranges across control-flow merges.
The coroutine method transformer extends the range of locals
across code where the local is not live when it is safe to do
so. However, it only bailed out for one case of control-flow
merging, namely backwards branches for loops. That is not
sufficient as there can be control flow merges without loops
where the local is only defined on one control-flow path.

This change generalizes the bailout to any control-flow merge.

^KT-49834 Fixed
2021-11-23 13:49:45 +01:00