Commit Graph

69098 Commits

Author SHA1 Message Date
Dmitriy Novozhilov 535898c8a4 [FIR] Fix processing integer operator calls for not integer types 2020-09-14 10:57:10 +03:00
Dmitriy Novozhilov def647c094 [FIR] Don't constraints for return expressions of lambda if it has Unit return type 2020-09-14 10:57:09 +03:00
Dmitriy Novozhilov 8e0d0d2fd8 Remove redundant safe call to fix FIR compilation 2020-09-14 10:57:09 +03:00
Dmitriy Novozhilov 4929417aea Remove redundant type arguments to fix compilation with FIR
#KT-41835
2020-09-14 10:57:09 +03:00
Dmitriy Novozhilov 324aaaddad [FIR] Rename createArrayOf to createArrayType 2020-09-14 10:57:09 +03:00
Dmitriy Novozhilov 3b941a8f43 [FIR] Complete types of array literals in annotations 2020-09-14 10:57:09 +03:00
Dmitriy Novozhilov fbe964c074 [FIR] Transform annotations on safe calls 2020-09-14 10:57:08 +03:00
Jinseong Jeon 0bd7de158c FIR: update suspend lambda type during declaration resolution 2020-09-14 10:20:45 +03:00
Jinseong Jeon 680dd64211 FIR2IR: pick return target based on matched IrFunction 2020-09-14 10:09:51 +03:00
Jinseong Jeon 6ebad9589a FIR2IR: set proper IR origin for iterator in ranges 2020-09-14 10:09:45 +03:00
Mikhail Glukhikh 578e707ab9 FIR2IR: set VARIABLE_AS_FUNCTION origin only for invoke receivers 2020-09-14 10:09:32 +03:00
Mikhail Glukhikh f0a2a62405 [FIR2IR] Minor: coneTypeSafe -> coneType 2020-09-14 09:18:46 +03:00
Jinseong Jeon 89ffce22d8 FIR2IR: set proper IR origin for variable as function 2020-09-14 09:05:08 +03:00
Andrey Uskov bf3a7e5fea Add more tasks in Gradle build for running GradleIT in parallel 2020-09-13 22:48:12 +03:00
Nikolay Krasko a7f57646bf Prevent rebuilding by avoid registering doFirst on source tasks (KTI-324)
Do the check for empty directories at the build end instead.

Registering doFirst makes constant recompile when switching from Kotlin to Kotlin
Native composite with the reason:

```
The task was not up-to-date because of the following reasons:
One or more additional actions for task ':kotlin:kotlin-stdlib-common:compileKotlinCommon' have changed.
```

Exact reason why actions are different is not clear (there's a single
action in both builds in comparison), but probably the reason in
different types due to usage of composite build.

 #KTI-324 Fixed
2020-09-13 19:18:01 +03:00
Alexander Udalov 9250d86915 JVM IR: generate field for private companion object in interface as synthetic 2020-09-13 09:13:27 +02:00
Alexander Udalov fc141a52da IR: minor, make IrClass.companionObject return IrClass 2020-09-13 09:13:26 +02:00
Alexander Udalov 2f86554d5a IR: don't produce fake overrides for static and private declarations
Note that only irrelevantStaticProperty.kt failed before this change.
Having private declarations caused no problems, but it seems incorrect,
so it's fixed now and irrelevantPrivateDeclarations is added just in
case.

 #KT-41848 Fixed
2020-09-12 20:01:34 +02:00
Roman Golyshev 703150e3ad FIR IDE: Refactor LowLevelFirApiFacade.kt 2020-09-12 11:49:36 +00:00
Roman Golyshev edb277b30a FIR Completion: Enable passing tests 2020-09-12 11:49:36 +00:00
Roman Golyshev dcc22d3e5d FIR IDE: Fix completion in property setters
Property consists of getter and setter (both optional). The setter
have a single `value` parameter with type

Because of it, we have to make a separate 'frankenstein setter' with
original resolved header, but with the body of the fake one

It seems that getters does not have such issues
2020-09-12 11:49:35 +00:00
Roman Golyshev 5c1520305b FIR IDE: Build symbols from any FirValueParameter 2020-09-12 11:49:35 +00:00
Roman Golyshev ae8933dbd2 FIR IDE: Correctly handle properties in KtFirCompletionCandidateChecker
- Introduce `EnclosingDeclarationContext` to remove code duplication
2020-09-12 11:49:34 +00:00
Roman Golyshev 6fd871d0ba FIR IDE: Add building completion context for properties 2020-09-12 11:49:33 +00:00
Roman Golyshev 58965d1e71 FIR IDE: Implement RawFirBuilder::buildPropertyWithBody, add tests 2020-09-12 11:49:33 +00:00
Georgy Bronnikov 5f57311015 JVM_IR: remove .toKotlinType() from intrinsics.Equals 2020-09-12 12:59:12 +03:00
Georgy Bronnikov 2c1735c211 JVM_IR: remove descriptor usage from JvmOptimizationLowering 2020-09-12 12:59:12 +03:00
Georgy Bronnikov a14c9018b1 JVM_IR: remove descriptor usage from SyntheticAccessorLowering 2020-09-12 12:59:12 +03:00
Georgy Bronnikov 3327524e18 JVM_IR: remove descriptor usage from TypeAliasAnnotationMethodsLowering 2020-09-12 12:59:12 +03:00
Georgy Bronnikov 905978a458 JVM_IR: remove descriptor usage from JvmCachedDeclarations 2020-09-12 12:59:12 +03:00
Georgy Bronnikov 92b03e7ede JVM_IR: Remove descriptor usage from IrSourceCompilerForInline 2020-09-12 12:59:03 +03:00
Georgy Bronnikov 0a66dbf2b5 JVM_IR: remove descriptor usage in CompareTo intrinsic 2020-09-12 12:58:29 +03:00
Toshiaki Kameyama 370622087b Redundant nullable return type: false negative with return expression in local function or lambda
#KT-41817 Fixed
2020-09-11 19:09:57 +02:00
Toshiaki Kameyama de3907e8cc Redundant nullable return type: fix false positive with non-local return
#KT-41800 Fixed
2020-09-11 19:09:57 +02:00
Ilya Gorbunov 349cad7b9a Minor: migrate remaining scanReduceIndexed usages 2020-09-11 19:08:04 +03:00
Alexander Gorshenev 744f290fc4 A proper modality calculation was missing in IR fake override construction algorithm
#KT-41765 Fixed
2020-09-11 18:56:17 +03:00
Louis CAD 2886f48795 Improve spelling in Kotlin Test module's README.md 2020-09-11 18:45:58 +03:00
Louis CAD 64408c19f8 Add missing "The" article in kotlin.test doc 2020-09-11 18:20:37 +03:00
Andrey Uskov 175a8bec9d Make KotlinCoreEnvironment.disposeApplicationEnvironment() public
The method disposeApplicationEnvironment should be used in Gradle
after the configuration phase. This allows not to recreate the compiler
environment after each kts file compilation and improve overall
performance the evaluation and configuration phases.
2020-09-11 15:13:11 +03:00
Victor Petukhov fca6436170 Fix IDE test after bcd33da6f8 2020-09-11 13:51:15 +03:00
Igor Yakovlev e08763f3dd [ULC] Add annotations for PsiTypes in UltraLight classes
WIP on KT-41148, KT-41406, KT-41420
2020-09-11 12:49:05 +03:00
Igor Yakovlev b82d8cd4f4 [ULC] Fixed invalid access to lightclass infrastructure from UL 2020-09-11 12:49:05 +03:00
Igor Yakovlev 8fc94ddb8c [UCL] Minor fixes 2020-09-11 12:49:05 +03:00
Igor Yakovlev 97ac86273a [ULC] Add support of const fields to multifile facade 2020-09-11 12:49:05 +03:00
Igor Yakovlev 309bf49a83 Update lightclass tests renderer
+mute invalid old light classes tests
2020-09-11 12:49:04 +03:00
Igor Yakovlev c70383cc70 [ULC] Add compiler flag -Xdisable-ultra-light-classes to fallback to light implementation in CLI 2020-09-11 12:49:04 +03:00
Nicolay Mitropolsky e53db4c771 Uast: fixing WrappedUAnnotation identifiers 2020-09-11 12:49:04 +03:00
Igor Yakovlev 4b8f1bb362 [ULC] Add LanguageVersionSettings to CliLightClassGenerationSupport
+ refactoring
2020-09-11 12:49:04 +03:00
Igor Yakovlev 31b4a021a9 [ULC] Add JvmDeclarationOriginKind.DELEGATION to DeclarationOriginKindForOrigin of delegated methods 2020-09-11 12:49:03 +03:00
Igor Yakovlev b263e1c924 [ULC] Remove nullability annotation for UL backing fields of private props 2020-09-11 12:49:03 +03:00