Commit Graph

52372 Commits

Author SHA1 Message Date
Dmitry Gridin dce2139eb0 Fix KNPE from "Create" quick fix
#KT-27289 Fixed
2019-03-04 13:01:18 +03:00
Dmitry Gridin 78bee70946 Refactoring 2019-03-04 13:01:18 +03:00
Nikolay Krasko b458e187af Extract ITNReporter.submit() compatibility problem to separate file 2019-03-04 12:14:23 +03:00
Nikolay Krasko a5434d7d9e Add internal action for reporting exceptions from Kotlin plugin 2019-03-04 12:14:23 +03:00
Nikolay Krasko 6504cb285b Add internal action for continuous enabling and disable dumb mode 2019-03-04 12:14:22 +03:00
Nikolay Krasko 27ba9b5481 Fix Goto tests by invoking action directly instead of using handler
Problem introduced in
https://github.com/JetBrains/intellij-community/commit/1f7f3d9fdc2bf849be9a73cd8be4d6a83641ca7a

Implementation CodeInsightActionHandler was returned for GotoDeclarationAction later.
2019-03-04 12:14:22 +03:00
Mikhail Zarechenskiy 93e79afab4 [NI] Preserve nullability of resulting type from CST if it's possible
Consider common supertype of `S` and `Nothing`, where `S` has nullable
 upper bound or it's flexible. Before the fix, result was `S?`, which
 is correct but too conservative. Now, we'll preserve nullability of
 resulting type if it's already nullable.

 This happened because we were failing to find path of not-nullable
 types from `Nothing` to `S`, which should obviously exists by
 semantics of Nothing
2019-03-04 11:29:39 +03:00
Mikhail Zarechenskiy 9b3e17f0d7 [NI] Avoid building controversial systems by clipping extra constraints
#KT-23854 Fixed
2019-03-04 11:29:38 +03:00
Mikhail Zarechenskiy 92b40ea9d5 [NI] Refactor adding expected type constraint
Add comments, make computation needed for expected type more clear
2019-03-04 11:29:38 +03:00
Mikhail Zarechenskiy 43cf6623f9 [NI] Added test for controversial common system
See KT-23854
2019-03-04 11:29:38 +03:00
Dmitry Gridin 5927032143 Fix "Introduce import alias" on extensions
#KT-30214 Fixed
2019-03-04 10:15:52 +03:00
Pavel V. Talanov 853e9a2aa0 Prevent calls to onFirstRun default implementation for gradle rc
This is temporary until we get compatible API from IDEA
    to support gradle run configurations for MPP projects in IDEA 191+
2019-03-04 02:52:41 +01:00
Andrey Uskov 25dc81c2bd Fix memory leak in gradle import
#KT-30076 Fixed
2019-03-03 20:28:04 +03:00
Andrey Uskov 3919898d19 Minor. Reformat code in multiplatform project importer 2019-03-03 20:27:12 +03:00
Ilya Chernikov db3eb5707b Drop redundant usages of the ScriptDefinitionProvider 2019-03-02 08:10:17 +01:00
Ilya Chernikov e99715cf82 Extract extra imports provision into an extension, implement one ...
for script in the plugin, drop direct dependency on scripts from
FileScopeFactory
2019-03-02 08:10:17 +01:00
Ilya Chernikov 57ac149f5b Extract script cli evaluation to the plugin 2019-03-02 08:10:17 +01:00
Ilya Chernikov 7c3bdde102 Fix sequence of the script definitions search - explicit ones should be tried first 2019-03-02 08:10:16 +01:00
Ilya Chernikov 196e274929 Move calculating dependencies from script sources to plugin 2019-03-02 08:10:16 +01:00
Ilya Chernikov 336f43dbf2 Reorganize files and folders in the scripting plugin 2019-03-02 08:10:16 +01:00
Ilya Chernikov adb4d264ec Move script definition extraction functions to the plugin
plus finish refactoring of these functions
2019-03-02 08:10:16 +01:00
Nicolay Mitropolsky 815fcd062d Uast: caching isJvmElement if all modules are Jvm (KT-28564) 2019-03-01 20:14:57 +03:00
Alexander Udalov 8ef7f73164 Fix incorrect enum comparison in kotlinx-metadata
Previously, we compared instances of different enums and thus the
conditions were always true. This did not affect visible behavior of the
program except the fact that we've been writing default field values
(kind and level) for version requirements to protobuf where they
could've been omitted
2019-03-01 17:09:03 +01:00
Shagen Ogandzhanian ed4e93cc98 Fix for npm publishing configuration
This reverts commit 0188cd5330.
Turns out it's not a url after all
2019-03-01 15:46:28 +01:00
Dmitry Gridin 2a940f5b0a Fix KT-26965 2019-03-01 17:43:56 +03:00
Shagen Ogandzhanian 7162dd9807 Prepare JsTestChecker (but not introduce so far) for J2V8 adoption 2019-03-01 15:29:35 +01:00
Wil d3ac50f694 Minor: typo fix in Writer.buffered docs 2019-03-01 17:09:27 +03:00
Dereck Bridie 4156a76129 #KT-26965 Add inspection + quickfix for replacing Collection<T>.count() with .size 2019-03-01 16:58:36 +03:00
Toshiaki Kameyama 240ff08069 Specify type: escape with backticks if need
#KT-29677 Fixed
2019-03-01 16:43:02 +03:00
Toshiaki Kameyama 1a818970c3 Add inspection to replace Java Map.forEach with Kotlin's forEach
#KT-17278 Fixed
2019-03-01 16:15:23 +03:00
Nicolay Mitropolsky 9c674cb7c3 Uast: support for KtDelegatedSuperTypeEntry (KT-30033) 2019-03-01 15:00:31 +03:00
Dmitriy Novozhilov 2f5843f764 Move detecting of illegal call of contract function into call checker
(#KT-26153, #KT-26191) fixed
2019-03-01 14:50:46 +03:00
Dmitriy Novozhilov 54e5cce9be Prohibit declaring multiple callsInPlace contract on same lambda.
#KT-26150 fixed
2019-03-01 14:50:46 +03:00
Dmitriy Novozhilov 4a7420d77d Allow declaring contracts on suspend functions. KT-27468 Fixed 2019-03-01 14:50:46 +03:00
Dmitriy Novozhilov 84da8b6279 Report CONTRACT_NOT_ALLOWED diagnostic on extension property getter/setter
KT-27090
2019-03-01 14:50:46 +03:00
Dmitriy Novozhilov b484e03fa8 Allow use contract function by FQN. #KT-29772 fixed 2019-03-01 14:50:46 +03:00
Dmitriy Novozhilov 7072b9d179 Fix order of fixing type variables for callable references. KT-25433 Fixed 2019-03-01 14:50:33 +03:00
Andrey Uskov 735f86a50e Fix creation of KotlinSDK. GradleFacetImportTest fixed 2019-03-01 13:12:43 +03:00
Andrey Uskov 325ed8eb32 Change class hierarchy of KotlinSourceRootType. Deadlock during concurrent classloading fixed
#KT-30137 Fixed
2019-03-01 13:12:16 +03:00
Toshiaki Kameyama 87dc1a035b Convert property initializer to getter: suggest on property name
#KT-29344 Fixed
2019-03-01 11:37:42 +03:00
Toshiaki Kameyama 20aa8ebdb0 Add "Throwable not thrown" Inspection
#KT-11629 Fixed
2019-03-01 11:35:12 +03:00
Toshiaki Kameyama e0aeb8f7ec Remove redundant let: rename invoke call
#KT-29556 Fixed
2019-03-01 11:31:07 +03:00
Toshiaki Kameyama df3953f03a Redundant Unit: fix false positive when return type is nullable Unit
#KT-30038 Fixed
2019-03-01 11:12:25 +03:00
Toshiaki Kameyama d67c793a9b map.get() with not-null assertion: add quick-fixes
#KT-30010 Fixed
2019-03-01 11:11:05 +03:00
Mikhail Glukhikh 84a3239cdf FIR: extract "toTypeProjection" 2019-03-01 10:36:19 +03:00
Mikhail Glukhikh f8497bc339 FIR: extract "constructType" from type resolver 2019-03-01 10:36:19 +03:00
Mikhail Glukhikh 1cefcc1438 Add "firCompilerTest" configuration & include it into compiler tests 2019-03-01 10:36:19 +03:00
Natalia Selezneva bc1e836f01 Fix saving Kotlin Scripting Setting to xml
^KT-30146 Fixed
2019-03-01 09:42:43 +03:00
Ilya Gorbunov 640699e076 Do not expose internal copyOfUninitializedElements and copyOfNulls 2019-02-28 23:44:00 +03:00
Ilya Gorbunov 2e9497f8f8 Rewrite copyOfUninitializedElements with templates without using copyRangeTo 2019-02-28 22:57:45 +03:00