Alexey Sedunov
ee200c87ea
Kotlin Facet: Change module JDK according to jdkHome
...
It's possible when JDK with the same home path is already configured
2017-07-04 19:37:52 +03:00
Alexey Sedunov
2a53043fef
Generate equals/hashCode(): Fix function body generation
...
#KT-18596 Fixed
2017-07-04 19:37:50 +03:00
Simon Ogorodnik
33c22b8251
KT-8208: Support static members completion when receiver not-imported
...
#KT-8208 fixed
2017-07-04 16:41:50 +03:00
Dmitry Petrov
16505daeea
Fix 'equals' for NotNullBasicValue
...
NotNullBasicValues were merged incorrectly sometimes,
which caused problems with INSTANCEOF checks.
#KT-18779 Fixed
2017-07-04 12:19:10 +03:00
Mikhael Bogdanov
8121c1d3c4
Update test to support js-backend
2017-07-04 10:12:42 +02:00
Mikhael Bogdanov
8666b95dd2
Delete local variables on default mask expantion
...
#KT-18792 Fixed
2017-07-03 17:01:06 +02:00
Mikhael Bogdanov
01e2f8e32c
Preventively allocate slots for additional default parameters
...
Otherwise they are corrupted by inline
2017-07-03 17:01:06 +02:00
Denis Zharkov
5453f3067c
Load @NonNull(when=UNKNOWN) annotated type as a flexible one
2017-07-03 17:55:37 +03:00
Denis Zharkov
55b585f3d0
Replace JavaTypeAttributes interface with simple data class
2017-07-03 17:55:37 +03:00
Denis Zharkov
939bacc810
Minor. Drop unused parameters in LazyJavaScope
2017-07-03 17:55:37 +03:00
Denis Zharkov
e26c210d69
Support TypeQualifierDefault from JSR 305 for nullability qualifiers
...
#KT-10942 Fixed
2017-07-03 17:55:37 +03:00
Denis Zharkov
5141a88a53
Add TypeQualifier annotation to IDE test data
...
Othewise nullability is not processed correctly
2017-07-03 17:55:37 +03:00
Denis Zharkov
a95d3e601b
Fix container for extension receiver types from Java
...
No tests are added since there are some already
(e.g. TypeEnhancement.testOverriddenExtensions)
2017-07-03 17:55:37 +03:00
Denis Zharkov
57b7b91444
Do not add container annotaions to type artificially
...
It was only used for type-related nullability/mutability
annotations and it was necessary to remove them
in the descriptor renderer (duplicating their fqnames there).
At the same time they're only needed for types enhancement
where they can be simply restored from type owners' descriptors
The testData changes are more or less correct: this kind of annotations
is bound both to types themselves and their use because of their targets
2017-07-03 17:55:37 +03:00
Denis Zharkov
f877c82029
Simplify computeIndexedQualifiersForOverride() declaration
...
Do not pass properties of the to its own methods
2017-07-03 17:55:37 +03:00
Denis Zharkov
8812844d43
Move type qualifiers calculation into SignatureParts
...
It helps not to pass signature parts content to them
2017-07-03 17:55:37 +03:00
Denis Zharkov
92f9194112
Support TypeQualifierNickname for nullability annotations
...
#KT-10942 In Progress
2017-07-03 17:55:37 +03:00
Denis Zharkov
f2a55d590c
Move type qualifiers extraction to SignatureEnhancement
...
These methods will depend on other components soon
2017-07-03 17:55:37 +03:00
Denis Zharkov
b3caa1da34
Introduce SignatureEnhancement component
...
It will depend on the AnnotationTypeQualifierResolver later
2017-07-03 17:55:37 +03:00
Denis Zharkov
21d1d16e74
Drop RawBound class and relevant property from JavaTypeAttributes
...
The main motivation behind this change is code simplification:
raw bounds can be simply replaced with common flexible bounds
2017-07-03 17:55:37 +03:00
Denis Zharkov
cbe62f076d
Drop JavaTypeAttributes::isMarkedNotNull property
...
The only cases this code runs are annotation parameters
and supertypes that are already not-nullable by default
2017-07-03 17:55:37 +03:00
Denis Zharkov
42b2534c46
Remove redundant check in WhenByPlatformEnumChecker
...
If a type is annotated as not null its upper bound is not nullable
in most cases besides override conflicts, but in the latter case
we should behave consistently with flexibility of this type
2017-07-03 17:55:37 +03:00
Denis Zharkov
fc9810182e
Get rid of JavaTypeAttributes::allowFlexible property
...
It's only false now in case of annotation parameters
2017-07-03 17:55:37 +03:00
Denis Zharkov
507eccc4ec
Replace another allowFlexible=false with isNotNullable
...
Having field initilized doesn't make it inflexible in a sense
of mutability
2017-07-03 17:55:37 +03:00
Denis Zharkov
a0268d23bb
Get rid of trivial allowFlexible replacing
...
As the type is anyway replaced with not-nullable version
explicitly, the only thing that changes is what type is loaded
for String[][].class:
- before it would be Array<Array<String?>?>
- now it's Array<(out) Array<(out) String!>!>
It's both a minor change and new behaviour can be considered
as correct
2017-07-03 17:55:37 +03:00
Denis Zharkov
58442e7b8b
Drop TypeUsage::MEMBER_SIGNATURE_CONTRAVARIANT
...
It's only used for value parameters, but they're always resolved
with flexible types now
2017-07-03 17:55:37 +03:00
Denis Zharkov
6cd6608281
Drop TypeUsage::MEMBER_SIGNATURE_COVARIANT
...
It's only used for choosing mutability of a collection class, but
using annotations while loading is redundant since there is
a separate phase of type enhancement where they're taken
into account (for flexible types)
For inflexible type it doesn't matter since they appear only in
special cases like annotation methods (where collection classes can't be met)
2017-07-03 17:55:37 +03:00
Denis Zharkov
5ca3459a0f
Minor. Merge TypeUsage::MEMBER_SIGNATURE_INVARIANT and COMMON
...
Their usages are effectively the same
2017-07-03 17:55:37 +03:00
Denis Zharkov
69e70575f9
Drop some of the TypeUsage enum entries
...
The only sensible usage of them was in the `isNullable` method
But you can check that UPPER_BOUND/SUPERTYPE_ARGUMENT are always
flexible and TYPE_ARGUMENT is not only in case of annotation
methods/parameters
2017-07-03 17:55:37 +03:00
Denis Zharkov
5c8f2a8ae8
Add resolution for JSR 305 type qualifier nicknames
...
#KT-10942 In Progress
2017-07-03 17:55:37 +03:00
Denis Zharkov
79e14f88e4
Support package level annotations in Java
...
#KT-10942 In Progress
2017-07-03 17:55:37 +03:00
Denis Zharkov
b7ead75947
Minor. Move BinaryJavaModifierListOwner -> MapBasedJavaAnnotationOwner
2017-07-03 17:55:04 +03:00
Mikhail Glukhikh
2d1e1cb6ed
Minor: !!-related quick-fixes refactoring
2017-07-03 15:18:10 +03:00
Dmitry Neverov
4f678fa85c
Do not suggest !! on expression which is always null
...
Related to KT-14643
2017-07-03 15:14:11 +03:00
Dmitry Neverov
66bd9d63dd
Do not suggest adding !! on null constant #KT-14643 Fixed
2017-07-03 15:13:46 +03:00
Dmitry Jemerov
84418738a7
Optimize library kind detection and make it interruptible
2017-07-03 12:02:50 +02:00
Mikhael Bogdanov
49252f6eec
Properly process primitive receiver on inlining bound callable references
...
#KT-18728 Fixed
2017-07-03 10:51:51 +02:00
Ilya Gorbunov
fe17c4416e
Fix a typo: retail -> retain
...
#KT-18526 Fixed
2017-07-01 17:05:17 +03:00
Ilya Gorbunov
a21dbf08a8
Reorder values and entries in MutableMap to match docs
...
Also change references to mutable collections in docs.
#KT-18670 Fixed
2017-07-01 17:05:17 +03:00
Stuart Kent
962958c403
Fix String capitalize/decapitalize sample references and sample names
2017-07-01 17:05:17 +03:00
Simon Ogorodnik
ab919886ae
Fix rendering of local anonymous object types for quick doc
...
#KT-8893 fixed
2017-07-01 15:04:29 +03:00
Nikolay Krasko
25109671b1
Postpone counting light elements till all psi checks done
2017-07-01 03:05:38 +03:00
Nikolay Krasko
fe17d616b9
Don't process Java references twice when looking for kotlin overrides (KT-17751)
2017-07-01 03:05:37 +03:00
Nikolay Krasko
0cd8ee57b8
Don't run another method reference search for constructors (KT-17751)
...
Constructors can't be used as properties and have no overrides.
2017-07-01 03:05:37 +03:00
Alexander Udalov
37982e4bb1
Move SAM-related descriptor classes to module frontend.java
...
Also move SyntheticMemberDescriptor to module resolution
2017-06-30 21:02:18 +03:00
Alexander Udalov
9717745b83
Minor, remove implementation overridden in all subclasses
2017-06-30 21:02:18 +03:00
Alexander Udalov
778a6758a5
Do not add inner class names to functions in Java static scope
...
Previously it was needed for SAM adapters, but they can no longer be
found in this scope
2017-06-30 21:02:18 +03:00
Sergey Igushkin
c4e7f1aa97
Fix parsing Gradle version with zero
...
(cherry picked from commit 732972c)
2017-06-30 20:44:59 +03:00
Sergey Igushkin
40a8bbf24d
Fix friend paths not configured correctly with separate classes dirs
...
(cherry picked from commit d5ee659)
2017-06-30 20:44:49 +03:00
Alexey Sedunov
9ba868a903
Minor: Fix test data
2017-06-30 13:53:09 +03:00