Mikhail Glukhikh
97ebf2867a
[FIR] Get rid of type mismatch suppression during diagnostic casting
2020-09-14 18:08:33 +03:00
Mikhail Glukhikh
6fd3b011ca
[FIR] Simplify substitution for unsafe-variant type parameter types
...
#KT-41792 Fixed
2020-09-14 18:08:31 +03:00
Mikhail Glukhikh
e1b4108e4a
[FIR2IR] Mute some tests due to captured type problems
2020-09-14 18:08:30 +03:00
Mikhail Glukhikh
aa897db132
[FIR] Introduce UnsafeVariance attribute (see KT-41792)
2020-09-14 18:08:29 +03:00
Mikhail Glukhikh
e4aaae9ae7
FIR call completion: approximate type argument types
...
This commit removes some captured / ILT types at the end of resolve
2020-09-14 18:08:28 +03:00
Mikhail Glukhikh
3b828ac62b
[FIR] Bad test data fixes (around captured types)
2020-09-14 18:08:27 +03:00
Mikhail Glukhikh
cf5480a398
[FIR] Questionable test data fixes (around captured types)
2020-09-14 18:08:26 +03:00
Mikhail Glukhikh
4605a65f41
[FIR] Good test data fixes (around captured types)
2020-09-14 17:56:39 +03:00
Mikhail Glukhikh
c2d9fc469a
Get rid of exception at ConeKotlinType.varargElementType
2020-09-14 17:56:37 +03:00
Mikhail Glukhikh
2f61a2f56f
[FIR] Provide correct comparison of captured types
2020-09-14 17:56:36 +03:00
Mikhail Glukhikh
b5f8fec213
FIR substitution: use standard approximation to remove captured types
2020-09-14 17:56:35 +03:00
Mikhail Glukhikh
7a73787680
[FIR] Use captureFromArguments in createSubstitution
...
This commit breaks ~57 resolve tests because captured types
now exists at the end of FIR resolve
2020-09-14 17:56:34 +03:00
Mikhail Glukhikh
e83f3bbf04
Introduce substitution to ConeTypeContext.captureFromArguments
...
This commit itself does not influence anything
2020-09-14 17:56:33 +03:00
Mikhail Glukhikh
414842343d
[FIR2IR] Add another problematic test with captured type argument
2020-09-14 17:56:32 +03:00
Mikhail Glukhikh
267382d86b
[FIR2IR] Add problematic test with incorrect type argument
...
NB: we should not have <E> as AbstractFirBasedSymbol type argument,
because it isn't accessible in the current scope. Star expected instead.
2020-09-14 17:56:30 +03:00
Dmitry Petrov
b395771d01
KT-37050 don't generate redundant special bridges
...
Loosely based on https://github.com/JetBrains/kotlin/pull/3662
2020-09-14 16:13:34 +03:00
Alexander Udalov
f0282bcfdf
JVM IR: add module name for internal functions before "$default"
...
The change is a bit complicated because the name mapping logic is
refactored so that we would compute the needed suffix first (either
module name, or multifile part class name), and then shove it into the
mangled name between the original function name and "$default", if the
function in question is the default arguments adapter.
The main motivation for this change was to fix KT-41809, but as a side
effect, private functions with default arguments in multifile parts now
also contain the file name, just like normal private functions.
#KT-41809 Fixed
2020-09-14 13:18:24 +02:00
Alexander Udalov
93f38e1c61
JVM IR: minor, use more specific types in MethodSignatureMapper
2020-09-14 13:18:24 +02:00
Alexander Udalov
2a0f64ebcb
JVM IR: do not generate Deprecated(HIDDEN) class as synthetic
...
#KT-41810 Fixed
2020-09-14 13:18:24 +02:00
Ivan Gavrilovic
162dc3aa0c
KT-41295: Friend paths and compiler options compatible with conf caching
...
This change fixes serialization of friend paths and it uses
a file collection to record all friend paths. Also, when
computing the tested classpath for android projects, we now avoid
resolving the file collection until necessary.
Fixes: KT-41295
Test: ConfigurationCacheForAndroidIT
2020-09-14 13:31:52 +03:00
Dmitriy Novozhilov
be916e556a
[FIR] Properly update type of block after postponed analysis of it's content
2020-09-14 11:46:06 +03:00
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