Dmitry Petrov
5db6a0b563
New mangling rules require language version 1.4 (not compiler version)
...
Follow-up to a270ee094c
2020-05-29 15:15:54 +03:00
Victor Petukhov
40a4cea530
NI: remove type depth check during adding initial constraints
2020-05-29 12:37:27 +03:00
pyos
35460fed19
JVM_IR: fix a bug when isInlineParameter is applied to default stubs
...
If an inline parameter has a default value, its type is nullable.
There's already code to handle this in `IrInlineCodegen`, but it
really should be in `isInlineParameter` instead, otherwise e.g.
SyntheticAccessorLowering fails.
2020-05-29 10:04:36 +02:00
Nicolay Mitropolsky
86e434195e
Uast: UastKotlinPsiVariable made isEquivalentTo it's physical PSI (KT-39174)
2020-05-29 11:00:47 +03: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
Ilya Kirillov
0fc43b1f57
Wizard: add possibility to change Kotlin version for generated projects via property
...
#KT-39247 fixed
2020-05-29 10:48:53 +03:00
Dmitriy Novozhilov
6f241c6dcd
[FIR] Don't save original user type in FirResolvedTypeRef
2020-05-29 10:24:39 +03:00
Dmitriy Novozhilov
422a327fca
[FIR] Add visitor for validation of generated FIR
2020-05-29 10:24:39 +03:00
Dmitriy Novozhilov
f6dabafe34
[FIR] Make creating of resolve processors type safe
...
Also get rid of `CompilerMode` enum
2020-05-29 10:24:36 +03:00
Dmitriy Novozhilov
c919f6172e
Reformat AbstractSimpleFileBenchmark.kt
2020-05-29 10:24:29 +03:00
Dmitriy Novozhilov
b4ce736814
[FIR] Move registration components out of initializers of FirSession
2020-05-29 10:24:26 +03:00
Dmitriy Novozhilov
fec3e4faf1
[FIR] Move initialization of common services to FirSessionBase
2020-05-29 10:22:04 +03:00
Dmitriy Novozhilov
1973060e8c
[FIR-PLUGIN] Fix AllOpenClassGenerator after previous commit
2020-05-29 10:22:03 +03:00
Dmitriy Novozhilov
6d37776267
[FIR] Rename FirClassImpl to FirRegularClassImpl
...
Also rename `buildClassImpl` to `buildRegularClass` and get rid
of intermediate `AbstractFirRegularClassBuilder`
2020-05-29 10:22:03 +03:00
Dmitriy Novozhilov
60fd505a9c
[FIR] Get rid of FirSealedClass node
...
Now list of inheritors is hold in attributes of `FirRegularClass`
2020-05-29 10:22:00 +03:00
Dmitriy Novozhilov
41cdb61ef3
[FIR] Move all symbol providers to separate package
2020-05-29 10:20:57 +03:00
Dmitriy Novozhilov
a1c3d2b709
[FIR] Add separate session component for FirIdeProvider
2020-05-29 10:17:22 +03:00
Dmitriy Novozhilov
34d3fe26e6
[FIR] Get rid of FirProvider.getInstance
2020-05-29 10:17:21 +03:00
nataliya.valtman
ff06e60a06
Revert "run for 28.0.2"
...
This reverts commit 86d52d41
2020-05-29 10:09:50 +03:00
nataliya.valtman
86d52d4123
run for 28.0.2
2020-05-29 10:07:34 +03:00
Dmitriy Novozhilov
1982f80bfb
[NI] Leave candidates with annotation if there are no candidates without it
2020-05-29 09:36:33 +03:00
Dmitriy Novozhilov
2812ed0a02
[NI] Use types and systems from return arguments instead of return type of lambda
2020-05-29 09:36:33 +03:00
Dmitriy Novozhilov
f76b57d260
[OI] Prefer candidate without @OverloadResolutionByLambdaReturnType
2020-05-29 09:36:33 +03:00
Dmitriy Novozhilov
a604404bff
[NI] Report warning if candidate was chosen using only @OverloadResolutionByLambdaReturnType
2020-05-29 09:36:33 +03:00
Dmitriy Novozhilov
82ce2e7b7c
[NI] Update annotation used in testdata
2020-05-29 09:36:32 +03:00
Ilya Gorbunov
e9ef6dbc28
Discriminate OverloadResolutionByLambdaReturnType annotated overloads...
...
instead of preferring them in case of unsolvable ambiguity.
2020-05-29 09:36:32 +03:00
Dmitriy Novozhilov
e1418a5540
[NI] Check for maximally specific candidate chosen with factory resolution
2020-05-29 09:36:32 +03:00
Dmitriy Novozhilov
e7869bd9d4
[NI] Analyse lambda in factory pattern resolution in independent context
2020-05-29 09:36:32 +03:00
Ilya Gorbunov
a0c7bece93
Overload resolution by lambda return type
...
Make compiler recognize new annotation enabling this feature.
Change overload selection algorithm to consider all overloads
with that annotation, not just the first one.
#KT-38480
#KT-11265
2020-05-29 09:36:32 +03:00
Ilya Gorbunov
23414496c4
Annotation to enable overload resolution by lambda return type
...
#KT-38480
2020-05-29 09:36:32 +03:00
Dmitriy Novozhilov
1c32c62a87
[NI] Choose annotated candidate if call still ambiguous
...
#KT-11265
2020-05-29 09:36:31 +03:00
Dmitriy Novozhilov
8c524769b1
[NI] Add required FactoryPattern annotation for factory pattern resolve
...
#KT-11265
2020-05-29 09:36:31 +03:00
Dmitriy Novozhilov
865ddac07a
[NI] Add feature for choosing candidate by lambda return type
2020-05-29 09:36:31 +03:00
Ilya Gorbunov
f243b8946f
Restore testOmittedStdlibVersion originally added in commit 15feeddc
2020-05-29 04:10:17 +03:00
Ilya Gorbunov
d47981f07b
Drop gradle ITs depending on AGP versions below 3.2
...
AGP of these versions cannot handle module-info class included in
kotlin-stdlib artifact from now on.
2020-05-29 04:10:17 +03:00
Dmitry Petrov
a270ee094c
Language feature for new inline class mangling rules (since 1.4)
2020-05-29 00:53:01 +03:00
Dmitry Petrov
94509bdb4e
KT-39228 Fix inliner when latest 1.4 compiler used with 1.3 stdlib
...
Since 1.4.0-dev-8774, we mangle functions returning inline class values,
including functions with return type 'kotlin.Result'. This causes
incompatibility when 1.4 compiler is used with 1.3 (or just some
pre-1.4.0-dev-8774) standard library.
Also, write "message from the future" on functions returning inline
class values indicating that they can be used since compiler version 1.4
(otherwise 1.3 compiler using 1.4 stdlib would fail to find some
@InlineOnly functions such as 'Result.success' and 'Result.failure').
2020-05-29 00:53:00 +03:00
Mikhail Glukhikh
ffdab473e2
IR symbols: enhance exception messages / toString() a bit
2020-05-28 22:59:13 +03:00
Mikhail Glukhikh
b6cdcc8d50
[FIR2IR] Mute 2 failing BB tests
2020-05-28 22:51:20 +03:00
Mikhail Glukhikh
19f1a3de1a
[FIR2IR] Populate overridden symbols also with public symbol inheritors
2020-05-28 22:19:21 +03:00
Mikhail Glukhikh
85760770a8
[FIR2IR] Initialize built-in symbols at start of conversion
2020-05-28 22:18:20 +03:00
Mikhail Glukhikh
cd24745f1f
[FIR2IR] Add primitive signature composer & use it for external classes
2020-05-28 22:18:13 +03:00
Mikhail Glukhikh
048e7a7075
[FIR] Add forgotten FirJvmBackendClassResolver to CLI
2020-05-28 22:18:05 +03:00
Andrey Uskov
0ed9356cd2
Fixed reporting duration between builds in gradle statistics
2020-05-28 22:08:18 +03:00
Andrey Uskov
8dcbc391fe
Implemented collecting JS compilation mode
...
#KT-36410 Fixed
2020-05-28 22:08:13 +03:00
Andrey Uskov
97039926f0
Fixed import of transitive HMPP dependencies
...
#KT-36792 Fixed
2020-05-28 22:08:04 +03:00
Andrey Uskov
a431e20b45
Fix import of js MPP source sets in both mode
...
#KT-38706 Fixed
2020-05-28 22:07:55 +03:00
Andrey Uskov
36c9d04cd3
Fix HMPP import tests
2020-05-28 22:07:51 +03:00
Andrey Uskov
9c2918bdd6
Drop import tests with module per source set disabled
2020-05-28 22:07:48 +03:00
Andrey Uskov
104eeb9ffd
Fixed KNPE when serialized Kotlin Facet is broken
...
#KT-37428 Fixed
2020-05-28 22:07:44 +03:00