Commit Graph

47450 Commits

Author SHA1 Message Date
Mikhail Glukhikh 437b6f2c2d Keep Expected functions state while searching for a regular function
So #KT-25492 Fixed
2018-07-26 18:01:34 +03:00
Mikhail Glukhikh 14d6560e67 Add modality/visibility/inline to all expect/actual declarations in QF
So #KT-25539 Fixed
2018-07-26 18:01:01 +03:00
Mikhail Glukhikh 54b63ea43a Reformat: AddModifierFix 2018-07-26 18:00:58 +03:00
Mikhail Glukhikh 48017a81ee Move isEquivalentTo() from KtClass to KtClassOrObject
This makes objects and companions with the same qualified name
compatible from find usages point of view
So #KT-25326 Fixed
So #KT-25438 Fixed
2018-07-26 18:00:26 +03:00
Mikhail Glukhikh a7d189cd1c Branch 173: delete unnecessary duplicate of KtClassOrObject 2018-07-26 18:00:22 +03:00
Mikhail Glukhikh 46cc773953 Test refactoring: header/impl -> expect/actual in safe delete tests 2018-07-26 18:00:21 +03:00
Mikhail Glukhikh 26b57c6250 MPP navigation / search: handle expect objects correctly #KT-25317 Fixed 2018-07-26 18:00:18 +03:00
Ilmir Usmanov 82f64b9b14 Generate LVT entry for continuation
#KT-25688: Fixed
2018-07-26 16:12:54 +03:00
Roman Artemev dec307799a Fix infinite loop in suspend function in case of return from finally [#KT-21961]
* add test
2018-07-25 23:04:57 +03:00
Ilya Gorbunov a81c06049a Fix creatures web-demo example
Rewrite val reassignment in getter with lazy property
2018-07-25 20:25:36 +03:00
Ilya Gorbunov 293e5794f0 Allow to skip JS IR tests with gradle property kotlin.compiler.js.ir.tests.skip 2018-07-25 20:25:15 +03:00
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