Dmitry Petrov
7206c06d26
IR KT-50039 don't initialize outer 'this' in delegating constructor
2021-12-06 17:31:37 +03:00
Dmitriy Novozhilov
df2e9e3797
[FE 1.0] Correctly set USED_AS_EXPRESSION for unreachable when and if blocks
...
^KT-50028 Fixed
2021-12-06 17:24:06 +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
Mikhael Bogdanov
c0ffbe03c6
Remove '-Xjvm-default-allow-non-default-inheritance' flag. Enable such inheritance by default
...
#KT-47000 Fixed
2021-12-03 06:39:38 +01:00
Anastasiya Shadrina
2d088196ce
[FE] Fill DESCRIPTOR_TO_CONTEXT_RECEIVER_MAP only with CR enabled
2021-12-02 20:25:06 +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
2e97e78e6a
[Tests] Add tests with default params and suspending contextual function
2021-12-02 20:24:48 +03:00
Anastasiya Shadrina
617af898b0
[FE, IR] Support deserialization
2021-12-02 20:24:37 +03:00
Anastasiya Shadrina
2fbfee3e11
[PSI2IR] Fix parameter initialization for constructors with CR
2021-12-02 20:24:36 +03:00
Anastasiya Shadrina
add2ca1d11
[Tests] Try structured concurrency with context receivers
2021-12-02 20:24:28 +03:00
Anastasiya Shadrina
6cd50bc438
[Tests] Add bytecodeListing tests
2021-12-02 20:24:26 +03:00
Anastasiya Shadrina
c148a12e4b
[IR] Fix functional type sample
2021-12-02 20:24:24 +03:00
Anastasiya Shadrina
a091b345a0
[FE] Provide overloadability for candidates with different CR
2021-12-02 20:24:19 +03:00
Anastasiya Shadrina
155e7b211b
[PSI2IR, IR] Support functional types and literals for IR
2021-12-02 20:24:17 +03:00
Anastasiya Shadrina
910660a083
[FE] Add language feature for context receivers
2021-12-02 20:24:16 +03:00
Anastasiya Shadrina
d8faa9686d
[Tests] Test samples from KEEP
2021-12-02 20:24:14 +03:00
Anastasiya Shadrina
403ec7a5b1
[BE] Mangle context receiver params
2021-12-02 20:24:09 +03:00
Anastasiya Shadrina
f9e6365461
[Tests] Make build green again
2021-12-02 20:24:07 +03:00
Anastasiya Shadrina
a2403c470f
[BE] Put context receivers before an extension receiver
2021-12-02 20:24:00 +03:00
Anastasiya Shadrina
875f4ea31c
[FE] Support local contextual declarations
2021-12-02 20:23:54 +03:00
Anastasiya Shadrina
daa54734e5
[PSI2IR] Pass context receiver values in PropertyLValue
2021-12-02 20:23:50 +03:00
Anastasiya Shadrina
766e6bca75
[PSI2IR] Generate value arguments for context receivers in getter/setter
2021-12-02 20:23:49 +03:00
Anastasiya Shadrina
837f3b98fa
[FE] Allow to infer generic property type from a context receiver type
2021-12-02 20:23:46 +03:00
Anastasiya Shadrina
1bcaeabd84
[PSI, FE, PSI2IR] Use labels for referencing specific receiver
2021-12-02 20:23:40 +03:00
Anastasiya Shadrina
aaabf5e1ca
[PSI2IR] Support context receivers on classes
2021-12-02 20:23:38 +03:00
Anastasiya Shadrina
307f318c9e
[PSI2IR] Generate IR for functions and calls with context receivers
2021-12-02 20:23:27 +03:00
Sergej Jaskiewicz
599f705842
[stdlib] Make @LowPriorityInOverloadResolution applicable to ctors
2021-12-02 12:39:40 +00: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
Mads Ager
d89680b30d
[FIR] Serialize annotations for type parameters properly
2021-12-01 18:25:06 +03:00
Anton Bannykh
9c4c798fe7
[JS IR] mute tests with wrong linkage
2021-12-01 16:50:16 +03:00
Sergej Jaskiewicz
e13b6b2a90
[JS IR] [runtime] Remove valueOf method from Long
...
This method was used for coercing `Long` values to JavaScript
`number`. However, it caused issues when `Long` values were
concatenated to a string (see KT-8666, KT-26706).
2021-12-01 12:36:34 +00:00
Dmitry Petrov
de3203ee48
JVM KT-49903 prohibit reordering of 'getstatic System.out'
2021-12-01 12:13:13 +03: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
f220e4a5ed
[FIR] Fix a couple of issues in annotation serialization.
2021-11-30 18:00:00 +03: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
Dmitriy Novozhilov
330574cab6
[FIR] Properly support smartcasts on stable when subjects in when conditions
...
^KT-49860 Fixed
2021-11-26 11:26:21 +03:00
Mikhail Glukhikh
4a8f00bc7c
FIR2IR: support reading of isNewPlaceForBodyGeneration in lazy class
2021-11-26 09:18:11 +03:00
Dmitry Petrov
88f41d006a
FIR2IR don't generate delegates for default interface members
2021-11-25 13:25:36 +03:00
Mads Ager
261482904c
[FIR] Give external package fragments different module descriptors.
...
The inliner uses module descriptors to figure out if it needs to
regenerate objects.
We should avoid the use of descriptors in the inliner, but this
works as a first quick fix.
2021-11-25 13:20:31 +03:00
Ivan Kochurkin
b83ed7a6ed
[FIR] Fix KtExpression.usedAsExpression for labeled expression
2021-11-24 23:13:37 +03:00