Commit Graph

39829 Commits

Author SHA1 Message Date
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
Valentin Kipyatkov 6df0c28119 Correction after code review 2017-06-30 11:21:16 +03:00
Valentin Kipyatkov 8fabb6945e Allow slice rewrite in trace when in IDE 2017-06-30 11:21:16 +03:00
Valentin Kipyatkov 61d9a6b9cd Use the same way to check for ProcessCanceledException everywhere 2017-06-30 11:21:16 +03:00
Valentin Kipyatkov eb4f322c77 Do not store ProcessCanceledException as result for cached value 2017-06-30 11:21:15 +03:00
Valentin Kipyatkov 09dbb07fb8 Optimization to reuse BindingContext in completion 2017-06-30 11:21:15 +03:00
Sergey Igushkin 1174c7bdd9 Add sourcesJar and javadocJar to artifacts of gradle-tools projects.
(cherry picked from commit 450345b)
2017-06-29 20:59:36 +03:00
Sergey Igushkin a4be282074 Add Gradle Plugin Portal publication to the buildscripts
Add option to disable signing (-PnoSign), to be used when publishing
pre-built artifacts

Add option to define specific version for publishing, to be used when
publishing test versions

(cherry picked from commit dcd55e9)
2017-06-29 20:59:36 +03:00
Dmitry Jemerov 4497874f31 Remove unnecessary saveAll() 2017-06-29 17:56:59 +02:00
Sergey Igushkin d1bddb6250 Fix disabling IC not applied to kapgGenerateStubsKotlin tasks
Issue #KT-18647 Fixed

(cherry picked from commit ffb656a)
2017-06-29 18:44:00 +03:00
Sergey Igushkin a9cad7f112 Add a test for project.buildDir lazy evaluation
(cherry picked from commit ab0f9cd)
2017-06-29 18:42:50 +03:00
Nikita Skvortsov b2cdb0d63d evaluate and use buildDir as late as possible
(cherry picked from commit a2c7f80)

(cherry picked from commit 5643fa1)
2017-06-29 18:41:53 +03:00
Sergey Igushkin 351f810797 Add tests for separate classes dirs
(cherry picked from commit b07d79b)
2017-06-29 18:31:53 +03:00
Sergey Igushkin 700b162233 Implemented separate classes dirs support in the Gradle plugins.
Issue #KT-18495 Fixed
Issue #KT-18544 Fixed

(cherry picked from commit e25f0fd)
2017-06-29 18:31:23 +03:00
Sergey Igushkin ae47c59dc9 Pass freeCompilerArgs unchanged to the compiler, without parsing them
with the compiler loaded along the Gradle plugin.

Issues: #KT-17618 Fixed

(cherry picked from commit 44f7428)
2017-06-29 18:27:18 +03:00
Alexey Sedunov 88968807b2 Generate equals/hashCode(): Swap class literals in comparison 2017-06-29 17:42:20 +03:00
Alexey Sedunov e3e4c447fa Generate equals/hashCode(): Use class literals when possible
#KT-18683 Fixed
2017-06-29 17:42:18 +03:00
Alexey Sedunov 50a38df8b1 Remove Parentheses: Forbid on call inside a call without argument list
#KT-18699 Fixed
2017-06-29 17:42:17 +03:00
Alexey Sedunov 20969f161c Introduce Parameter: Fix NPE on invalid parameter name or type
EA-95189 Fixed
2017-06-29 17:42:16 +03:00
Alexey Sedunov 2e8b374ce8 Move: Use KtNamedDeclaration as referrer when reporting a conflict
EA-103817 Fixed
2017-06-29 17:42:15 +03:00
Alexey Sedunov 58addf72ff New File Action: Do not start under write action
EA-102468 Fixed
2017-06-29 17:42:14 +03:00
Alexey Sedunov b1637df8df Misc: Format generated members under write action
EA-87901 Fixed
2017-06-29 17:42:13 +03:00
Alexey Sedunov 392370bb23 Extract Interface: Fix NPE
EA-90440 Fixed
2017-06-29 17:42:11 +03:00
Alexey Sedunov dd0f8e98e8 Create Type Alias From Usage: Disable on PsiPackage
EA-92625 Fixed
2017-06-29 17:42:10 +03:00