Mads Ager
1f2ca606a5
[IR] Add isAssignable property to IrValueParameter.
...
Use it to check that only the value parameters that are explicitly
marked assignable are assigned.
Currently, the only parameters marked assignable are those for
default argument stubs.
2020-10-06 21:47:29 +02:00
Mads Ager
9a93bb3f09
[IR] Add IR support for setting parameters.
...
Use it in the JVM_IR backend for default values code. The parameter
local has to be overwritten for the inliner to work.
2020-10-06 21:47:29 +02:00
Ilya Kirillov
d5ad424e8f
FIR: introduce source element mappings tests for raw FIR
2020-10-06 22:24:01 +03:00
Ilya Kirillov
551864d8c1
FIR: fix source element of FirQualifiedAccessExpression
2020-10-06 22:24:00 +03:00
Mads Ager
a37f16d7a2
[IR] Do not generate line numbers for synthesized data class members.
...
Fixes KT-41903.
2020-10-06 19:53:47 +02:00
Mikhael Bogdanov
5048471835
Properly check default kind on inheriting from old DefaultImpls scheme
2020-10-06 18:10:44 +02:00
pyos
a6d5c02d9b
JVM_IR: add a transformChildren call to PropertyReferenceLowering
...
#KT-42354 Fixed
2020-10-06 17:06:34 +02:00
Dmitry Petrov
b1bd138afb
JVM_IR fix inline class <-> collection stubs issues
...
Move collectionStubMethodLowering before jvmInlineClassPhase, and make
them interact properly.
Note that some issues still remain in inline class <-> special bridges
interaction.
KT-40187 KT-42469
2020-10-06 17:08:24 +03:00
Mikhael Bogdanov
ed5c2b0565
Add tests for data class runtime string concatenation
...
#KT-35176
2020-10-06 13:20:41 +02:00
Mikhael Bogdanov
eb32a6ddbd
Add test for for kt42457 wrong behaviour. Align runtime concatenation with it
...
#KT-42457
2020-10-06 13:20:40 +02:00
Mikhail Glukhikh
64fb114c30
FIR Java annotations: create vararg or Array depending on parameter name
...
#KT-42346 Fixed
2020-10-06 12:13:58 +03:00
Mikhail Glukhikh
f6b49a2c9a
FirAnnotationArgumentChecker: handle conversion calls properly
2020-10-06 12:13:58 +03:00
Mikhail Glukhikh
6f432ea5dd
[FIR] Add problematic test for KT-42346 (double vararg in annotation)
2020-10-06 12:13:57 +03:00
Mikhail Glukhikh
862fb6a405
FIR Java: make annotation parameters not-null
2020-10-06 12:13:57 +03:00
Roman Artemev
a52e045c91
[IR BE] Remap references in default arg value in inner class constructor
...
Make sure that there is no reference into zombie declarations.
- fix KT-40771
- add test
2020-10-06 00:06:47 +03:00
Jinseong Jeon
2d001a46fc
FIR CFG traverser: do not skip graph enter node
...
#KT-42348 fixed
2020-10-05 19:48:12 +03:00
Jinseong Jeon
a154cf4c45
FIR checker: reproduce KT-42348
2020-10-05 19:48:11 +03:00
Jinseong Jeon
7af564c9f2
FIR: fix vararg remapping that merged named vararg
2020-10-05 12:33:03 +03:00
Mikhail Glukhikh
3cd552cb43
[FIR2IR] Process anonymous object nested classes correctly
...
#KT-42373 Fixed
2020-10-05 12:06:53 +03:00
Mikhail Glukhikh
76cdf97b6d
[FIR2IR] Set facade class for backing field properly #KT-42384 Fixed
2020-10-05 12:06:52 +03:00
Ilmir Usmanov
5e02a4efd7
Mark implicit receiver as captured if the function is expression
...
#KT-40260 Fixed
#KT-42280 Fixed
2020-10-05 09:36:54 +02:00
Jinseong Jeon
380226cba0
FIR2IR: correct dispatch receiver inside inner class constructor
2020-10-05 09:12:19 +03:00
Jinseong Jeon
aa488eabc9
FIR2IR: distinguish constructor when picking return target
2020-10-05 09:09:39 +03:00
Victor Petukhov
6c1dc43d25
Add check already fixed variables in PostponedArgumentInputTypesResolver during adding constraints on them and using inside a functional type
...
^KT-42374 Fixed
2020-10-02 18:31:54 +03:00
Dmitry Petrov
e018f2bd3e
JVM_IR more precise check for special bridges in super class
...
KT-41123
2020-10-02 12:51:49 +03:00
Mikhael Bogdanov
1938f9459f
Support indy concatenation
2020-10-02 11:47:28 +02:00
Mark Punzalan
b58d75440b
[FIR] Fix tests for vararg execution order after rebase.
2020-10-02 12:08:07 +03:00
Mark Punzalan
e175e87225
[FIR] Change type of argumentMapping properties and parameters from Map
...
to LinkedHashMap, to signify that the order is important and we don't
assume that mutableMapOf() will always return a LinkedHashMap.
2020-10-02 12:08:06 +03:00
Mark Punzalan
6b83f2d70e
[FIR] Remove Candidate.oldToNewArgumentMapping and use
...
Candidate.argumentMapping instead of the Fir*Call's argumentList to
remap vararg arguments to a FirVarargArgumentExpression.
The argumentList was used to preserve the order, but we can rely on
Candidate.argumentMapping to have its keys in order.
2020-10-02 12:08:05 +03:00
Mark Punzalan
a2a4d94834
[FIR] Capture array and indices for postfix/prefix increment/decrement
...
of array element (including overloaded indexed access operators, e.g.,
`a[b, c]++`).
This prevents double-evaluation of the array and indices expressions,
which may have side-effects.
2020-10-02 12:08:03 +03:00
Mark Punzalan
eb631bc429
[FIR] Keep vararg argument order in resolved calls (KT-17691).
2020-10-02 12:08:02 +03:00
Mark Punzalan
f6ce2d893c
[FIR] Handle varargs in overloaded indexed access operator.
2020-10-02 12:08:01 +03:00
Mikhail Glukhikh
cc88374fd7
[FIR] Add compile Kotlin against Kotlin test group
2020-10-02 08:57:55 +03:00
Mikhail Glukhikh
582f8fe287
FIR: recursive transform annotation if it has annotation as argument
...
#KT-42344 Fixed
2020-10-02 08:57:49 +03:00
Mikhail Glukhikh
2fd752f8f6
IR interpreter: fix calculation of constant Java fields
...
#KT-42117 Fixed
2020-10-02 08:57:44 +03:00
Mikhail Glukhikh
44ebec05bb
FIR Java: support read of field constant initializers
2020-10-02 08:57:39 +03:00
Denis Zharkov
6d7744a921
FIR2IR: Use correct origin for lazily created fake overrides
2020-10-01 17:49:02 +03:00
Denis Zharkov
26a43b253f
FIR2IR: Avoid recreation of declarations
...
They may be previously created for fake overrides
2020-10-01 17:49:02 +03:00
Denis Zharkov
ff4b6a0bf9
FIR: Fix modality computation for corner cases in FirTypeIntersectionScope
...
See org.jetbrains.kotlin.resolve.OverridingUtil#determineModalityForFakeOverride
2020-10-01 17:49:02 +03:00
Denis Zharkov
de3df799bc
FIR: Fix implicit return type computation for synthetic property+intersection
2020-10-01 17:49:02 +03:00
Denis Zharkov
754e17a28f
FIR2IR: Fix checking if accessor is allowed to have fake override
2020-10-01 17:49:02 +03:00
Denis Zharkov
70bf7063c9
FIR2IR: Add hack for delegate combinated with intersection
2020-10-01 17:49:02 +03:00
Denis Zharkov
85b8673434
FIR: Fix overload resolution with defaults
2020-10-01 17:49:02 +03:00
Denis Zharkov
4964ff0019
FIR2IR: Refine definition if we need a fake override
...
`realDeclarationSymbols` that was used before is built from klass.declarations that doesn't
contain e.g. declarations from enhancement
Next time, we should get rid of `realDeclarationSymbols` and use only
originalDeclaration.origin.fromSupertypes, but originalSymbol.callableId.classId == classId
doesn't work correctly
2020-10-01 17:49:02 +03:00
Denis Zharkov
be6bef13d3
FIR2IR: Drop some unused declarations
2020-10-01 17:49:02 +03:00
Denis Zharkov
5c9187b270
FIR2IR: Rework fake overrides generation
...
- To discriminate what's already been generated, use the set of declaration
instead of names (it's obviously more correct)
- Make it possible to set more then one overridden (base)
2020-10-01 17:49:02 +03:00
Denis Zharkov
b241161c35
FIR2IR: Rework DelegatedMemberGenerator
...
Use scope content instead of manual traversing of declarations
2020-10-01 17:49:02 +03:00
Denis Zharkov
e311a60055
FIR: Refine FirDelegatedMemberScope
...
- Use an attribute instead of overriddenSymbol
- Use createCopyForFir because it copies type parameters
2020-10-01 17:49:02 +03:00
Denis Zharkov
28c536e511
FIR: Add temporary workaround to avoid changes in test data
...
CallableId for intersection overrides has been changed in previous commits
and many rendered FIR test data needs to be changed
But, we're going to get rid of callableId's/or fix them back for intersection overrides soon
2020-10-01 17:49:02 +03:00
Denis Zharkov
fd9c6479bf
FIR: Do not call withReplacedConeType if type is unresolved
2020-10-01 17:49:02 +03:00