Commit Graph

50699 Commits

Author SHA1 Message Date
Cuihtlauac ALVARADO 094dc2ae45 Remove useless parameter
Private function convertToOverloadResults() has two call sites, both:

* inside member functions of the NewResolutionOldInference class
* passing NewResolutionOldInference.languageVersionSettings

Therefore, it is safe to remove this parameter from the signature of
convertToOverloadResults(). The occurence of languageVerstionSetting
in it's return statement will refer (implicitly) to the definition from
its class.
2018-12-04 19:07:27 +03:00
Cuihtlauac ALVARADO ece745966b Remove CandidateWithBoundDispatchReceiverImpl
Interface CandidateWithBoundDispatchReceiver had a unique
implementation, which was private.

Turned interface CandidateWithBoundDispatchReceiver into a
class. Removed CandidateWithBoundDispatchReceiverImpl. Removed
string "Impl" suffix at constructor call sites.
2018-12-04 19:01:48 +03:00
Vyacheslav Gerasimov 2791a679aa Minor: add TaskAction & Option to Unused symbol inspection exclusions 2018-12-04 15:38:56 +03:00
Vyacheslav Gerasimov 17a60e3fd3 Build: use UtilityJavaExec task for compileJs and generateVisitors 2018-12-04 15:38:56 +03:00
Vyacheslav Gerasimov da46164896 Build: use UtilityJavaExec task to serialize builtins 2018-12-04 15:38:56 +03:00
Vyacheslav Gerasimov 35c2de08b0 Build: Add UtilityJavaExec task needed to avoid JavaExec tasks
This task does the same as original JavaExec task
We avoid using JavaExec tasks due to IDEA-200192: IDEA makes all JavaExec tasks not up-to-date and attaches debugger making our breakpoints trigger during irrelevant task execution.
2018-12-04 15:38:56 +03:00
Vyacheslav Gerasimov 99c149bb8b Build: Update url for android build tools 2018-12-04 15:38:56 +03:00
Vyacheslav Gerasimov a112bebf78 Build: Configure cache-redirector in allprojects block 2018-12-04 15:38:56 +03:00
Vyacheslav Gerasimov 3ee8cae48d Build: Update cache redirector url list 2018-12-04 15:38:56 +03:00
Simon Ogorodnik 2556d64459 Provide findModuleDescriptor for ResolutionFacadeWithDebugInfo
Fixes Move refactoring tests
Broken after introduction of ResolutionFacadeWithDebugInfo
2018-12-04 15:13:40 +03:00
Dmitry Zhuravlev ab259c2d6f Consider Kobalt libraries as external for Kotlin 2018-12-04 13:51:23 +03:00
Toshiaki Kameyama 7bf51f1533 Expand selection for class members #KT-28289 Fixed 2018-12-04 11:17:27 +03:00
Ilya Gorbunov 736818dfa7 Use Before/AfterMethod from TestNG as kotlin.test.Before/AfterTest
According to their documentation they should be invoked before and after
each test method runs.

#KT-27629 Fixed
2018-12-03 21:46:26 +03:00
Ilya Gorbunov 48c80e247e Move kotlin.test common annotations tests
Place them in tests of kotlin-test-annotations-common, so that every
platform module that implements that common module (e.g. kotlin-test-junit,
kotlin-test-junit5, kotlin-test-testng) gets these tests run.

Improve test for BeforeTest/AfterTest annotations to check that they are
invoked before/after _each_ test method.

#KT-27629
2018-12-03 21:46:26 +03:00
Ilmir Usmanov 4a828f839f Support recursive local suspend functions
Previously they were trying to call constructor (incorrectly) for
recursive calls. This is redundant, since this.invoke creates one
automatically.

In addition, support callable references to recursive local suspend
functions.

 #KT-24780 Fixed
2018-12-03 18:49:23 +03:00
Svyatoslav Kuzmich 8359887696 [JS IR BE] Fix inline classes workarounds
- Remove uninitialized return type check
- Remove unbound classifier symbol check
2018-12-03 13:07:41 +03:00
Mikhail Glukhikh 7cbc8e8b76 Introduce "Redundant else in if" inspection #KT-19668 Fixed 2018-12-03 09:39:22 +03:00
Mikhail Glukhikh ca87e53f04 Introduce DeferredIsResultInspection #KT-25620 Fixed 2018-12-01 11:07:02 +03:00
Georgy Bronnikov f4aad70b36 Fix KotlinFrameworkSupportProviderTest 2018-11-30 18:00:27 +03:00
Corey ae7cc8a133 Consider non-existent AttributeContainers empty
Given the prior faulty logic, no tree of `HierarchyAttributeContainer`s would ever report itself as empty (not even a 'tree' consisting of a single, attribute-less/empty HierarchyAttributeContainer), since every tree will have a root, which will lack a parent, and it considered the lack of existence of a parent to mean that that root container is not empty.
2018-11-30 16:21:33 +03:00
Sergey Igushkin 8cec50e6e2 Reorder MPP plugin logic to fix eager publishing configuration
In Gradle 5.0, the `publishing` extension is configured eagerly, so
we need to make sure everything we use in publishing setup is already
available at the point when it's triggered:

* the `metadata` target
* the source JARs

Issue #KT-28520 Fixed
2018-11-30 15:34:58 +03:00
Sergey Igushkin 0f670f806f Fix Android Extensions early dependency resolution
Make compiler plugin options evaluate lazily, with Lazy<String> and
FileCollection as replacements for the eagerly-evaluated data.

Adjust compiler plugin option usages so that their evaluation is not
triggered when not necessary.

Issue #KT-26065 Fixed
2018-11-30 15:34:21 +03:00
Alexey Tsvetkov 201c16ecb0 Reformat incremental-compilation-impl tests 2018-11-30 15:26:34 +03:00
Alexey Tsvetkov db0d549f02 Minor: remove usage of Intellij hashmap 2018-11-30 15:26:34 +03:00
Mikhail Glukhikh a7ad1113b2 Redundant async: do not suggest for calls with 'start'
The reason with 'withContext' does not have such parameter anymore
2018-11-30 15:14:27 +03:00
Mikhail Glukhikh 3d15cbcced Redundant async inspection: run "optimize imports" after quick-fix 2018-11-30 15:14:27 +03:00
Mikhail Glukhikh fd3c6496fb Redundant async inspection: support case with explicit scope
#KT-28504 Fixed
2018-11-30 15:14:27 +03:00
Mikhail Glukhikh 9f5255da02 SimplifyCallChainFix: take Conversion instead of raw text, polish a bit 2018-11-30 15:14:27 +03:00
Mikhail Glukhikh b6630699aa SimplifyCallChainFix: implement 'modifyArguments' as lambda 2018-11-30 15:14:26 +03:00
Mikhail Glukhikh 5947ca1142 Redundant async cleanup: use CAPS for constant names 2018-11-30 15:14:26 +03:00
Mikhail Glukhikh e6a1b96c53 Redundant async inspection: support case with GlobalScope
Partial implementation of KT-28504
2018-11-30 15:14:26 +03:00
Mikhail Glukhikh 138e36aa66 Simplify call chain fix: extract 'apply' 2018-11-30 15:14:26 +03:00
Mikhail Glukhikh c4717d17d9 Redundant async: extract generateConversion, integrate arguments inside 2018-11-30 15:14:26 +03:00
Mikhail Glukhikh d909162a89 Rename "Result is Result" inspection to "Direct use of result type" 2018-11-30 15:14:26 +03:00
Sergey Rostov 5237079c5d Move resources: fix copy-resources kotlin compiler maven plugins 2018-11-30 15:01:02 +03:00
Sergey Rostov 2fac72cd99 Move resources: remove build code that not required anymore 2018-11-30 15:01:02 +03:00
Sergey Rostov d3dc1d8164 Move resources: update writePluginVersion 2018-11-30 15:01:02 +03:00
Sergey Rostov 487c57e2e0 Move resources, kotlin-reflect.jar: remove manually included META-INF/services/*
Now it already included. Manually including causes duplicated contents
in resulting files, for example:

1	   kotlin.reflect.jvm.internal.impl.load.java.FieldOverridabilityCondition
2	   kotlin.reflect.jvm.internal.impl.load.java.ErasedOverridabilityCondition
3	   kotlin.reflect.jvm.internal.impl.load.java.JavaIncompatibilityRulesOverridabilityCondition
4	+  kotlin.reflect.jvm.internal.impl.load.java.FieldOverridabilityCondition
5	+  kotlin.reflect.jvm.internal.impl.load.java.ErasedOverridabilityCondition
6	+  kotlin.reflect.jvm.internal.impl.load.java.JavaIncompatibilityRulesOverridabilityCondition

Removing this line fixes that.
2018-11-30 15:01:02 +03:00
Sergey Rostov 74f6c8ac5c Move resources: remove includes from src to resources, include resource folder in custom build scripts 2018-11-30 15:01:02 +03:00
Sergey Rostov 5623c74543 Move resources: fix pill 2018-11-30 15:01:02 +03:00
Sergey Rostov df2e4524d7 Move resources from /src to separate /resources directory.
Previously this files was stored in /src directory and was included in
resources mainly by SourceSet.projectDefault from sourceSets.kt:

val processResources = tasks.getByName(processResourcesTaskName) as ProcessResources
processResources.from("resources") { include("**") }
processResources.from("src") { include("META-INF/**", "**/*.properties") }

Also there are some custom rules like this:

resources.srcDir("../idea-analysis/src").apply { include("**/*.properties") }
resources.srcDirs("idea-repl/src").apply { include("META-INF/**") }

All this rules are synthesized in script
https://github.com/snrostov/kotlin-migrate-resources/blob/master/src/main/kotlin/main.kt

This commit created using that script. See README.md for more details on
 script.
2018-11-30 15:01:01 +03:00
Ilya Matveev 093b9d174d Update Kotlin/Native: 1.0.3 2018-11-30 18:58:01 +07:00
Alexander Podkhalyuzin c416b192ef Cleanup, all bunches are completely the same... 2018-11-30 14:30:43 +03:00
Denis Zharkov 2182be82e6 Fix message text for INCOMPATIBLE_ENUM_COMPARISON
^KT-28516 Fixed
2018-11-30 10:34:00 +03:00
Ilya Gorbunov a534bfc32f Move index overflow tests to another test source set
To avoid reporting them as ignored and to make it more easy to run them
when needed.
2018-11-30 07:27:07 +03:00
Roman Artemev c5922bf74b Refact stdlib generator, add support for different backends
[JS IR BE] Runtime fixes
 * Do not generate external declarations for IR BE
 * Move `arrayToString` helper function out of shared JS stdlib
 * Fix arrays type check for IR BE
2018-11-29 22:04:53 +03:00
Mikhail Glukhikh 05b1a99022 Fix "redundant async" for coroutines 1.*, forbid explicit scopes case
Related to KT-28504
#KT-28445 Fixed
2018-11-29 21:17:57 +03:00
Mikhail Glukhikh 93fff99d8d Extract stub library file from "Result is Result" inspection tests 2018-11-29 21:17:33 +03:00
Mikhail Glukhikh 6b60d49e09 Extract stub library file from "Redundant async" inspection tests 2018-11-29 21:17:16 +03:00
Mikhail Glukhikh 4e1d8fcfd0 Allow to convert nullable local / top to late-init since version 1.2
Enhancement for KT-12743
2018-11-29 19:58:11 +03:00