Commit Graph

33692 Commits

Author SHA1 Message Date
Alexander Udalov 98f6ea577a Move data class-related functions to DataClassDescriptorResolver 2016-09-15 16:45:48 +03:00
Alexander Udalov 22f8e7db3b Use independent context to type-check LHS of '::'
#KT-13110 Fixed
2016-09-15 16:45:48 +03:00
Alexey Sedunov 84aa82e73c Misc: Move conflict checking to moveConflictUtils.kt 2016-09-15 16:22:52 +03:00
Alexey Sedunov 54faac1cee Pull Up: Drop 'override' modifier if moved member doesn't override anything 2016-09-15 16:22:51 +03:00
Alexey Sedunov dddb4fd792 Introduce Lambda Parameter: Use IDEA-provided action 2016-09-15 16:22:50 +03:00
Alexey Sedunov f0a298e27b Minor: Fix NPE in MoveKotlinTopLevelDeclarationsDialog
#KT-13856 Fixed
2016-09-15 16:22:49 +03:00
Mikhail Glukhikh f973be22e2 IntentionBasedInspection minor refactoring: inspectionRange --> inspectionTarget 2016-09-15 14:26:40 +03:00
shiraji e4c873dc6a Add inspection + intention to replace .let { it.foo() } with .foo() #KT-13551 Fixed 2016-09-15 14:26:06 +03:00
Mikhail Glukhikh cdf4309e04 Speed search is enable in add import action #KT-13326 Fixed 2016-09-15 14:03:53 +03:00
Denis Zharkov 556df93ca7 Refine diagnostic about type arguments for an outer class
#KT-11263 Fixed
2016-09-15 10:33:19 +03:00
Denis Zharkov 7ca84649d7 Fix implicit type arguments resolution for inner classes
When resolving arguments on inner classifier, one can omit the arguments
for outer class 'Outer' if they are present implicitly in the scope:
- One of the supertypes of current class is Outer
- One of the outer classes or one of their supertypes is Outer

Relevant arguments are obtained from the first type found by
the algorithm above

Note that before this commit implicit arguments were only been searched
in containing classes

 #KT-11123 Fixed
2016-09-15 10:33:19 +03:00
Denis Zharkov 15c0901a72 Minor. Add covariant override for TypeParameterDescriptor.original 2016-09-15 10:33:19 +03:00
Ilya Gorbunov 3471b3311f Fix js RegExp test not to rely on array equality. #KT-8283 2016-09-14 20:41:41 +03:00
Alexey Tsvetkov 7b99730e39 Test that typealias works with Gradle
#KT-13204 Obsolete
2016-09-14 18:30:02 +03:00
Alexey Andreev dd062bfd6d JS: add explanation to inline/arrayLiteralAliasing.kt test 2016-09-14 16:37:54 +03:00
Alexey Andreev a9330057cc KT-8283: fix Kotlin.equals method to compare arrays by reference 2016-09-14 16:37:53 +03:00
Alexey Tsvetkov a04d60406b Fix snapshot version in gradle tests 2016-09-14 14:13:59 +03:00
Alexey Tsvetkov 1bac872047 Do not try to remove source annotations from not .class file 2016-09-14 13:53:35 +03:00
Alexey Tsvetkov d2677c0500 Change directory for sync task cache #KT-13732 fixed 2016-09-14 13:53:08 +03:00
Alexey Tsvetkov 508b965d88 Minor: fix gradle plugin order in test 2016-09-14 13:53:04 +03:00
Alexey Tsvetkov 6ebb50751c Remove source annotations when copy class with kapt2
Writing source annotations enables incremental compilation for kapt2.
However they are not needed in bytecode, so we remove them when
copying classes.

# Conflicts:
#	compiler/cli/src/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.kt
#	compiler/frontend.java/src/org/jetbrains/kotlin/config/JVMConfigurationKeys.java
2016-09-14 13:52:56 +03:00
Alexey Andreev 5534350fd6 KT-7397: use reference comparison (===) when translating a is A, where A is an object. Use more sophisticated check for reified parameters. 2016-09-14 13:16:24 +03:00
Alexey Andreev 5d34f5fb75 KT-13836: fix generation of FQN of secondary constructor when it's called via typealias. Fix #KT-13836 2016-09-14 12:40:01 +03:00
Simon Ogorodnik 115d63a2f3 #KT-13750 fix (#951) 2016-09-13 18:12:22 +03:00
Valentin Kipyatkov 19ef29e96c KT-12949 Type aliases are not considered for import when there is an unresolved reference
#KT-12949 Fixed
2016-09-13 17:47:39 +03:00
Valentin Kipyatkov e41ab2a270 Better presentation of aliases in completion list 2016-09-13 17:47:38 +03:00
Valentin Kipyatkov 50a0f9a4a7 KT-13266 Non-imported type aliases do not appear in completion
#KT-13266 Fixed
2016-09-13 17:47:38 +03:00
Valentin Kipyatkov fcce1e3838 KT-12852 Support breadcrumbs for Kotlin
#KT-12852 Fixed
2016-09-13 17:46:16 +03:00
Dmitry Petrov dae4521c68 KT-13822 Exception in the compiler for start-projection of a type alias
Use ClassifierWithTypeParameters in StarProjectionImpl.
2016-09-13 15:09:47 +03:00
Alexander Udalov 5b047684ab Use collections instead of sequences in KClassImpl.Data
Create less intermediate objects in extensions in KClasses.kt
2016-09-13 14:12:35 +03:00
Alexander Udalov b9dec41ea0 Cache more stuff in reflection implementation
Delete KAnnotatedElementImpl because it's not possible to make it a class (its
subclasses have other classes in supertypes) to cache annotations in a property
2016-09-13 14:12:34 +03:00
Alexander Udalov 80db0e4b71 Minor, make KCallableImpl a class
This will allow to cache stuff common to all callables in KCallableImpl
2016-09-13 14:12:33 +03:00
Alexander Udalov 4d7d70db19 Regenerate public API reference after changes in runtime.jvm 2016-09-13 14:12:32 +03:00
Alexander Udalov d128827a34 Inherit FunctionReference from CallableReference
This became possible now because FunctionImpl is no longer a class
2016-09-13 14:12:32 +03:00
Alexander Udalov a10cf8a931 Support 'is/as FunctionN<...>' and 'invoke' for KFunction instances 2016-09-13 14:12:31 +03:00
Alexander Udalov dcc66a6400 Drop KFunctionFromReferenceImpl, make FunctionImpl an interface
23 invokes in KFunctionFromReferenceImpl (and consequently, in FunctionImpl)
were needed before 1576160390: a wrapped function
reference must have had the necessary invoke to be called as an instance of a
specific function type. After 1576160390, this is
not needed anymore because KFunctionFromReferenceImpl is now an internal
implementation detail of reflection, and no invoke is ever called on it.
2016-09-13 14:12:30 +03:00
Alexander Udalov fbfa61da5d Drop K(Mutable)Property{0,1,2}Augmented
Also store name in KPropertyImpl, so that calling 'name' on a KProperty
instance in the property delegate does not result in unnecessary descriptor
computation
2016-09-13 14:12:29 +03:00
Alexander Udalov fc043c6e66 Drop KPropertyNFromReferenceImpl classes
The only place where their get/set methods were used was in
KPropertyNImpl.Getter.invoke, and it's fine if that results in a reflective
call instead (KPropertyN#getter is not available without kotlin-reflect.jar
anyway). The test data has been changed because a package local Java field is
not accessible via reflection
2016-09-13 14:12:29 +03:00
Alexander Udalov b0af2581ae Drop unused get/set implementations from PropertyReference runtime classes
They are overridden in all subclasses anyway: either in the corresponding
(Mutable)PropertyReferenceNImpl class, or in the anonymous class for a
reference, generated by the compiler.
2016-09-13 14:12:28 +03:00
Alexander Udalov d3abc83b4c Merge DescriptorBasedProperty into KPropertyImpl, make the latter a class 2016-09-13 14:12:27 +03:00
Alexander Udalov cd703868d4 Inherit KPropertyImpl.Accessor from KCallableImpl
This is needed to make KCallableImpl a class
2016-09-13 14:12:26 +03:00
Alexander Udalov 304b5deacb Simplify KProperty implementations: get rid of KMutablePropertyImpl 2016-09-13 14:12:26 +03:00
Alexander Udalov c7050ed445 Cache everything cacheable in KClassImpl
#KT-10651 Fixed
2016-09-13 14:12:19 +03:00
Alexander Udalov 6a97dc5f2c Cache declared/non-declared static/non-static KClass members
Making KClassImpl.Data, its superclass and ReflectProperties public was
required because they are accessed from other package in KClasses.kt
2016-09-13 14:01:52 +03:00
Alexander Udalov f292ca3dad Simplify signature and usages of KDeclarationContainerImpl#getMembers 2016-09-13 14:01:52 +03:00
Alexander Udalov b9067e6462 Introduce reflection cache in KClassImpl and KPackageImpl
Most of KClassImpl operations should be cached, but creating a lazy value for
each operation would significantly increase memory footprint of a KClassImpl
instance. Therefore we decide to store all lazy values under a single lazy
value named 'data' which is stored in KClassImpl. There's a minor overhead of
indirection on any operation now, however it'll allow us to substantially
increase reflection performance by caching everything we can
2016-09-13 14:01:52 +03:00
Valentin Kipyatkov f6b471ac01 Better tests 2016-09-13 12:02:10 +03:00
Valentin Kipyatkov 5bf701ab03 KT-13047 Autocomplete inserts a fully-qualified variable name inside a String
KT-12083 String interpolation -- auto {} if there is a letter after cursor

 #KT-13047 Fixed
 #KT-12083 Fixed
2016-09-13 12:02:10 +03:00
Alexey Sedunov 6e02051be5 Rename: Rename all overridden members if user chooses to refactor base declaration(s)
#KT-8867 Fixed
2016-09-12 21:03:21 +03:00
Alexey Sedunov a77e1dabce Move: Do not show directory selection dialog if target directory is already specified by drag-and-drop
#KT-13553 Fixed
2016-09-12 21:03:20 +03:00