Commit Graph

46626 Commits

Author SHA1 Message Date
Toshiaki Kameyama b5e3db1811 Lambda to reference: fix false positive for parameter' class reference
So #KT-22041 Fixed
2018-06-19 12:48:11 +03:00
Toshiaki Kameyama 271cbc1dd3 Reformat: ConvertLambdaToReferenceIntention 2018-06-19 12:48:11 +03:00
Mikhail Glukhikh b87dd07dd1 Redundant companion reference: minor refactoring 2018-06-19 12:48:11 +03:00
Toshiaki Kameyama 5ad98a139d "Redundant Companion": Don't suggest if same callable name is in use
So #KT-24425 Fixed
2018-06-19 12:48:10 +03:00
Alexey Sedunov a2435ff3b0 Configuration: Add default gradle repository to settings.gradle
#KT-24614 Fixed
2018-06-19 12:22:41 +03:00
Alexey Sedunov 70287ce974 Configuration: Use Android variant as source set name
#KT-24839 Fixed
2018-06-19 12:22:41 +03:00
Alexey Sedunov 9a3a7fbcca Debugger: Dispose ExtractionData/ExtractionResult when necessary
This fixes memory leak due to extensive use of "Evaluate expression"
2018-06-19 12:22:41 +03:00
Alexey Sedunov 16dbc6fb4d Extract Function: Forbid inappropriate declarations inside extractable fragment
#KT-20467 Fixed
 #KT-20469 Fixed
2018-06-19 12:22:40 +03:00
Alexey Sedunov f7cda61b08 Copy/Paste: Add imports for non-qualifiable callable references
#KT-23407 Fixed
2018-06-19 12:22:40 +03:00
Alexey Sedunov 694997651a Override/Implement: Fix processing of unresolved types
#KT-17350 Fixed
2018-06-19 12:22:40 +03:00
Alexey Sedunov ed8b4b761a Override/Implement: Add 'actual' modifier to overrides of 'expect'
#KT-23106 Fixed
2018-06-19 12:22:40 +03:00
Alexey Sedunov 5f87e84966 Override/Implement: Do not insert super-call into extension body
Such super-calls are not are supported yet

 #KT-4311 Fixed
2018-06-19 12:22:39 +03:00
Alexey Sedunov c49eede054 Generate hashCode()/equals(): Support deep array equality
#KT-19102 Fixed
2018-06-19 12:22:39 +03:00
Mikhail Glukhikh 9ef89447b3 Sealed sub-class -> object: handle equals, suggest "add equals"
Before this commit, sealed sub-class without state was considered
a style issue.
After this commit, sealed sub-class without state AND custom equals
is considered a probable bug,
because comparison of its instances is very fragile.
Alternative fix (generate equals & hashCode by identity) is added.
2018-06-19 11:20:26 +03:00
Dmitry Petrov ecd2709a11 psi2ir: type arguments for function references 2018-06-19 11:13:50 +03:00
Mikhail Glukhikh 84c369dc6c Highlighting settings provider: skip inspections on libraries *only*
This keeps inspection running e.g. in build.gradle.kts scripts
2018-06-19 10:42:37 +03:00
Mikhail Glukhikh cbec005055 Add test for KT-21710 (gutters inside library sources) 2018-06-19 10:42:36 +03:00
Mikhail Glukhikh 1819878c2b Switch off inspections on Kotlin files not in project source
To switch them off, KotlinDefaultHighlightingSettingsProvider
was introduced.
So #KT-19377 Fixed
2018-06-19 10:42:34 +03:00
Mikhail Glukhikh ef0eb5cbe9 KotlinProblemHighlightFilter: *perform* highlighting on library sources
This commit reverts fixing commit for KT-19377
So #KT-21710 Fixed
So #KT-19377 Submitted
2018-06-19 10:42:33 +03:00
Mikhail Zarechenskiy 6431934c13 Fix signature mapping for built-in methods inside erased inline class 2018-06-18 18:55:18 +03:00
Mikhail Zarechenskiy 8503194e0d Temporarily mute test for JS target 2018-06-18 18:36:36 +03:00
Nikolay Krasko 0f88565b93 Auto-add pattern for running inner tests in Gradle (KT-24961)
Since Gradle 4.7 there's a more strict pattern check. Simple include
trick doesn't work anymore.

Probably modification of TestSelectionMatcher.java in
https://github.com/gradle/gradle/commit/c2067eaa129af4c9c29ad08da39d1c853eec4c59#diff-e92afe807d7ea74cc9ab0dcef30efc93
is responsible for the new behaviour.

 #KT-24961 Fixed
2018-06-18 17:18:43 +03:00
Nikolay Krasko 1f2d6da770 Minor: fix formatting and warnings in tasks.kt 2018-06-18 17:18:38 +03:00
Alexander Udalov f6169337dd Use kotlinx-metadata-jvm to relocate .kotlin_module files in kotlin-reflect
Instead of custom logic which used compiler internals and was very
brittle
2018-06-18 12:35:06 +02:00
Anton Bannykh 14dfb6bd99 JS: install -> npmInstall (collides with maven tasks) 2018-06-18 13:32:59 +03:00
Anton Bannykh b551afb202 JS IR: minor fix for callable ref translation
The caching variable has to have no initializers so that there is no
dependence on evaluation order.
2018-06-18 13:15:19 +03:00
Anton Bannykh 43e3314255 JS IR: Remove inline functions with reified type parameters
Otherwise we cannot handle type casts
2018-06-18 13:15:19 +03:00
Anton Bannykh 3808d77bf4 JS IR: inliner 2018-06-18 13:15:19 +03:00
Anton Bannykh d938c91711 JS IR: top-level initializer lowering 2018-06-18 13:15:19 +03:00
Mikhail Zarechenskiy c5160a6a95 Don't use methods from super interface if call was on inline class type
Some methods (like `size` from kotlin.collections.Collection) have
 special rules for mapping and overriding. For example, when we call
 `size`, normally there will be `INVOKEVIRTUAL size()` in the bytecode,
 but for inline classes it should be `INVOKESTATIC ...$Erased.getSize()`
2018-06-18 12:35:31 +03:00
Mikhail Zarechenskiy 246d5e294c Fix bytecode optimisations for consequent boxing 2018-06-18 11:52:37 +03:00
Mikhail Zarechenskiy 01d9be65bc Perform bytecode optimisations for inline classes
#KT-23742 Fixed
2018-06-18 11:52:36 +03:00
Mikhail Zarechenskiy 7465289811 Introduce jvm backend class resolver to resolve asm types
Original author is @dnpetrov
2018-06-18 11:52:34 +03:00
Mikhail Zarechenskiy 5bdd7bca65 Pass GenerationState to OptimizationMethodVisitor
Original author is @dnpetrov
2018-06-18 11:52:32 +03:00
Mikhail Zarechenskiy 605cdcd8d8 Allow to use inline classes in 1.3 with warning 2018-06-18 11:52:31 +03:00
Mikhail Zarechenskiy 6db07f71f3 Check feature dependencies targets before report diagnostics
For example, if inline classes feature would have state `ENABLED_WITH_WARNING`,
 then corresponding warning will be reported on inline functions too
2018-06-18 11:52:29 +03:00
Nikolay Krasko 423e8f9979 Depend on jre8 kotlin stdlib in idea
Use jre artifact for now because of KT-24730.
2018-06-16 01:19:15 +03:00
Natalia Selezneva 077554c438 Use field access instead of setter in clone method of KtCodeFragment
Fix EA-120381
2018-06-16 00:01:29 +03:00
Alexander Udalov a9974a522e Use correct class loader in kotlinx-metadata to load MetadataExtensions implementations
By default, ServiceLoader.load uses thread context class loader, which
can differ from the MetadataExtensions' class loader (which also loads
JvmMetadataExtensions, since they're in the same .jar) in many cases,
for example when used in annotation processing

 #KT-24881 Fixed
2018-06-15 19:35:39 +02:00
Alexander Udalov 28da071ff6 Remove usages of deprecated ClsCustomNavigationPolicy
#KT-24891 Fixed
2018-06-15 18:58:15 +02:00
Nikolay Krasko ea3c4fd451 Run single test after Gradle 4.7 update 2018-06-15 18:06:20 +03:00
Roman Artemev 960fba3c4e Fix test failures 2018-06-15 16:23:06 +03:00
Nikolay Krasko e37cbe51d2 Remove outdated runtime notification
#KT-23122 Fixed
 #KT-21634 Fixed
 #KT-20324 Fixed
 #KT-18366 Fixed
 #KT-20910 Fixed

Outdated runtime notification was abandoned.
2018-06-15 16:13:17 +03:00
Ilmir Usmanov 192f311128 Minor. Ignore test is JS_IR. 2018-06-15 15:43:56 +03:00
Alexander Udalov 9bf2d129ee Improve exception message when failing to serialize anonymous object metadata
(See KT-20996)

Old message:

    Cannot get FQ name of local class: class <no name provided>

New message:

    Cannot get FQ name of local class: class <no name provided> defined in private fun x(): <no name provided> defined in root package in file 1.kt
2018-06-15 13:26:44 +02:00
Ilya Chernikov 29adf09b7e Add test with other annotation, tests fix of #KT-2496 2018-06-15 12:01:49 +02:00
Rodrigo B. de Oliveira e24a9d08f2 Only collect annotations with a name starting with KotlinScript 2018-06-15 11:53:49 +02:00
Natalia Selezneva 0adfa7b038 182: Converting J2K: save file path before conversion to use it in commit dialog
^KT-9945 Fixed
2018-06-14 21:33:11 +03:00
Natalia Selezneva adfa7a2418 Create new module with dependency on IDEA Git plugin 2018-06-14 21:33:10 +03:00
Roman Artemev dbb360555c [JS IR BE] Fix logic boolean operations 2018-06-14 19:54:35 +03:00