Commit Graph

34311 Commits

Author SHA1 Message Date
Victor Petukhov 7f7bb70596 Don't fix a type variable into the intersection type if there is an explicit expected type
^KT-43303 Fixed
^KT-42396 Fixed
^KT-42472 Fixed
2021-03-12 14:36:53 +03:00
pyos e06bacafad JVM: fix inline cycle detection
1. use the correct descriptor in the old backend;
 2. clear the temporary variables for arguments in the IR backend.

 #KT-45292 Fixed
2021-03-12 11:49:42 +01:00
Ilya Kirillov 4e98d1b857 FIR IDE: update lazy resolve tests testdata 2021-03-12 11:44:00 +01:00
Ilya Kirillov f8828abeba FIR: fix declaration phase updating in FirContractResolveTransformer 2021-03-12 11:44:00 +01:00
Ilya Kirillov 4dc040b91a FIR: update enum entry resolve phase in body resolve transformers 2021-03-12 11:44:00 +01:00
Ilya Kirillov 0dd18006e8 FIR: do not update phase from IMPLICIT_TYPES_BODY_RESOLVE to BODY_RESOLVE
This is not needed as such declarations are now marked with body resolve phase
2021-03-12 11:44:00 +01:00
Ilya Kirillov fe207492b7 FIR: mark declarations resolved to BODY_RESOLVE with BODY_RESOLVE phase in implicit body transformer 2021-03-12 11:43:59 +01:00
Ilya Kirillov ded234074d FIR: render value parameter/lambda/accessor resolve phase if RenderMode.renderDeclarationResolvePhase is enabled 2021-03-12 11:43:59 +01:00
Alexander Udalov 848b08a475 Minor, suppress 1.3 language version warnings 2021-03-12 11:18:57 +01:00
Ilya Goncharov ead0b50107 [JS IR] In file:JsModule top level with fresh names 2021-03-12 12:57:56 +03:00
Igor Yakovlev 023b7fbb8f [ULC] Fix invalid primitive type annotating
Fixed #KT-45417
2021-03-12 10:35:37 +01:00
Dmitry Petrov 44e6483090 JVM_IR Spill stack on array constructor call
KT-42932
2021-03-12 09:18:35 +03:00
Tianyu Geng 9476175cc2 FIR: add mapping to partially resolved arg list
Initially I tried adding `mapping` field to `FirArgumentList` but it
seems to be very difficult to make it flexible enough to do what I want.

So instead, I am creating a `FirPartialResolvedArgumentList`, which
seems to be very simple.
2021-03-11 22:57:58 +03:00
Mikhail Glukhikh 5d3afbad54 Rename: BadNamedArgumentsTarget -> ForbiddenNamedArgumentsTarget 2021-03-11 22:57:57 +03:00
Tianyu Geng be0dd84a06 FIR: check NAMED_ARGUMENTS_NOT_ALLOWED
The check has already been partially implemented in
org.jetbrains.kotlin.fir.resolve.calls.FirCallArgumentsProcessor. This
change completes the missing piece that determines if a `FirFunction`
has stable parameter names.
2021-03-11 22:57:57 +03:00
Tianyu Geng 0d4e9ca0b9 FIR: allow reporting multiple FirDiagnostics from a ConeDiagnostic 2021-03-11 22:57:57 +03:00
Mikhail Glukhikh 1f15ce2d26 FIR diagnostics: extract mapUnsafeCallError 2021-03-11 22:57:57 +03:00
Ilya Chernikov e05c8ac57b Add script metedata flag 2021-03-11 15:50:33 +01:00
Ilya Chernikov 7c63105bb7 Mark script result expression as used to avoid coercion to unit 2021-03-11 15:50:32 +01:00
Ilya Chernikov 7d07010785 Fix handling of lambdas in top-level destructuring declarations 2021-03-11 15:50:32 +01:00
Ilya Chernikov 22f1814911 Fix CFA for destructuring declarations in scripts
in particular without the fix, the CFA skipped marking of the used
result values in lambdas and they were coerced to unit in IR
2021-03-11 15:50:31 +01:00
Ilya Chernikov 9c786a9cd9 [minor] uncomment 2 scripting tests:
Tests were failing before, but now fixed, most likely by switching to
default target 1.8 and some changes in scripting IR support.
#KT-44471 fixed
2021-03-11 15:50:31 +01:00
Ilya Chernikov 375441832e Implement REPL support in IR scripting 2021-03-11 15:50:30 +01:00
Ilya Chernikov c066b7843c Fix provided properties generation in ir scripting 2021-03-11 15:50:07 +01:00
Ilya Chernikov bac6a7346e Extend GeneratorExtensions with previous script, implemt it for JS REPL
also refactor JS REPL for better compatibility with the generic
REPL/scripting infrastructure
2021-03-11 15:50:01 +01:00
Ilya Chernikov 4dc228a0a3 Implement proper call to the base class ctor in ir script lowering 2021-03-11 15:49:46 +01:00
Ilya Chernikov 32d0c99289 Implement metadata handling for IR scripts 2021-03-11 15:49:45 +01:00
Jinseong Jeon 55561fad37 FIR CFG: correct target and label for rethrow in try expression
^KT-45385 Fixed
2021-03-11 16:19:16 +03:00
Jinseong Jeon 4f20d2dccf Reproduce KT-45385: false positive MUST_BE_INITIALIZED_* after rethrow 2021-03-11 16:19:15 +03:00
Alexander Udalov bc5fc122c5 JVM, JVM IR: report error if not all parts of multifile class are @JvmSynthetic
#KT-41884 Fixed
2021-03-11 13:33:25 +01:00
Alexander Udalov 75850a618c Minor, move bytecodeListing tests on JvmMultifileClass 2021-03-11 13:33:25 +01:00
Steven Schäfer 057ead358c JVM: Add FILE target to the JvmSynthetic annotation (#4149) 2021-03-11 13:33:07 +01:00
Victor Petukhov b45d5abeb1 [jspecify] Change annotations' package from org.jspecify.annotations to org.jspecify.nullness, and DefaultNonNull to NullMarked
^KT-45409 Fixed
2021-03-11 15:32:14 +03:00
Alexander Likhachev 2ae7740c46 Set explicit lang version 1.3 for kotlin-native-utils & kotlin-util-io
Without explicit version we cannot use those modules in buildscripts with Gradle 6.8+ because Gradle doesn't set flag `skipPrereleaseCheck` (previously was named `skipMetadataVersionCheck`). This way we make it compatible with all supported versions of Gradle.
2021-03-11 14:12:38 +03:00
Alexander Likhachev 6bd44df861 [Build] Fix configuration cache issues (part 6)
Make DexMethodCountStats task class, tasks :examples:kotlin-jsr223-daemon-local-eval-example:test,:idea:idea-fir:test, :idea:idea-fir-performance-tests:test, :idea:idea-frontend-fir:test, :idea:idea-frontend-fir:idea-fir-low-level-api:test, :kotlin-compiler-client-embeddable:test, :kotlin-compiler-embeddable:test, :kotlin-stdlib-js-ir:compileTestKotlinJs, :plugins:android-extensions-compiler:test, :plugins:parcelize:parcelize-compiler:test, :compiler:test compatible with configuration cache
Relates to #KT-44611
2021-03-11 14:12:36 +03:00
Alexander Likhachev faf9600ff0 [Build] Fix configuration cache issues (part 2)
* Make WriteCopyrightToFile task compatible with configuration cache
* Configure shadowJar task in compatible with configuration cache way
* Configure compileJava9Java task in compatible with configuration cache way
* Make :js:js.tests buildscript compatible with configuration cache
Relates to #KT-44611
2021-03-11 14:12:33 +03:00
Alexander Likhachev 27956adf3f [Build] Fix configuration cache issues (part 1)
* Make `clean` task compatible with configuration cache
* Make Java compile instrumentation compatible with configuration cache
* Make settings.gradle compatible with configuration cache
* Initial work on making IntelliJInstrumentCodeTask compatible with configuration cache
* Make writeStdlibVersion task compatible with configuration cache
* Copy some properties to not capture it's owning object into lambda to support configuration cache

Relates to #KT-44611
2021-03-11 14:12:28 +03:00
Mikhail Glukhikh 111e67dc8d Use DECLARATION_NAME strategy for FirErrors.PRIMARY_CONSTRUCTOR_REQUIRED 2021-03-11 13:25:52 +03:00
Tianyu Geng 6e8bad6ef6 FIR: Implement data class constructor checker 2021-03-11 13:25:51 +03:00
Jinseong Jeon d2da15e039 FIR checker: report (expected|unnecessary) lateinit 2021-03-11 13:25:51 +03:00
Dmitriy Novozhilov dceb8b2991 [FIR] Don't render ! at the end of ConeFlexibleType 2021-03-11 13:10:05 +03:00
Dmitriy Novozhilov 932eed2c14 [FIR] Fix determining nullability of arguments during enhancement 2021-03-11 13:10:05 +03:00
Dmitriy Novozhilov 65ea4e184a [FIR] Fix enhancement of FlexibleNullability and EnhancedNullability
- Add utilities to add new attribute to ConeAttributes
- Get rid of FlexibleNullability attribute (it can be easily inferred
    for any flexible type at any moment)
- Fix determining of EnhancedNullability attribute
2021-03-11 13:10:04 +03:00
Dmitriy Novozhilov 0108f8a1b4 [FIR2IR] Don't create implicit not null cast on IrGetEnumValue 2021-03-11 13:10:04 +03:00
Dmitriy Novozhilov 01e8019c4c [FIR] Properly handle friend modules in modularized and full-pipeline tests 2021-03-11 13:10:04 +03:00
Dmitriy Novozhilov f82c7c4678 [FIR] Cleanup session creation utils 2021-03-11 13:10:04 +03:00
Vladimir Dolzhenko fbe18164b4 Filter KtAnnotated on-the-fly diagnostic elements
Relates to #KTIJ-1760
Relates to #KT-45254
2021-03-11 08:43:36 +00:00
Dmitriy Novozhilov cba63f2c12 Regenerate tests 2021-03-11 00:58:26 +03:00
Dmitriy Novozhilov 74118930b4 [FE] Don't fail with exception if ESVisitor tries to visit ESLambda
#KT-45243 Fixed
2021-03-11 00:58:24 +03:00
Mikhail Glukhikh f3135baba9 FIR: eliminate replaceSource usages in transformTypeToArrayType 2021-03-10 22:23:21 +03:00