Commit Graph

65793 Commits

Author SHA1 Message Date
Nikolay Krasko 5e7c82ea01 Fix building dist with JDK 13 (KTI-262)
Return to bootstrap version, that was abandoned because of KT-37235.
It looks like build is fine now.
2020-05-29 20:17:55 +03:00
Steven Schäfer 7ea71a17f0 JVM IR: Use language feature for inline class mangling rules 2020-05-29 19:54:09 +03:00
Ilya Goncharov a41b746774 Revert "[Gradle, JS] Output file path as input fo js compile task"
This reverts commit df173c8c
2020-05-29 19:39:17 +03:00
Ilya Goncharov df173c8c93 [Gradle, JS] Output file path as input fo js compile task
^KT-38676 fixed
2020-05-29 17:37:00 +03:00
Dmitriy Novozhilov 1d32cab11d Revert "[FIR] Don't save original user type in FirResolvedTypeRef"
Also fix `FirGeneratedElementsValidator` so it doesn't check
   `FirResolvedTypeRef.delegatedTypeRef`
2020-05-29 17:35:53 +03:00
Dmitriy Novozhilov 72813cefbe [FIR] Store list of sealed inheritors even if there are none of them 2020-05-29 17:35:53 +03:00
Vyacheslav Gerasimov d612c130e8 Build: Fix jpsStandalone dependency in core.descriptors.runtime 2020-05-29 17:29:27 +03:00
Ilya Goncharov bb9e8a8a50 [Gradle, JS] Fix warning message with new line
^KT-39210 fixed
^KT-31669 fixed
2020-05-29 17:20:10 +03:00
Ilya Goncharov 1b841adfff [Gradle, JS] Fix param name
^KT-39210 fixed
^KT-31669 fixed
2020-05-29 17:20:00 +03:00
Ilya Goncharov 9fd211cfcd [Gradle, JS] Manually singleton because Gradle Daemon
^KT-39210 fixed
^KT-31669 fixed
2020-05-29 17:19:44 +03:00
Ilya Goncharov 59c2bc25d5 [Gradle, JS] Detect multiple plugins for NodeJsRootPlugin and YarnPlugin
^KT-39210 fixed
^KT-31669 fixed
2020-05-29 17:19:27 +03:00
Ilya Goncharov 39869f009e [Gradle, JS] Throw error in JS part when plugins goes from different classloaders
^KT-39210 fixed
^KT-31669 fixed
2020-05-29 17:19:13 +03:00
Ilya Goncharov 2e39c1164d Move detecting of multiple kotlin plugins into extract class
^KT-39210 fixed
^KT-31669 fixed
2020-05-29 17:18:57 +03:00
Alexander Udalov 7d9fe55072 Regenerate tests 2020-05-29 15:15:43 +02:00
Dmitriy Novozhilov f21d1e1c1b [FIR] Record non-user type refs to resolved type refs
That `delegatedTypeRef` is needed for reporting errors on value
  parameters of function types and errors about cyclic dependencies
  between types
See 6f241c6d
2020-05-29 16:10:38 +03:00
Mads Ager 7d7b9262e7 [JVM] Port remaining line number tests to stepping infrastructure.
These line number tests only tested that a set of line numbers where
present in the java bytecode. Not that they would be hit in the
right order by the debugger. Moving them to stepping tests fixes that.

This exposes a couple of issues (in particular around try-catch-finally)
that should be fixed.

A number of tests are marked as failing now. Will investigate and
work on fixes next.
2020-05-29 15:07:49 +02:00
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