Commit Graph

31453 Commits

Author SHA1 Message Date
Mikhael Bogdanov ee7bbbf530 Fix for KT-12127: Undeclared type variable on delegated property backing field
#KT-12127 Fixed
2016-05-04 17:07:48 +03:00
Valentin Kipyatkov bac5c4d70b Fixed test data after commit: https://github.com/JetBrains/kotlin/commit/602de317d68c3a4408829e2f1c7e93f31936399f 2016-05-04 16:26:44 +03:00
Denis Zharkov c30c695a18 Use cache for custom ClassDescriptors
Otherwise new ones are being created for each request, and their member scope is recomputed
2016-05-04 14:58:05 +03:00
Denis Zharkov 594fa02a9c Optimize memory usage by LockBasedStorageManager inner classes
Change all inner classes to be 'static'
Use explicit reference to StorageManager instead of
implicit reference to outer class.

The main problem of inner classes here is that outer instance
is being captured at each inheritance level, so e.g. some lazy value impls
may store up to three duplicating references.
2016-05-04 14:58:05 +03:00
Mikhael Bogdanov 09509b6d18 Update android test dependency to android 4.4.2 cause of missed test result problem on 4.1.2 2016-05-03 09:11:37 +03:00
Ilya Gorbunov 249d08a66e Handle special cases of drop, take, takeLast when it is known in advance that the result is a single-item list. #KT-9990 2016-04-29 22:21:19 +03:00
Ilya Gorbunov d70b46fd37 Change evaluation test data not to encounter special implementation of single element list. 2016-04-29 22:21:19 +03:00
Ilya Gorbunov a665b2183c Optimize operations to return special collection implementations when result is empty or has single element.
#KT-9990
2016-04-29 22:21:19 +03:00
Ilya Gorbunov 2d12ed68c8 Remove runtime specialization in inline last and lastOrNull to prevent double inlining of predicate body. 2016-04-29 22:21:19 +03:00
Ilya Gorbunov 09c1ff1233 Do not use indexed access for lists not supporting RandomAccess
Add RandomAccess specialization.
2016-04-29 22:21:19 +03:00
Ilya Gorbunov f4f82656f7 Use list iterators instead of indexed access in operations on lists taking a lambda.
Related to #KT-9607
2016-04-29 22:21:19 +03:00
Nikolay Krasko b743e71cfc Do not request write action for MoveDeclarationToSeparateFileIntention (EA-81511)
There's nothing but delegation to move refactoring. This started to fail in br146 because of this commit:
https://github.com/JetBrains/intellij-community/commit/334772b7a8dfe3afb32665c09ff8e27781a01512
2016-04-29 21:24:56 +03:00
Nikolay Krasko 4a5c298897 Revert another class of ComparisonFailure
Idea throws this class but not org.junit.ComparisonFailure
2016-04-29 21:24:56 +03:00
Nikolay Krasko 31043f43e3 Fix path replacement in reference tests
The commit fixes ReferenceResolveInJavaTestGenerated$BinaryAndSource.testFileFacade.
2016-04-29 21:24:56 +03:00
Michael Bogdanov e2ae2f313c Support test with self imports, kotlin multifile tests 2016-04-29 16:33:04 +03:00
Michael Bogdanov 0f110b049b Fix for "adb: Syntax error: ")" unexpected" 2016-04-29 16:21:15 +03:00
Zalim Bashorov ed0fa2c26c Fix NoSuchMethodError when try to access in test to internal member from production for gradle projects imported into IDEA 16 or higher
#KT-11993 Fixed
2016-04-29 18:23:26 +03:00
Valentin Kipyatkov 74b41cff0e Minor changes on code review 2016-04-29 18:13:53 +03:00
Valentin Kipyatkov 92af610322 KT-12045 J2K: creating Object() instance could be converted to Any()
#KT-12045 Fixed
2016-04-29 18:13:53 +03:00
Valentin Kipyatkov 76e067c43a KT-12054 J2K generates obj is Type<Any> instead of obj is Type<*>
#KT-12054 Fixed
2016-04-29 18:13:53 +03:00
Valentin Kipyatkov a8eef5effc KT-12039 Convert Java to Kotlin -- static imports are imported as Class.CONST (missing .Companion)
#KT-12039 Fixed
2016-04-29 18:13:52 +03:00
Valentin Kipyatkov a80d36e8eb Minor simplification 2016-04-29 18:13:52 +03:00
Valentin Kipyatkov 569483af5d Moved import conversion out of "ast" package 2016-04-29 18:13:52 +03:00
Valentin Kipyatkov 83442db408 Do not duplicate list of default imports 2016-04-29 18:13:52 +03:00
Valentin Kipyatkov 08a37b3acc Extracted methods 2016-04-29 18:13:52 +03:00
Valentin Kipyatkov a9eadcbaf4 KT-12046 Java to Kotlin dangerous conversion (recursive property set)
#KT-12046 Fixed
2016-04-29 18:13:51 +03:00
Valentin Kipyatkov 9c0e1204ea Minor 2016-04-29 18:13:51 +03:00
Valentin Kipyatkov b0e6bf3965 Deleted inspection profile 2016-04-29 17:06:28 +03:00
Alexander Udalov 384c32b63f Update ChangeLog for 1.0.2 2016-04-29 15:45:05 +03:00
Alexander Udalov a3055edda9 Minor, move SpecialNames.isSafeIdentifier check a little earlier 2016-04-29 15:21:26 +03:00
Alexander Udalov d85884426e Minor optimization of lookup tracker records 2016-04-29 15:21:26 +03:00
Alexander Udalov 785877d1de Combine Java package scope and Kotlin scopes in JvmPackageScope
Use it in LazyJavaPackageFragment#scope instead of a weird lazy chained scope.
Also move lookup tracker records to it, to prevent them from being written in
each package scope individually (this was hurting performance)
2016-04-29 15:21:26 +03:00
Alexander Udalov 05af72dc7a Optimize class lookups in DeserializedPackageMemberScope
Do not try to load classes (and litter in ClassDeserializer#classes cache with
unsuccessful requests) which the deserialized scope knows nothing about. This
is possible because deserialized scopes have the full list of their class names
2016-04-29 15:21:26 +03:00
Denis Zharkov d259b91143 Add MutableMap.remove(K, V) as built-in declaration
Use PlatformDependent annotation to guarantee it's only be available for JDK8
Also adjust type-safe bridges and mutable collection stubs generation
2016-04-29 15:08:54 +03:00
Denis Zharkov 55c4f875c8 Use signatures instead of fq-names in special built-ins
It's necessary to distinguish overloads,
e.g. MutableMap.remove now has two versions
2016-04-29 15:08:54 +03:00
Kirill Rakhman 8e5481b5d5 Implement Intention to add @JvmOverloads (#860)
Implement Intention to add @JvmOverloads
Fixes #KT-11523
2016-04-29 14:32:00 +03:00
Kirill Rakhman f309920af8 Add quickfix to make referenced primary constructor parameter a property
Fixes #KT-12089
2016-04-29 12:14:42 +02:00
Kirill Rakhman 1c5322bae4 Quick fix for SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE (#858)
* Quick fix for SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE
Fixes #KT-11876

* Revert accidental change

* Remove period

* ConvertExtensionToFunctionTypeFix: more tests
2016-04-29 12:47:38 +03:00
Valentin Kipyatkov b551886889 Code cleanup: removed redundant semicolons 2016-04-29 11:26:25 +03:00
Valentin Kipyatkov e1d8c72aa7 KT-10770 IDEA cannot keep import if a type is only referenced by kdoc.
#KT-10770 Fixed
2016-04-29 11:23:23 +03:00
Valentin Kipyatkov cd2161b37d KT-12069 Specify language for all Kotlin code inspections
#KT-12069 Fixed
2016-04-29 11:23:23 +03:00
Valentin Kipyatkov 306edef23c Highlighting of redundant semicolons
#KT-5010 Fixed
2016-04-29 11:23:22 +03:00
Valentin Kipyatkov 77033f52ee ConvertPropertyInitializerToGetterIntention to not be available inside lambda initializer 2016-04-29 11:23:22 +03:00
Kirill Rakhman 4a619db721 Add intrinsic for KCallable.name property Fixes #KT-11531 2016-04-28 23:03:00 +03:00
Nikolay Krasko b8e2533b58 Check that injection with annotation on parameter doesn't trigger not-stubbed psi 2016-04-28 16:11:35 +03:00
Nikolay Krasko dd8b667360 Don't analyze function body if only parameter analyze is requested 2016-04-28 16:11:33 +03:00
Nikolay Krasko faa2745731 Missing new line in error message (KT-12070)
#KT-12070 Fixed
2016-04-28 16:11:27 +03:00
Nikolay Krasko 018622e552 Use partial resolve for annotation search 2016-04-28 16:06:35 +03:00
Nikolay Krasko 3d8abd874b Use kotlin specific methods for pattern creation 2016-04-28 16:06:34 +03:00
Nikolay Krasko 73024429dc Refactoring: use language injection in ResolveElementCache.kt 2016-04-28 16:06:32 +03:00