Mikhail Glukhikh
8ea347653b
Remove some FirElement.session usages in FIR resolve
2019-03-14 18:23:25 +03:00
Mikhail Glukhikh
63cb8bb1a7
Remove FirElement.session usages from RawFirBuilder & around
...
Related to KT-30187
2019-03-14 18:23:11 +03:00
Mikhail Glukhikh
e6bb920a1d
FIR Java: support Kotlin extension overriding: at last, #KT-29937 Fixed
2019-03-14 18:18:40 +03:00
Mikhail Glukhikh
d00d078b4f
FIR Java: implement "appendErasedType" thus adding predefined signatures
...
Related to KT-29937
2019-03-14 18:18:20 +03:00
Mikhail Glukhikh
43d06f85e3
Add raw type comparison for Java (J2K mapping is taken into account)
...
NB: Java enhancement scope does not perform substitution, so we could
have some duplicates inside "type enhancement" testData
Related to KT-29937
2019-03-14 18:17:58 +03:00
Mikhail Glukhikh
f5e2cd2ac4
No override check in FirClassUseSiteScope, fix nasty substitution bug
...
This fixes MPP override test
(see mppFakeOverride in FirMultiModuleResolveTestGenerated)
2019-03-14 18:17:44 +03:00
Mikhail Glukhikh
de14dd1b9f
FIR type enhancements: more accurate * handling
2019-03-14 18:17:31 +03:00
Mikhail Glukhikh
c708171add
FIR type enhancements: support annotations for default parameter values
...
Related to KT-29937
2019-03-14 18:17:17 +03:00
Mikhail Glukhikh
5f3a01c25a
Get rid of FirElement.session usages inside fir:java
2019-03-14 18:16:58 +03:00
Mikhail Glukhikh
6c12fabf74
FIR: make JavaClassEnhancementScope use-site, get rid of scope providers
...
Related to KT-29937
2019-03-14 18:09:41 +03:00
Mikhail Glukhikh
e0348b56a1
FIR type enhancement: extract indexed Java type qualifiers
2019-03-14 18:08:16 +03:00
Mikhail Glukhikh
be412baf9f
FIR type enhancement: fold flexible types when it's possible
...
Related to KT-29937
2019-03-14 18:08:01 +03:00
Mikhail Glukhikh
3d29b31177
FIR type enhancements: handle class qualifiers, add new JSR 305 tests
...
Related to KT-29937
2019-03-14 18:07:46 +03:00
Mikhail Glukhikh
6c8aba8039
FIR: support callable symbols in dependencies provider
...
This breaks mppFakeOverrides test because of bug in FIR fake overrides
2019-03-14 18:07:32 +03:00
Mikhail Glukhikh
33fb3d154b
FIR Java model: support static members & enum entries
...
Related to KT-29218
2019-03-14 18:07:17 +03:00
Mikhail Glukhikh
0434a55ea2
FIR: add initial JSR 305 tests for Java type enhancements
2019-03-14 17:57:28 +03:00
Mikhail Glukhikh
14fb495ab6
Support Java constructors in FIR (related to KT-29218)
2019-03-14 17:57:13 +03:00
Mikhail Glukhikh
484e67727f
JavaClassifierTypeImpl: convert to Kotlin & cleanup
2019-03-14 17:56:57 +03:00
Mikhail Glukhikh
21d19f4144
JavaClassifierTypeImpl.java -> kt
2019-03-14 17:56:41 +03:00
Mikhail Glukhikh
fb788dc4c0
Fix null Java type argument problem & add relevant test
2019-03-14 17:56:23 +03:00
Mikhail Glukhikh
7563a98999
FIR type enhancement: make J2K mapping and changed handling more exact
...
Related to KT-29937
2019-03-14 17:56:05 +03:00
Mikhail Glukhikh
9bb2278fd4
Simplify JavaClassEnhancementScope: callback -> TypeInSignature
2019-03-14 17:55:47 +03:00
Mikhail Glukhikh
226cf8e42c
FIR Java types: handle wildcard types correctly
...
Related to KT-29937, KT-29218
2019-03-14 17:55:25 +03:00
Mikhail Glukhikh
6c79b184c0
FIR Java types: add Kotlin/Java mapping & mutability enhancements
...
Related to KT-29937
2019-03-14 17:55:10 +03:00
Mikhail Glukhikh
e7ac88d326
FIR: implement Java fields (in provider, type enhancement, scopes)
...
Related to KT-29218
2019-03-14 17:54:53 +03:00
Mikhail Glukhikh
4255c9f774
Add FIR enhancement tests, fix some exceptions / problems around them
...
Test data and tests themselves are based on
compiler/testData/loadJava/compiledJava
2019-03-14 17:52:33 +03:00
Mikhail Glukhikh
f31faafd72
Introduce initial version of FIR Java type enhancement
...
Java type enhancement is performed by a special scope kind
Java FIR dump was added for multiplatform tests to look at enhancements
Overrides, J2K mapping, special cases does not work yet
Related to KT-29937
2019-03-14 17:51:00 +03:00
Mikhail Glukhikh
060bd1b464
Add separate FirJava elements (class, method, parameter, type reference)
...
Related to KT-29218
2019-03-14 17:40:04 +03:00
Mikhail Glukhikh
109f1938f6
FIR: make simplification around class substitution scope
2019-03-14 17:39:49 +03:00
Mikhail Glukhikh
8ac34e1a0f
Reformat: context (Java resolve)
2019-03-14 17:39:25 +03:00
Denis Zharkov
6740cdabac
Get rid of ConeAbbreviatedType::directExpansion
...
It becomes necessary after extracting supertypes resolution into a
separate phase.
But also it looks reasonable because direct expansion actually depends
on the module we are looking from.
2019-03-14 17:06:45 +03:00
Denis Zharkov
92defc2ae3
Extract supertypes resolution into a separate FIR phase
2019-03-14 17:06:45 +03:00
Steven Schäfer
3f4c5c8d53
Resolve type aliases when looking for default arguments to actual methods.
...
Change-Id: I059093c1af32fcd7a2de36c25160c352d6f03a3c
2019-03-14 14:59:34 +01:00
Toshiaki Kameyama
dfd3947856
Keyword completion: add 'fun' after 'suspend' (KT-29038)
...
#KT-29038 Fixed
2019-03-14 15:35:45 +03:00
Toshiaki Kameyama
fd262bcd8d
Smart completion: fix anonymous object code style (KT-29572)
...
#KT-29572 Fixed
2019-03-14 15:35:44 +03:00
Toshiaki Kameyama
6acf3ad629
Add "arg" postfix template (KT-29398)
...
#KT-29398 Fixed
2019-03-14 15:35:44 +03:00
Ilmir Usmanov
0c0f035241
Set default value of releaseCoroutines in TypeSignatureMapping to true
2019-03-14 15:06:07 +03:00
Dmitriy Dolovov
5af2cbeacd
Fix MPP wizard tests
...
Issue #KT-30003 fixed
2019-03-14 18:11:25 +07:00
Nicolay Mitropolsky
69ea0175a2
KotlinElementActionsFactory.createAddAnnotationActions: adding @field annotation target for targetless annotations (KT-18459)
2019-03-14 10:59:00 +03:00
Dmitry Gridin
3bf0fb8957
Intention “Introduce import alias” shouldn't modify other files
...
#KT-30412 Fixed
2019-03-14 12:09:41 +07:00
Dmitry Gridin
179dfce3a8
Fix false positive for type error in intentions AddReturnTo...
...
Relates to #KT-25272
2019-03-14 10:52:59 +07:00
Georgy Bronnikov
d7ce24410d
Remove descriptors from SharedVariablesManager
2019-03-13 23:13:41 +03:00
Ilya Gorbunov
edc766af56
Document exception thrown for negative n in take/takeLast/drop/dropLast
...
#KT-29151
2019-03-13 17:58:19 +03:00
Ilya Gorbunov
6bc7c06038
Add samples for is(|Not|NullOr)Empty and is(|Not|NullOr)Blank functions
2019-03-13 17:58:05 +03:00
Ilya Gorbunov
ed878be1f7
Docs: reword summaries for a couple of experimental annotations
2019-03-13 17:53:37 +03:00
Ilya Gorbunov
ffe8b4419c
Docs: use consistent kotlinlang.org url in references
2019-03-13 17:53:37 +03:00
Dmitry Gridin
479e812bbc
Fix false positive "Redundant lambda arrow" inspection
...
#KT-29590 Fixed
#KT-19462 Fixed
#KT-29124 Fixed
2019-03-13 20:57:30 +07:00
Sergey Igushkin
49ee197578
Ignore deprecated configurations in a test with Gradle 5.3+ (KT-30378)
2019-03-13 16:39:56 +03:00
Sergey Igushkin
0830977d16
Exclude the configurations of source sets from dependency resolution
...
The `*Api`, `*Implementation`, `*CompileOnly`, and `*RuntimeOnly`
configurations of a `KotlinSourceSet` must not be resolved directly, as
they lack attributes needed to choose a Kotlin MPP variant, and they
must not be candidates in variant-aware resolution of a project
dependency either.
With Gradle 5.3, these configurations failed to resolve anyway, as they
had no proper `org.gradle.usage` attribute, and the disambiguation
rules of the 'java-base' plugin conflicted with the Kotlin rules.
2019-03-13 16:39:55 +03:00
Sergey Igushkin
7c139e059a
Fix publishing with Gradle 5.3 (KT-30379)
...
In Gradle 5.3, there was a change to the internal logic of publishing
`SoftwareComponent`s with the 'maven-publish' plugin, and,
simultaneously, a new public API was introduced for user-defined
software components, see https://github.com/gradle/gradle/pull/8399
Earlier, the 'maven-publish' plugin used the Gradle `Usage` attribute
values to arrange the dependencies of a software component's
`UsageContext`s into the Maven scopes. Now that mechanism doesn't work
and a `SoftwareComponent` must provide an explicit mapping of the
variants to POMs by using the `SoftwareComponentFactory.adhoc` API.
However, the new API lacks some features we need to properly publish an
MPP, such as adding a component to another one as a variant, so we still
create old-style software components under the hood and
then wrap them into the new API (and then wrap the adhoc components once
again).
We also continue to use the old-style components for Kotlin-specific
logic like finding a target in another project that a dependency
resolved to, as the components produced by the new API lack crucial
information that is used in the logic, like references to
`KotlinCompilation`s.
Issue #KT-30379 Fixed
2019-03-13 16:39:55 +03:00