Commit Graph

47439 Commits

Author SHA1 Message Date
Nikolay Krasko c210d3d10a Minor: remove duplicated copyright comment 2018-07-25 19:52:26 +03:00
Nikolay Krasko 4ff6f23d18 Refactoring: move getResolvedVersionByModuleData utility function 2018-07-25 19:52:26 +03:00
Nikolay Krasko 2d1fc4b798 Fix incompatibility because of KotlinGradleModelFacade change (KT-25713)
AndroidGradleModelFacade was moved to android plugin in AS 3.3, so
now changes in KotlinGradleModelFacade should be binary compatible.

Current fix rewrite KotlinGradleModelFacade to Java because of default
methods.

Also current implementation abuses the fact that AndroidGradleModelFacade
don't use groupId parameter for getting library versions.

 #KT-25713 Fixed
2018-07-25 19:52:25 +03:00
Nikolay Krasko fb6bb0c8b7 Need to check compatibility when checking plugin from custom repository (KT-25714)
There's no no range check is done on the server side for custom urls not
from IntelliJ plugins repository.

 #KT-25714 Fixed
2018-07-25 19:52:25 +03:00
Toshiaki Kameyama 4d1b8405cb "Suspicious ==/===": do not report when comparison with null is included
So #KT-24001 Fixed
2018-07-25 16:15:59 +03:00
Toshiaki Kameyama d15e43f38a Reformat SuspiciousEqualsCombination 2018-07-25 16:15:20 +03:00
Ilmir Usmanov dc3b230b55 Do not generate continuation's setLabel and getLabel methods in 1.3
Also, do not call them.
 #KT-25521: Fixed
2018-07-25 15:35:18 +03:00
Ilmir Usmanov a10bd9f5a3 Refactoring. Move transformRuntimeFunctionTypeToSuspendFunction to TypeDeserializer 2018-07-25 15:35:13 +03:00
Ilmir Usmanov 533dd44668 Refactoring. Make DeserializedMemberDescriptor somewhat immutable 2018-07-25 15:35:09 +03:00
Natalia Selezneva 0750de73e1 Distinguish exceptions about unknown module info 2018-07-25 15:30:49 +03:00
Zalim Bashorov 9b1915799c [psi2ir] Skip synthetic descriptors created for calls on something with dynamic type when collecting unbound symbols
#KT-23382 Fixed
2018-07-25 14:51:08 +03:00
Zalim Bashorov a6cd552a71 [JS IR BE] Implement Long.rangeTo and unmute tests 2018-07-25 14:51:08 +03:00
Sergey Rostov adcabd2a5a Kotlin Scripting IDE performance: cache file attributes in memory.
This saves ~2 secs on file highlighting pass.
2018-07-25 14:42:35 +03:00
Roman Artemev eb420a1e0f Fix [#KT-23921]
* make name collector in inliner process handle JsCatch
 * visit JsParameter during live analyser in coroutine transformer
2018-07-25 14:22:11 +03:00
Alexander Udalov 31c968123c Regenerate tests 2018-07-25 11:30:57 +02:00
Toshiaki Kameyama 9e83506c02 Introduce intention: trimMargin <--> trimIndent #KT-25056 Fixed 2018-07-25 12:30:00 +03:00
Dmitry Petrov df6d4f358a KT-22274 report warning on labels that can't be referenced
Labels are meaningful only if they can be referenced by 'break',
'continue', or 'return' expressions.
2018-07-25 12:08:20 +03:00
Dmitry Petrov 6fb913a463 KT-22274 report error/warning on incorrect return target label 2018-07-25 12:08:20 +03:00
Roman Artemev 5241b37ad9 Fix fallthrough in suspendable switch [#KT-22694, #KT-23687]
* do not explicitly put break for each case
* add test for related cases
2018-07-24 20:19:35 +03:00
Roman Artemev 0c6256d003 Fix initialization order
* put inheritance code in the beginning
 * put top-level initializer after any declaration
2018-07-24 20:16:39 +03:00
Mikhail Zarechenskiy cff066f702 Use consistent descriptors as keys
This commit fixes exception during IR generation with enabled new inferece,
 but the problem also can affect old inference.

 We were using originalTypeArguments (`resolvedCall.typeArguments`)
 that uses type parameters from *candidate* descriptor and were trying
 to get value by key from `resolvedCall.resultingDescriptor.original`,
 assuming that resolvedCall.resultingDescriptor.original equals to
 resolvedCall.candidateDescriptor, which can be wrong
2018-07-24 20:14:19 +03:00
Mikhail Zarechenskiy f9b19c6286 [NI] Approximate types during type translation for IR 2018-07-24 20:14:17 +03:00
Mikhail Zarechenskiy dddaa74dac Propagate language version settings into IR type translator 2018-07-24 20:06:35 +03:00
Nikolay Krasko 165218890f Fix max value components for KotlinVersion 2018-07-24 19:13:54 +03:00
Nikolay Krasko fb2a42126d Minor: fix typo in suppression property name 2018-07-24 17:09:15 +03:00
Nikolay Krasko 1418d1f9e5 Refactoring: abandon custom MajorVersion class, use KotlinVersion 2018-07-24 17:09:15 +03:00
Nikolay Krasko 7b6df0a7cc Don't delete unresolved imports in cleanup inspection (KT-25678)
It looks like they were deleted because of the bug in search for deprecated
imports search.

 #KT-25678 Fixed
2018-07-24 17:09:14 +03:00
Alexander Udalov 20ddbc9698 Do not generate generic signature for SAM wrapper methods
#KT-23870 Fixed
2018-07-24 13:35:47 +02:00
Denis Zharkov ac6874c221 Hide deprecated overload LanguageSettingsProvider::getLanguageVersionSettings
It's necessary only for binary compatibility
After recompilation it's expected to be resolved to an overload
with default parameter
2018-07-24 14:09:54 +03:00
Dmitry Petrov 9dc2ad664d Fix ConstantValue-related testData for lightClasses tests
TODO support custom language version settings for lightClasses tests
2018-07-24 10:52:16 +03:00
Dmitry Petrov 8f103dd8e5 Fix ConstantValue-related testData for loadJava tests 2018-07-24 10:52:16 +03:00
Mikhail Glukhikh cc1d9e88d5 1.3 migration: make inspections working for non-experimental coroutines 2018-07-24 10:24:18 +03:00
Alexey Tsvetkov 76b9b579bc Minor: fix 172 patchset 2018-07-23 23:10:14 +03:00
Ilmir Usmanov fa9653c3d2 Deserialize experimental coroutines as suspend functions/types
but deprecate them for now.
Promote stub version.
 #KT-25623: Fixed
2018-07-23 21:52:17 +03:00
Toshiaki Kameyama 88a5eb24d5 "Convert lambda to reference": fix case with companion object
So #KT-24385 Fixed
2018-07-23 18:21:38 +03:00
Toshiaki Kameyama 0ae2054af4 "Replace if with when": do not add empty else block #KT-18681 Fixed 2018-07-23 18:21:37 +03:00
Toshiaki Kameyama 3e207fd6b2 Move lambda out: don't apply to multiple/default functional parameters
So #KT-24694 Fixed
2018-07-23 18:21:37 +03:00
Toshiaki Kameyama a9c91099a4 Correct "Redundant override" inspection message #KT-25608 Fixed 2018-07-23 18:21:37 +03:00
Anton Bannykh 0f087e354e JS IR: sort input files to make compilation stable 2018-07-23 18:20:05 +03:00
Dmitry Petrov 65fe1101fd Object references in object field initializers are 'GET_VAR this@Object' 2018-07-23 18:16:32 +03:00
Simon Ogorodnik c3d20ae138 Fix quick-doc tests generation 2018-07-23 16:18:07 +03:00
Dmitry Petrov d61a3c158e Fix ProjectImpl leak in PatternMatchingTypingVisitor 2018-07-23 16:05:47 +03:00
Alexey Tsvetkov ff35d509e6 Add test for KT-25540 2018-07-23 15:43:17 +03:00
Alexey Tsvetkov 11977cc1c1 Add multi-module JS IC tests with JPS 2018-07-23 15:43:17 +03:00
Alexey Tsvetkov 3227300f18 Minor: rename setIsEnabled->setIsEnabledForJvm 2018-07-23 15:43:17 +03:00
Alexey Tsvetkov 8f002fdb43 JS IC: track lookups from libraries
Otherwise we don't track lookups from other modules

    #KT-25540 fixed
2018-07-23 15:43:17 +03:00
Alexey Tsvetkov c8c0c773fb Report info message when JS IC is enabled in JPS 2018-07-23 15:43:17 +03:00
Alexey Tsvetkov eef40a5940 Add setting to enable JS IC for JPS
#KT-25565 fixed
2018-07-23 15:43:17 +03:00
Alexey Tsvetkov 0b18380770 Use separate system properties to control IC for JVM and JS
Also this commit effectively disables JS IC by default

     #KT-25563 fixed
2018-07-23 15:43:16 +03:00
Svyatoslav Kuzmich 625983b28a [JS IR BE] Enum class lowering 2018-07-23 15:08:18 +03:00