Compare commits

...

7512 Commits

Author SHA1 Message Date
Dmitriy Dolovov
6405270ad5 fix an issue with "lost" dependencies in project model when more than one KLIB is included into project's library 2018-08-17 15:30:45 +03:00
Dmitriy Dolovov
00ff4cedd0 safe creation of KonanBuiltIns when project model is broken or KLIBs are absent at the expected place 2018-08-17 14:50:18 +03:00
Dmitriy Dolovov
f16fefe8fa refactor KotlinWorkaroundUtil (Java -> Kotlin, drop unused methods, clean-up code) 2018-08-17 14:49:30 +03:00
Ilya Matveev
410f517ca2 Don't create compilation tasks for unsupported native targets 2018-08-17 16:35:15 +07:00
Dmitriy Dolovov
62b6d397ee Revert "read KLIB contents w/o IDEA file size limits (this does not fix the issue globally, but it does so for interop KLIBs)". This reverts commit d814895c47
Reason: The change applied in d814895c47 has no effect. The real fix for KT-24259 has been provided in commit dff8fde58d
2018-08-17 10:44:21 +03:00
Dmitriy Dolovov
dff8fde58d #KT-24259 Fixed 2018-08-16 16:05:38 +03:00
Ilya Matveev
14ff34b867 Use camel case in Kotlin/Native preset names 2018-08-16 19:29:02 +07:00
Ilya Matveev
3ac97ba810 Rename kotlin-native-utils -> konan-utils 2018-08-16 19:29:01 +07:00
Dmitriy Dolovov
84eada5a1b avoid exception when some KLIB that is expected on the file system accidentally disappears 2018-08-15 14:56:09 +03:00
Dmitriy Dolovov
260dab2c16 fix merge conflicts 2018-08-15 11:54:21 +03:00
Dmitriy Dolovov
d814895c47 read KLIB contents w/o IDEA file size limits (this does not fix the issue globally, but it does so for interop KLIBs) 2018-08-15 11:48:49 +03:00
Ilya Matveev
cab60784e3 Fix dependency on kotlin-native-utils in the Gradle plugin 2018-08-15 15:24:37 +07:00
Ilya Matveev
2975e6de7d Move native code into a separate project kotlin-native-utils 2018-08-15 15:24:36 +07:00
Ilya Matveev
dbf8482ec0 Support source set dependencies in native 2018-08-15 15:24:35 +07:00
Ilya Matveev
abf3efd08f Download KN compiler using Gradle's mechanisms 2018-08-15 15:24:34 +07:00
Ilya Matveev
94510a46ae Move targets from Kotlin/Native repo 2018-08-15 15:24:33 +07:00
Ilya Matveev
0465f61f63 Escape quotes in native command lines on Windows 2018-08-15 15:24:32 +07:00
Ilya Matveev
f58cb8a80c Mark code copied from Kotlin Native repo 2018-08-15 15:24:31 +07:00
Ilya Matveev
d01db12050 Basic support for Kotlin/Native
* Target presets
 * Compilation into a klib
 * Compilation into native binraies: framework and executable
 * Basic dependencies between projects
 * No jars in native publications
 * Replace '-' with '_' in framework names
2018-08-15 15:24:30 +07:00
Ilya Matveev
1f1a4dce4a Add dependency on KN shared in gradle-plugin 2018-08-15 15:24:29 +07:00
Dmitriy Dolovov
eccbd7a0b0 more correct initialization of KonanPlatformSupport 2018-08-14 16:29:36 +03:00
Dmitriy Dolovov
ebd861eee6 fix formatting 2018-08-14 16:16:42 +03:00
Dmitriy Dolovov
6514f15d4b more accurate work with klibs 2018-08-14 16:12:54 +03:00
Dmitriy Dolovov
eec7f64052 instruction for joint build 2018-08-14 15:00:21 +03:00
Dmitriy Dolovov
233d73781f instruction for joint build 2018-08-14 14:59:11 +03:00
Dmitriy Dolovov
8ed2bf0033 instruction for joint build 2018-08-14 14:57:46 +03:00
Dmitriy Dolovov
da997969ea [joint build][update] 1.2.70-dev-1218 2018-08-14 11:17:33 +03:00
Dmitry Petrov
b7df36643b Implement additional declaration checks for inline classes
- Implementation by delegation is prohibited
- Delegated properties are prohibited
2018-08-13 08:49:09 +03:00
Dmitry Petrov
0af33462ef Fix code generation for Array<C> element access where C is inline class 2018-08-13 08:49:04 +03:00
Denis Zharkov
8063db5f80 Fix RemoteException that happens in JPS with compiler daemon
Recently, the container for "lookups" has changed to THashSet
And it lead to exception:
java.io.InvalidClassException: gnu.trove.THashSet;
local class incompatible: stream classdesc
serialVersionUID = -8659895033752433145,
local class serialVersionUID = -1699000958968314003

The reasons for different versions of THashSet are unknown
(though likely related to a slightly different classpathes),
but the fix is rather straight-forward

 #KT-26011 Fixed
2018-08-13 10:15:09 +07:00
Vyacheslav Gerasimov
0d2b888bdd Make KotlinFormattingSettingsStatusAction compatible with 183 platform 2018-08-12 13:15:12 +03:00
Sergey Igushkin
456edf3bbd Fix NPE due to classpath delegate change 2018-08-11 23:16:04 +03:00
Sergey Igushkin
5815d6a70c Implement language settings API for Kotlin source sets 2018-08-11 23:16:03 +03:00
Sergey Igushkin
2c04e2b95c Fix: create a compilation's default source set for Android as well 2018-08-11 23:16:03 +03:00
Anton Bannykh
a2f44c3caf JS: Recreate Nashorn script engine occasionally
Otherwise execution slows down significantly.
2018-08-10 22:15:37 +03:00
Vyacheslav Gerasimov
90e0ab022a as33: Set correct intellij-core version for AS 3.3 2018-08-10 20:02:21 +03:00
Alexander Udalov
f663b8f554 Fix kotlin-maven-plugin compilation 2018-08-10 18:34:40 +02:00
Alexander Udalov
76214930da Update generic signatures in codegen test data
The implementation of toString for generic types in Java reflection has
been changed in 8u162 (https://bugs.openjdk.java.net/browse/JDK-8054213)
2018-08-10 18:20:05 +02:00
Nikolay Krasko
9071b5cfa8 Enable reformat for the whole file for the reformat inspection 2018-08-10 18:45:32 +03:00
Nikolay Krasko
563b2f13a3 Better notification logic and explicit code style apply (KT-23400) 2018-08-10 18:45:30 +03:00
Nikolay Krasko
2924bd80d9 Minor: move methods 2018-08-10 18:45:29 +03:00
Nikolay Krasko
5aacd181fa Restore old code style settings action (KT-23400)
Can't use `KotlinCodeStyleSettings` instead `KtCodeStyleSettings`,
because current `KotlinCodeStyleSettings` class is already used in third
party plugin.
2018-08-10 18:45:28 +03:00
Nikolay Krasko
6920e3bd08 Prototype version for code style notifications (KT-23400)
Show information about code style update, when it is actually updated.
2018-08-10 18:45:27 +03:00
Nikolay Krasko
d16b6f9874 Internal action for showing Kotlin code style status (KT-23400)
Need this to monitor different IDE actions results. Commit can be
dropped after transition to new code style settings is finished.
2018-08-10 18:45:26 +03:00
Nikolay Krasko
a1759fe2ab Load kotlin formatter settings with obsolete defaults for restore (KT-23400) 2018-08-10 18:45:24 +03:00
Nikolay Krasko
a22f4232c0 Add information about obsolete code style usage (KT-23400) 2018-08-10 18:45:23 +03:00
Nikolay Krasko
17b88a28a0 Utility for detection if new code style is set by default (KT-23400)
Need this because some code should work differently before and after
applying new Kotlin code style defaults.
2018-08-10 18:45:22 +03:00
Pavel V. Talanov
01f1917d2a Run/test line markers: aggregate results across implementing modules 2018-08-10 17:00:03 +02:00
Mikhail Zarechenskiy
0fff8ebf71 Fix SOE after enabling SAM conversions 2018-08-10 17:24:19 +03:00
Mikhail Zarechenskiy
b1985ee422 Enable SAM conversion for Kotlin functions by default in new inference
KT-25686
2018-08-10 17:24:18 +03:00
Nicolay Mitropolsky
31a5746724 183: implementation of JvmElementActionsFactory.createChangeParametersActions 2018-08-10 15:29:44 +03:00
Nicolay Mitropolsky
45b74e9fdb MockUpdateParameterInfoContext BUNCH comments added 2018-08-10 15:29:44 +03:00
Natalia Selezneva
97f1fc1f54 Rewrite MultiplatformProjectImportingTest to use testData directory 2018-08-10 15:26:12 +03:00
Natalia Selezneva
d20b58ce61 Rewrite GradleConfiguratorTest to use testData directory 2018-08-10 15:26:11 +03:00
Natalia Selezneva
f395f163f8 GradleImportingTestCase: add infrastructure to use files from testData folder 2018-08-10 15:26:10 +03:00
Natalia Selezneva
c17d7e63c8 Convert GradleImportingTestCase to Kotlin 2018-08-10 15:26:09 +03:00
Natalia Selezneva
cf56915f03 Rename .java to .kt 2018-08-10 15:26:09 +03:00
Natalia Selezneva
f104bdfe03 Do not log full file text when code fragment was created with error context of PsiFile 2018-08-10 15:26:08 +03:00
Natalia Selezneva
b7bdb43219 Fix leaked thread for AbstractScriptConfigurationTest 2018-08-10 15:26:07 +03:00
Denis Zharkov
b38a9ee386 Fix test data for postfix templates test
In this tests there are two variants:
- One extracts the lambda
- And another extracts the whole call

For some reason, the order of completion variants has been changed in 182
2018-08-10 18:40:44 +07:00
Dmitry Savvinov
20262b8700 Relax assertion in PsiContractPraserDispatcher.parseContract
See EA-124365 - KNPE: PsiContractParserDispatcher.parseContract

Reason of this is unknown, issue KT-26034 will be investigated
later.
2018-08-10 13:27:32 +03:00
Dmitry Savvinov
57bafcf9e9 Do not lose information about contracts if call uses default value
It is safe to treat DefaultValueArgument as UNKNOWN_COMPUTATION, because
default arguments can't break smartcasts.

Possibly, they can add new ones, but it can be supported later.

^KT-25278 Fixed
2018-08-10 13:19:32 +03:00
Nicolay Mitropolsky
cf62acc6d6 MockUpdateParameterInfoContext compilation fix for 183 2018-08-10 13:15:37 +03:00
Alexander Udalov
587ce56ad6 Use safer way of filtering out files from other modules
Comparing files by paths is too error-prone and it created a problem
here, where paths of File instances on Windows use "\" as a separator,
whereas VirtualFile paths always use "/", resulting in empty source
lists being compiled. This issue was introduced in 1582354077. Instead,
get the instance of the VirtualFile by path, and use its identity for
comparison
2018-08-10 11:33:52 +02:00
Sergey Rostov
59c41e111d K2JSCompilerArguments: sourceMapEmbedSources should be null by default.
When sourceMapEmbedSources are not null and source maps is disabled warning is reported, since it has effect only when source maps are enabled. Also this fixes some JPS JS with warnings count assertions.
2018-08-10 12:23:40 +03:00
Denis Zharkov
3e3841d17e Minor. Rename DelegatingDataFlowInfo -> DataFlowInfoImpl 2018-08-10 15:40:50 +07:00
Denis Zharkov
0eba48ae46 Adjust KotlinExpressionTypeProvider to new DataFlowInfo contracts
Now, trivial info is not being perstisted in the maps of DataFlowInfo

At the same time, we don't record trivial DataFlowInfo instances in binding context:
org.jetbrains.kotlin.resolve.bindingContextUtil.BindingContextUtilsKt#recordDataFlowInfo
Namely, it happens in case when expression is a callee expression of
"variable as function" calls (see
org.jetbrains.kotlin.idea.codeInsight.ExpressionTypeTestGenerated#testKt11601)

At the same time, there's a hack in `org.jetbrains.kotlin.resolve.calls.callUtil.CallUtilKt#getType`
that helps to obtain type itself for these callees from the resolved calls.

So, it will work anyway if we use `noTypeInfo` here, that is kind of
correct since there's no non-trivial info anyway
2018-08-10 15:40:50 +07:00
Denis Zharkov
375f3c0769 Fix type-intersection-related test data
The order of types enumeration has been changed recently:
previously it was collected at first from a child and then from
its parent, but now it's being collected in order of appearance
2018-08-10 15:40:50 +07:00
Denis Zharkov
d024d2e64c Adjust PreliminaryLoopVisitor to new contracts of DataFlowInfo
Previously, there was a contract that if it contains some
non-trivial type info it also has it in `completeNullabilityInfo`.

But after two previous changes it became false
2018-08-10 15:40:50 +07:00
Denis Zharkov
666ca77666 Fix incorrect optimization in ExpressionTypingServices
Previously, it's been working because was almost always
a different instance.

After, the latter change with avoidance of storing trivial
info there, newDataFlowInfo may accidentally become empty
as context.dataFlowInfo.
But we, obviously, should compare it with newContext.dataFlowInfo instead
2018-08-10 15:40:50 +07:00
Denis Zharkov
9297babc20 Avoid putting trivial information into DelegatingDataFlowInfo map 2018-08-10 15:40:50 +07:00
Denis Zharkov
d20e5ce673 Cache hashCode for DataFlowValue in another field
It's necessary because DataFlowValue instances are commonly
used as keys in maps

 #KT-24657 Fixed
2018-08-10 15:40:50 +07:00
Denis Zharkov
e5507108ed Get rid of affectReceiver parameter in DelegatingDataFlow::putNullabilityAndTypeInfo
The only non-default argument was inside "assign" method
And it can be replaced with simple map instantiation
2018-08-10 15:40:50 +07:00
Denis Zharkov
851d760ac1 Minor. Extract common parts from DelegatingDataFlow::equate/disequate 2018-08-10 15:40:50 +07:00
Denis Zharkov
bf1f94c185 Rewrite DelegatingDataFlowInfo using immutable collections from javaslang
It may be useful because data-flow info is mostly the same for
neighbouring expressions and changes between them should be minor.

Thus, it should help to avoid making copies of huge maps and reusing
them instead
2018-08-10 15:40:50 +07:00
Denis Zharkov
f61686fcbf Minor. Convert loop to 'mapTo' call 2018-08-10 15:40:50 +07:00
Denis Zharkov
5bfa409da6 Get rid of DelegatingDataFlowInfo::parent property
It's been used to bring immutability to DelegatingDataFlowInfo
But in case of statements sequence like:
x = 1
...
x = 1

it would lead to huge DelegatingDataFlowInfo where each of
getCollectedNullability call works for O(n) where n is amount
of assignments

The solution is to get rid of reference to parent and to update
relevant maps properly

In next commits immutable maps will be used instead of making copies each
time
2018-08-10 15:40:50 +07:00
Dmitry Petrov
4f6aa50417 Fix == for inline classes with boxes
TODO generalize code generating object vs primitive equality

 #KT-25914 Fixed
 #KT-25981 Fixed
 #KT-25983 Fixed
2018-08-10 10:34:57 +03:00
Alexander Udalov
cd12772bc5 Remove unneeded bunch files related to PsiJavaModule
PSI for modules and related classes are already available in AS3.1
2018-08-10 00:10:37 +02:00
Roman Artemev
6c8e30eb05 Fix test failures
* add metadata
 * unmute working tests
 * mute temporary broken ones
2018-08-09 20:55:50 +03:00
Dmitry Savvinov
447c127036 Fix unsound smartcast from loop condition on assigned vars
^KT-22379 Fixed
2018-08-09 19:56:23 +03:00
Mikhael Bogdanov
a7d706f693 Unmute jvm ir-tests 2018-08-09 16:30:32 +03:00
Mikhael Bogdanov
3c5a146c1f Support captured parameters in callable references 2018-08-09 16:30:28 +03:00
Zalim Bashorov
3c765e3625 [JS BE] Support val in when subject
#KT-25014 Fixed
2018-08-09 16:22:25 +03:00
Zalim Bashorov
289ff845c4 Minor: remove extra slash from a testdata file 2018-08-09 16:22:25 +03:00
Leonid Startsev
c9cb5a975c Support for multiple origins in irEquals builder
to preserve correct origin when it's called from irNotEquals
2018-08-09 16:16:10 +03:00
Leonid Startsev
28319a76df Access to ir and external symbol table 2018-08-09 16:16:10 +03:00
Leonid Startsev
87da6e2226 Add ir generation plugins to JS and JVM BE 2018-08-09 16:16:10 +03:00
Leonid Startsev
5d669ff671 Additional helpers in IR builders 2018-08-09 16:16:10 +03:00
Leonid Startsev
ba9b7547b0 Generate IR for synthetic nested classes directly in class generator 2018-08-09 16:16:09 +03:00
Leonid Startsev
c3f66cda65 Lowering extension point 2018-08-09 16:16:09 +03:00
Denis Vnukov
65c79ecfe9 Primitive support for LocalVariables for function parameters 2018-08-09 16:13:21 +03:00
Denis Vnukov
1a56af9bb0 Adding missing SourceFile attribute to classes generated with IR 2018-08-09 16:13:17 +03:00
Simon Ogorodnik
fca82c8e28 Cleanup dependencies of module :compiler:backend, :plugins:import-dumper 2018-08-09 16:04:31 +03:00
Toshiaki Kameyama
f2fec6b078 Fix messages #KT-25177 2018-08-09 15:24:20 +03:00
Toshiaki Kameyama
605736b6ba Introduce "redundant asDynamic" inspection #KT-25177 Fixed 2018-08-09 15:24:20 +03:00
Anton Bannykh
2c4e21ca36 JS box tests via Mocha: respect the ignoreTestFailures flag 2018-08-09 15:00:54 +03:00
Mikhael Bogdanov
bbc5fa4705 Perform InnerClassLowerings after CallableReferenceLowering 2018-08-09 14:22:51 +03:00
Mikhael Bogdanov
357359b1dd Unmute ir-tests after CR support 2018-08-09 14:22:50 +03:00
Mikhael Bogdanov
6b5b9fbde4 Temporary use special container mapping logic for IR backend 2018-08-09 14:22:47 +03:00
Mikhael Bogdanov
813e1ffa39 Initial support of function callable references 2018-08-09 14:22:46 +03:00
Mikhael Bogdanov
06b16a6459 Unmute ir-tests after prev commit 2018-08-09 14:22:46 +03:00
Mikhael Bogdanov
da34299064 Temporary set public constructor visibility for lowered local declarations
Allow to support callable reference in next commits
2018-08-09 14:22:45 +03:00
Alexey Sedunov
fdc15b053d Minor: Remove unnecessary checks in new test 2018-08-09 13:36:57 +03:00
Mikhail Glukhikh
87d81a75f3 Fix secondary constructor deletion in "sealed class -> object" 2018-08-09 13:33:03 +03:00
Mikhail Glukhikh
0fb8dd2f75 Handle constructor usage for actual class as usage of expect class
#KT-25498 Fixed
2018-08-09 13:00:47 +03:00
Mikhail Glukhikh
f4d048334f Fix test for "Remove abstract function body"
Formatting rules (probably) was slightly changed in 182 branch,
so I have to introduce bunch file for 181/173/AS here
2018-08-09 13:00:34 +03:00
Mikhail Glukhikh
87b5fca094 Fix test for "Suppress unused if annotated"
Quick-fix test was changed in 182 branch,
so I have to introduce bunch files for 181/173/AS here
2018-08-09 13:00:00 +03:00
Mikhail Glukhikh
db787c78d6 Implement members: don't add 'actual' modifier for fake overrides
#KT-25044 Fixed
2018-08-09 12:59:58 +03:00
Mikhail Glukhikh
ed5791ed9e Introduce "remove actual" fix for ACTUAL_WITHOUT_EXPECT
Related to KT-25044
2018-08-09 12:59:57 +03:00
Mikhail Glukhikh
a91442cd3b Enable "add () fix" for expect base class without constructors
Related to KT-24597
2018-08-09 12:59:55 +03:00
Mikhail Glukhikh
79abf90916 Introduce "add default constructor for expect class" fix
Related to KT-24597
2018-08-09 12:59:54 +03:00
Nikolay Krasko
3dd99ce4cb Register gradle extension to run GradleWrongPluginVersion inspection
Gradle plugin isn't fully registered in tests in 182.
2018-08-09 12:25:50 +03:00
Nikolay Krasko
71bdda0980 Do not use Kotlin in Java files in find usages tests 2018-08-09 12:25:50 +03:00
Nikolay Krasko
fce21d1082 Make GradleClassFinder optional in tests for known class finder
Since 182 Gradle plugin is not fully loaded in tests and GradleClassFinder
is absent in the list.
2018-08-09 12:25:50 +03:00
Alexey Sedunov
465e11c473 Minor: Add missing import for 173 bunch 2018-08-09 12:08:40 +03:00
Alexey Sedunov
1b15ce3ddc Move: Fix top-level declaration detection for scripts
#KT-25858 Fixed
2018-08-09 10:06:31 +03:00
Alexey Sedunov
1797a50fc9 Move: Fix "whole file" mode detection for scripts
#KT-25857 Fixed
2018-08-09 10:06:31 +03:00
Alexey Sedunov
40a5bf0355 Gradle: Support Gradle test runner for TestNG tests
#KT-22732 Fixed
2018-08-09 10:06:31 +03:00
Alexey Sedunov
73bdbbc697 Configuration: Do not show -Xfriend-paths in additional arguments
#KT-25945 Fixed
2018-08-09 10:06:31 +03:00
Alexey Sedunov
cd61633b5d Configuration: Support external storage for imported facets
#KT-25913 Fixed
2018-08-09 10:06:30 +03:00
Alexey Sedunov
abbac067b8 Configuration: Collapse empty nullable strings to null 2018-08-09 10:06:30 +03:00
Alexey Sedunov
db556d6551 Configuration: Clean library version before adding it as dependency
#KT-25633 Fixed
2018-08-09 10:06:30 +03:00
Alexey Sedunov
a8f8ecc012 Configuration: Invalidate caches when changing compiler options
#KT-25515 Fixed
2018-08-09 10:06:30 +03:00
Alexey Sedunov
a54f410a15 Configuration: Use specific language/API version only for new projects
#KT-25640 Fixed
2018-08-09 10:06:30 +03:00
Mikhail Zarechenskiy
70aa16f71a Fix hashCode & equals for IntegerValueTypeConstant 2018-08-09 09:49:21 +03:00
Mikhail Zarechenskiy
1a511166cc Discriminate unsigned types in overload resolution
#KT-24717 Fixed
 Relates to #KT-25996 and #KT-25997
2018-08-09 09:49:17 +03:00
Mikhail Zarechenskiy
be38263fc7 Introduce conversions from signed pure constants to unsigned ones
#KT-24717 In Progress
 #KT-25996 Open
 #KT-25997 Open
2018-08-09 09:47:48 +03:00
Ilya Gorbunov
7c996dc218 Improve padStart/padEnd samples 2018-08-09 04:38:22 +03:00
Gen
a90b72ffd8 KT-20357 Add samples for padStart() and padEnd() 2018-08-09 04:38:22 +03:00
Roman Artemev
36a99da820 Break/finally chain in suspend function test fix & workaround 2018-08-08 19:11:17 +03:00
Roman Artemev
efec82c0eb Update test data
* add new tests for coroutines
 * add copy of some tests without dependency on stdlib
2018-08-08 18:33:41 +03:00
Roman Artemev
c62e4b4fcf [JS IR BE] Support coroutines
* Move FinallyBlockLowering to common part
* Fix catching of dynamic exception
* Fix bridges for suspend functions
* Disable explicit cast to Unit
* Run lowering per module
* Update some test data
2018-08-08 18:33:39 +03:00
Vyacheslav Gerasimov
37fadb8ee5 as33: Remove incorrect gradle.xml.as33 2018-08-08 16:26:15 +03:00
Mikhail Zarechenskiy
d3280252f9 Prohibit inline data classes
`CONFLICTING_JVM_DECLARATIONS` diagnostics are reported because we're
 trying to generate functions from `Any` once for inline class and
 once for data class

 #KT-25760 Fixed
2018-08-08 15:47:26 +03:00
Mikhail Zarechenskiy
fa2d159e3f Refactoring: move JVM related diagnostic to ErrorsJvm 2018-08-08 15:47:26 +03:00
Mikhail Zarechenskiy
34cd0e9f6c Do not report warning about useless annotations for JvmStatic properties
#KT-25745 Fixed
2018-08-08 15:47:25 +03:00
Mikhail Zarechenskiy
d9e0af4483 Improve message for warning about useless annotations
#KT-25746 Fixed
2018-08-08 15:47:25 +03:00
Alexey Sedunov
1f59ff1bd4 Minor: Fix test data 2018-08-08 15:32:00 +03:00
Alexey Sedunov
c234b40670 Misc: Update AS3.3 version to 182.4928781 2018-08-08 14:26:30 +03:00
Nicolay Mitropolsky
fcc49f55e3 JavaFrameworkType.findExtension nullability fix 2018-08-08 13:50:54 +03:00
Alexander Udalov
5dadddaecd Fix version-specific bunch files for KotlinTestUtils
After 5da8ce844a
2018-08-08 12:11:58 +02:00
Dmitry Savvinov
a8e1a6a2a1 Add contract for 'synchronized'
^KT-25962 Fixed
2018-08-08 12:53:09 +03:00
Dmitry Savvinov
a81fc9e9bc Add contract to checkNotNull overload without message
^KT-25303 Fixed
2018-08-08 12:50:38 +03:00
Dmitry Savvinov
952f67dafc Fix bogus smartcast on enum entry members
Previously, enum entries were treated by the data-flow subsystem similar
to other class/singletons. As a consequence, calls like
'Enum.ENTRY.property' had IdentifierInfo of 'property'.

However, specially for enum entries, descriptor of 'property' is one and
the same for all entries. It means that from the data-flow point of
view, 'Enum.ONE.property' and 'Enum.TWO.property' are *one and the same
data-flow values*.

It could obviously lead to some bogus smartcasts, so this commit
introduces separate IdentifierInfo.EnumEntry and uses it to build proper
qualified values.

^KT-20772 Fixed
2018-08-08 12:48:56 +03:00
Nicolay Mitropolsky
ce6543b1cb 183: IdeaExtensionPoints.IDEA_COMPATIBLE_BUILD_NUMBER = "183.1" 2018-08-08 12:29:36 +03:00
Dmitry Savvinov
9472ded936 Minor: fix .txt dump
Was missed in commits a71f09022c
and bd9254597d
2018-08-08 12:12:15 +03:00
Dmitry Savvinov
2b8ca60c05 Add SKIP_JAVAC in tests where behaviour has diverged with IDEA resolve
See a71f09022c
2018-08-08 12:12:15 +03:00
Denis Zharkov
e3bdde45de Intern canonical classes and parameters names in BinaryClassSignatureParser
Otherwise, a lot of duplicated strings are generated
2018-08-08 15:17:25 +07:00
Denis Zharkov
782f221ab5 Optimize memory-footprint for ClassifierResolutionContext
Use immutable maps for inner classes/type parameters
in nested contexts instead of making copies for each of them
2018-08-08 15:17:25 +07:00
Denis Zharkov
71a9ba4790 Minor. Move helpers for javaslang to a separate package 2018-08-08 15:17:25 +07:00
Denis Zharkov
3a8335d47f Optimize memory footprint for SlicedMapImpl in case it's empty
It might be useful in case of many delegating traces that
remain effectively empty themselves (up to 7M of empty maps in case of compilation of 'idea' module)
2018-08-08 15:17:25 +07:00
Denis Zharkov
8050869e45 Use THashSet for sets that are assumed to be big
Otherwise, a lot of memory is wasted on nodes instances

(cherry picked from commit 4922f87)
2018-08-08 15:17:25 +07:00
Denis Zharkov
2fd9b3ee35 Do not initialize SimpleFunctionDescriptorImpl::userDataMap if it's empty 2018-08-08 15:17:25 +07:00
Mikhail Glukhikh
e6850bf007 Add "Call chain -> sequence" to 183 plugin 2018-08-08 11:02:58 +03:00
Mikhail Glukhikh
c7e46d4998 Downgrade "Call chain -> sequence" to INFO level 2018-08-08 11:02:56 +03:00
Toshiaki Kameyama
b638e91c2b Call chain --> Sequence: minor improvements
Related to KT-15476
2018-08-08 11:02:55 +03:00
Toshiaki Kameyama
7e28cb1fe3 Call chain --> Sequence: take termination into account
Related to KT-15476
2018-08-08 11:02:47 +03:00
Toshiaki Kameyama
108dea5b46 Introduce "Call chain on collection should be converted into 'Sequence'"
So #KT-15476 Fixed
2018-08-08 10:29:10 +03:00
takasy
76a98c8e67 KT-20357 Add sample code for Pair/Triple.toList 2018-08-07 21:27:16 +03:00
Ilya Gorbunov
f41b410e1d Do not use projectTest helper to setup kotlinx-metadata-jvm
It sets up test instrumenter which cannot be used when running
these tests under JDK6.

Do not setup working dir, as there tests do not depend on it.
2018-08-07 21:27:16 +03:00
Alexey Sedunov
632dd05116 Misc: Fix compilation after rebase 2018-08-07 18:35:08 +03:00
Alexander Udalov
b67d236857 Fix bunch files for KotlinToJVMBytecodeCompiler
After 1582354077
2018-08-07 16:13:16 +02:00
Sergey Rostov
839a6b5e60 JPS: Support new MPP model. 2018-08-07 15:59:43 +03:00
Alexey Sedunov
ecf607d4fa Gradle: Implement new MPP model import 2018-08-07 15:59:41 +03:00
Sergey Igushkin
caec846330 Improve Android libraries support: allow project dependency on a lib
* Add a platform type androidJvm that is one-way compatible (can
  consume but cannot be consumed) with jvm, register the matching
  strategy

* Write our attributes to Android's output configurations (this uses
  a naming convention that Android inherits from Java, but there's no
  public API at the moment for that)
2018-08-07 15:55:46 +03:00
Sergey Igushkin
3f60798848 Fix the use case of an old-style project depending on an MPP lib
* Setup the attributes for the resolvable and output configurations
2018-08-07 15:55:46 +03:00
Sergey Igushkin
3ff61f59a7 Implement dependsOn relation for Kotlin source sets
* Setup configurations' extendsFrom and inherit sources of source sets.
  This make it unnecessary to restore transitive dependencies of a
  source set at its use sites, since their sources and dependencies are
  already included.

* Use dependsOn during default configuration instead of compilation.source()
2018-08-07 15:55:45 +03:00
Sergey Igushkin
93943a565c Refactor Kotlin tasks provider & fix friend task matching with new MPP
* Parameterize with the target name and use it in the task names
* Get rid of separate task providers for common and js, use the default
  with an appropriate target name
2018-08-07 15:55:45 +03:00
Sergey Igushkin
d4f44e63cd Create runtime software component usage only for runnables;
Also make Kotlin2JsCompilation a compilation to runnable files
2018-08-07 15:55:45 +03:00
Sergey Igushkin
209d0cf6a1 Add a few integration tests for the new MPP plugin 2018-08-07 15:55:45 +03:00
Sergey Igushkin
1e95e4d427 Allow resolution for compileOnly and compileClasspath configurations
This is required by the old IDE importer, which needs to resolve these configurations, and there seems to be no easy way to prevent that.
2018-08-07 15:55:44 +03:00
Sergey Igushkin
19fd706d98 Fixes for Android single-target projects
1. Kapt resolves runtime classpath during configuration, and because of
that we are unable to setup configurations that already took part in
dependency resolution. To fix that, run Kapt configuration as a separate
step out of the main loop over the variants

2. Old Android projects (< 3.0.0) don't have `api` and `implementation`
configurations. To stay compatible with those, ignore these
configurations being absent during configurations hierarchy setup.
2018-08-07 15:55:44 +03:00
Sergey Igushkin
7b6764c9ae Add test tasks to targets configured with KotlinTargetConfigurator 2018-08-07 15:55:44 +03:00
Sergey Igushkin
cb99f43033 Implement new MPP plugin 2018-08-07 15:55:44 +03:00
Sergey Igushkin
dc7d488deb Update existing plugin implementations to use KotlinCompilation
Add default implementations for KotlinTarget and KotlinCompilation
(some of them are used in code added by further commits).

Refactor AbstractKotlinPlugin so that parts of its logic can be easily
applied outside the plugin (needed for MPP plugin later).

The single platform Kotlin plugins having Kotlin compiled along with
Java will now create a KotlinCompilation and a KotlinSourceSet per Java
source set or per Android variant.
The build configuration logic will use KotlinCompilation
objects rather than Java or Android plugin entities.

Subplugins API and implementations are updated to use KotlinCompilation.
2018-08-07 15:55:44 +03:00
Sergey Igushkin
25eb93b136 (partial) Replace the KotlinSourceSet implementation and its factory
(Note: this commit leaves the repository in a non-compilable state as it
leaves some of the old API usages unchanged; they are replaced with new
implementations in further commits where more appropriate)

The new implementation covers the wider interface, and the factory
should now be used not on its own but in a named domain object container
(the API for creating a source set is now provided through the
source sets container rather than the factory, so that source sets are
also properly registered).
2018-08-07 15:55:43 +03:00
Sergey Igushkin
3828c26fa9 Introduce new API
These interfaces are needed for both new MPP design and getting rid of
the Java plugin source sets in favor of Kotlin source sets
2018-08-07 15:55:43 +03:00
Svyatoslav Kuzmich
a1c10956cb [JS IR BE] Support super calls for methods of Any 2018-08-07 14:41:50 +03:00
Svyatoslav Kuzmich
439350d41a [JS IR BE] Cast types in bridges 2018-08-07 14:41:50 +03:00
Alexander Udalov
97faff246d Compile kotlinx-metadata-jvm with JVM target 1.6 instead of 1.8
#KT-25920 Fixed
2018-08-07 13:38:47 +02:00
Alexander Udalov
1582354077 Refactor CompileEnvironmentUtil.getKtFiles, move to KotlinCoreEnvironment
Do not call this method the second time in KotlinToJVMBytecodeCompiler
where all KtFile instances are already created; just get only those
files that are in the needed module, which can be determined solely by
the file path.

Also "kotlinize" getKtFiles and rename to createKtFiles
2018-08-07 13:38:30 +02:00
Alexander Udalov
fe829add44 Minor, use TEMP_DIR/TESTDATA_DIR in CLI tests on xml build files
Otherwise the "outputDir" in these tests was treated as relative to the
project root, and starting from 63b4302cea, running these tests resulted
in the "whatever" directory being created in the project root
2018-08-07 13:38:30 +02:00
Alexander Udalov
19feacb96b Minor, expand TESTDATA_DIR with absolute path in CLI tests
To be able to use it correctly inside an xml build file where, if the
path is not absolute, it's treated as relative to the build file path
(which is TMP_DIR in several tests of the subsequent commit)
2018-08-07 13:38:30 +02:00
Alexander Udalov
f9ed8e7aaf Minor, make org.jetbrains.kotlin.fileClasses.LOG private
To prevent it from being suggested in auto-import
2018-08-07 13:38:30 +02:00
Alexander Udalov
5da8ce844a Minor, move ContentRoot and KotlinSourceRoot to module 'cli'
Also move CONTENT_ROOTS from JVMConfigurationKeys to
CLIConfigurationKeys since it's used on all platforms, not just JVM
2018-08-07 13:38:30 +02:00
Alexander Udalov
14b8f4b52b Minor, change package of outputUtils.kt 2018-08-07 13:38:30 +02:00
Alexander Udalov
2d875a9cb4 Reformat module 'cli', fix warnings/inspections 2018-08-07 13:38:29 +02:00
Nikolay Krasko
21a7561271 Fix small gap for install message 2018-08-07 14:08:09 +03:00
Nikolay Krasko
cb925375ed Not enough padding/white space for current version in update form (KT-25562)
#KT-25562 Fixed
2018-08-07 14:07:03 +03:00
Mikhael Bogdanov
5169cfba8f Use lazy symbol table in symbols 2018-08-07 12:42:05 +03:00
Nikolay Krasko
8e7d114850 Merge pull request #1795 from belovrv/patch-2
Delete the SlackIn badge
2018-08-07 12:28:00 +03:00
Nicolay Mitropolsky
bbf2af1004 IdeaExtensionPoints.IDEA_COMPATIBLE_BUILD_NUMBER = "182.3040"
Otherwise Kotlin plugin is not loaded in some tests (`org.jetbrains.uast.test.kotlin.KotlinDetachedUastTest` for instance)
2018-08-07 12:26:30 +03:00
belovrv
c17a9e10b5 Delete the SlackIn bage 2018-08-07 12:21:56 +03:00
Mikhail Zarechenskiy
1497c19dc9 Do not generate useless methods inside wrapper for inline class
Fix for test data (inlineFunctionInsideInlineClassesBox.kt) is needed
 to avoid check about "no inline functions".

 This check has two steps: first, names of inline functions from
 the metadata are loaded, then these names are checked that they are
 presented for physical methods in the classfile.

 Because now there are no physical methods in the classfile, we can't pass
 the second check, therefore this fix is needed.

 #KT-24872 Fixed
2018-08-07 12:15:46 +03:00
Yan Zhulanow
fcbcabd3a2 Pill: Generate iml files more consistently with IDEA 2018-08-07 11:55:24 +03:00
Yan Zhulanow
014b812a31 Pill: Remove -SNAPSHOT suffixes for artifact JAR file names 2018-08-07 11:55:24 +03:00
Yan Zhulanow
42d00c144b Pill: Fix compilation, forcibly move the annotations-13 dependency to the end of classpath 2018-08-07 11:55:24 +03:00
Yan Zhulanow
769a0d7701 Pill: Add extra stdlib jars as dist libraries 2018-08-07 11:55:23 +03:00
Yan Zhulanow
54470fe2b7 Pill: Remove source dependencies to 'tests-common'
'tests-common' module does only have a test source set so the dependency is redundant.
2018-08-07 11:55:23 +03:00
Mikhail Glukhikh
09766ae2ae Reformat: AddNameToArgumentFix 2018-08-07 11:30:31 +03:00
Mikhail Glukhikh
06d339639f Fix "Add name to argument" (disable reformatting in quick-fix text)
Four relevant quick-fix tests should be fixed after it
2018-08-07 11:30:31 +03:00
Mikhail Glukhikh
28484f31e7 Fix "Remove @ from annotation argument" (make consistent PSI)
Three relevant quick-fix tests should be fixed after it
2018-08-07 11:30:31 +03:00
Dmitry Savvinov
9ad2edbe85 Bump stubs versions after 5ab79a111d 2018-08-07 10:22:46 +03:00
Dmitry Savvinov
bd9254597d Fix testdata after switching idea version to 182
The source of testdata change is following commit from the
intellij-community repo:

d2bfe3d14bfa48af585f1faddc9a0c37dc05e724

It changes how Java-resolution resolves constructors:
- before, *any* PsiMethod without type reference was treated as
constructor
- now, PsiMethod without type reference is treated as constructor
only if their *names also match*

In particular, in this test, 'void () {}', surprisingly, doesn't have a
type reference ('void' is parsed as PsiErrorElement:Identifier
expected), its name is '<unnamed>', and its visibility is
'package-private' (!)

Therefore, previously we thought that 'Nameless' has package-private
constructor and were reporting INVISIBLE_MEMBER.
Now we don't see any constructor so we add default constructor, which has
public-visibility -> error is gone.

Note that this change affects behavior only when "red" code is already
present in the project (for "green" code, assumption "method without type
reference is a constructor" is indeed correct).
2018-08-07 10:18:25 +03:00
Dmitry Savvinov
a71f09022c Fix testdata after switching idea version to 182
The source of changes is commit the following commit in
intelllij-community repo:

b2b723fa449b16bb1da8102a5efdc219977fefe0 speedup java class resolve a bit

Eseentially, it makes Java resolve (which Kotlin reuses) accept first
matching candidate from explicit named import, instead of continuing
search.

Hence, behavior in cases where several conflicting imports are present,
has changed: before, reference to such names were unresolved, now it's
candidate from first import (see also test UsageMixed.java in the
intellij-community repo).

Therefore, previously we saw such types as undeclared and reported
MISSING_DEPENDENCY_CLASS on them (assuming they are not present in
classpath); now we see such types as properly resolved, so error is
gone.

Because behavior has changed only in case there already was "red" code,
it is not a BC and we can just accept changes.
2018-08-07 10:18:25 +03:00
Alexey Sedunov
ed5709afdb Misc: Fix compatibility issues with AS3.3C4 2018-08-06 21:39:17 +03:00
Vyacheslav Gerasimov
8231f5b259 Make handleElementRename overrides compatible with 183 platform 2018-08-06 20:24:46 +03:00
Mikhail Glukhikh
d7317c58e9 Move "Add test library to classpath" to irrelevant action list
This prevents inconsistencies like "Add JUnit 5.0" / "Add JUnit 5.2"
Should fix one relevant test
2018-08-06 19:04:12 +03:00
Mikhail Glukhikh
21be8d118d Fix "ReplaceInfixOrOperatorCallFix" (make consistent PSI)
One relevant quick-fix test should be fixed after it
2018-08-06 19:04:11 +03:00
Mikhail Glukhikh
247bb912ba Fix refactoring test (bunch file -> original file) 2018-08-06 19:04:09 +03:00
Mikhail Glukhikh
e15fc7da15 Fix two inspection tests (bunch file -> original file) 2018-08-06 19:04:07 +03:00
Mikhail Glukhikh
90245659ff Fix testOptionalParameterAndLambdaComplex (related to KT-24694) 2018-08-06 19:04:05 +03:00
Mikhail Glukhikh
07ff2bff33 Reformat & cleanup: psiModificationUtils, especially PsiElement.replaced 2018-08-06 19:04:04 +03:00
Mikhail Glukhikh
1d2438e04e Report SUPERTYPE_NOT_INITIALIZED even if no constructors in superclass
Before this commit, expect super-class without constructors did not
provoke SUPERTYPE_NOT_INITIALIZED. However, it should, but only
if sub-type is normal class (not an expect one).

So #KT-24597 Fixed
2018-08-06 19:02:24 +03:00
Vyacheslav Gerasimov
6db2037440 Make JavaToKotlinAction.convertFiles compatible with AS 3.3 2018-08-06 18:39:00 +03:00
Mikhail Zarechenskiy
1972387022 Fix test data after 6d4d244c28 2018-08-06 17:45:24 +03:00
Mikhail Zarechenskiy
659289b41a Report diagnostics about experimentality on unsigned literals
#KT-25580 Fixed
2018-08-06 17:45:22 +03:00
Mikhail Zarechenskiy
55e7def3c1 Fix coercion for stack value property in case of inline classes
#KT-25771 Fixed
2018-08-06 17:45:20 +03:00
Bloder
f89803fe8f Create samples for String.toLowerCase/toUpperCase
* Create toLowerCase method sample
* Create toUpperCase method sample
* Create toUpperCase sample reference in StringsJVM
* Create sample ref and doc of js impl toUpperCase
* Create sample ref and docs of js toLowerCase
* Add sample ref in toLowerCase expect fun
* Add sample ref in toUpperCase expect fun
2018-08-06 15:34:57 +03:00
Vyacheslav Gerasimov
e41f468bd8 Update compiler.pro for 183 platform 2018-08-06 15:08:03 +03:00
Vyacheslav Gerasimov
f712759a3e Make isReferenceTo parameter NotNull, annotated in 183 platform 2018-08-06 15:08:03 +03:00
Ilya Chernikov
a3d719785c Drop exception/stacktrace from logging warning if a script template is not found in the classpath
reducing clutter in logs and console
#KT-24754 fixed
2018-08-06 13:58:49 +02:00
Alexander Udalov
6f9441d3f4 Do not output empty non-root packages in tests with txt
Mostly to avoid listing every internal package in
kotlin-stdlib/kotlin-reflect, as in
acd5b62148/compiler/testData/diagnostics/testsWithUnsignedTypes/conversions/conversionOfSignedToUnsigned.txt (L144)
2018-08-06 13:43:32 +02:00
Alexander Udalov
ccb6410823 Rework and move the pull request checklist to a new section in ReadMe
Otherwise this text appears in numerous pull requests and contributors
do not understand what to do with it
2018-08-06 13:41:49 +02:00
Alexander Udalov
4c7bdf5437 Minor, fix typos in ReadMe 2018-08-06 13:41:49 +02:00
Mikhael Bogdanov
ddf6bdffcf Move jvm ir tests to jvm ones 2018-08-06 13:57:43 +03:00
Natalia Selezneva
0e8b93bf35 Use IDELanguageSettingsProvider getting languageVersionSettings and targetPlatform during analysis 2018-08-06 10:41:42 +02:00
Ilya Chernikov
f2395bac2f Use script compiler options to calculate target platform in IDE
#KT-25822 fixed
2018-08-06 10:41:41 +02:00
Vyacheslav Gerasimov
0cf6b26494 as32: Set since-build to 181.5281 (AS 3.2 Beta 5) 2018-08-06 11:15:50 +03:00
Mikhail Zarechenskiy
2ee483f92b Do not generate bodies for functions from Any for light classes
#KT-25894 Fixed
2018-08-06 10:57:53 +03:00
Mikhail Zarechenskiy
ddf6c37e0e Prohibit inline classes with special underlying types
#KT-25328 Fixed
 #KT-23819 Fixed
2018-08-06 10:56:05 +03:00
Mikhail Zarechenskiy
6d4d244c28 Generate function from Any for inline classes same as for data classes
#KT-24873 Fixed
 #KT-25293 Fixed
 #KT-25299 Fixed
2018-08-06 10:56:01 +03:00
Mikhail Zarechenskiy
043ce1cb27 Support secondary constructors for inline classes
#KT-25614 Fixed
 #KT-25246 Fixed

 KT-25599 Will be fixed after recompilation of unsigned classes
2018-08-06 10:55:57 +03:00
Mikhail Zarechenskiy
064eb24d51 Refactoring: extract methods about constructor codegen out
#KT-25614 In Progress
2018-08-06 10:22:21 +03:00
Mikhail Zarechenskiy
e28c2ed549 Refactoring: extract codegen methods about functions from Any out 2018-08-06 10:22:17 +03:00
Mikhail Zarechenskiy
c253b39acf Refactoring: extract generator for functions from Any 2018-08-06 10:19:46 +03:00
Mikhail Zarechenskiy
6244846107 Add functions from Any to the member scopes of inline classes 2018-08-06 10:19:43 +03:00
Mikhail Zarechenskiy
fdf538007c Refactoring: extract logic about methods from Any for scopes out 2018-08-06 10:19:39 +03:00
Dmitriy Dolovov
fd4bff120a Kotlin/Native Plugin: Resolve cache error (disposed project)
#KT-25852 Fixed
2018-08-06 10:15:25 +03:00
Dmitriy Dolovov
2c46d9e67d K/N: Properly add modules for KLIBs generated by cinterop (with fixes) 2018-08-06 10:14:30 +03:00
Dmitriy Dolovov
ba6818e2d5 K/N: Properly add modules for KLIBs generated by cinterop 2018-08-06 10:14:18 +03:00
Dmitriy Dolovov
d7ad003e6f Minor. Dictionary 2018-08-06 10:13:58 +03:00
Andrey Breslav
6e3497771d Some notes on contributing language features
This is to provide some guidance for PRs like: https://github.com/JetBrains/kotlin/pull/1769
2018-08-06 06:32:40 +03:00
Alexander Podkhalyuzin
98af477fa3 Added kotlin-ultimate repository. 2018-08-04 15:30:16 +03:00
Alexander Podkhalyuzin
52b55f225b Added kotlin-ultimate root 2018-08-04 11:47:48 +03:00
Alexander Podkhalyuzin
f976dc069d Fixed compatibility after update to new Konan/Kotlin 2018-08-04 11:07:52 +03:00
Alexander Podkhalyuzin
82428d574f Fixed joint build 2018-08-04 11:07:52 +03:00
Alexander Podkhalyuzin
2ee9e2539c Kotlin + Kotlin/Native joint build. Still requires polishing. Now works 2018-08-04 11:07:51 +03:00
Vyacheslav Karpukhin
edf4d0ca3e K/N: Using correct module when constructing the KonanAnalyzerFacade 2018-08-04 11:06:34 +03:00
Alexander Podkhalyuzin
17c9c53a6c Better setting for kotlin-native build 2018-08-04 11:06:34 +03:00
Alexander Podkhalyuzin
1a4a1c5faf Gradle plugin right buildnumber 2018-08-04 11:06:33 +03:00
Alexander Podkhalyuzin
ef2dc5372d Fixed compatibility with new Kotlin Native 2018-08-04 11:06:33 +03:00
Alexander Podkhalyuzin
2988894bfb Kotlin/Native support in IntelliJ IDEA 2018-08-04 11:06:32 +03:00
Vyacheslav Gerasimov
e4bf20a267 183: Set since-build to 183.1 2018-08-03 21:29:19 +03:00
Vyacheslav Gerasimov
ebb90f8260 183: Build against 183-SNAPSHOT 2018-08-03 21:29:19 +03:00
Vyacheslav Gerasimov
4996d81ea1 Add 183 rule to .bunch 2018-08-03 21:29:19 +03:00
Vyacheslav Gerasimov
5666e1ea93 Update versions.gradle.kts for 183 2018-08-03 21:29:19 +03:00
Vyacheslav Gerasimov
c7a00971fe Fix source compatibility with 183 platform 2018-08-03 21:29:18 +03:00
Vyacheslav Gerasimov
57963d2e03 Remove asm-shaded sources downloading code since it is not published anymore 2018-08-03 21:29:18 +03:00
Nikolay Krasko
5ba877c144 Add empty test data files to make new test framework in 182 happy 2018-08-03 21:06:05 +03:00
Alexander Udalov
fe2251bfca Run classifier usage checkers on function types 2018-08-03 18:03:52 +02:00
Nikolay Krasko
759ffafb0a Render flexible types with enhancement as enhanced in IDE (KT-25622)
Main targets for the fix is completion, parameters info, inlay hints and
override/implement.

Other IDE functions might be affected.

 #KT-24911 Fixed
 #KT-25616 Fixed
 #KT-25622 Fixed
2018-08-03 16:00:09 +03:00
Nikolay Krasko
653d1d00de Option for rendering types with enhancement 2018-08-03 16:00:07 +03:00
Nikolay Krasko
ceeeffd814 Extend list of annotations ignored in parameter info (KT-24911, KT-25622)
#KT-24911 Fixed
2018-08-03 16:00:04 +03:00
Nikolay Krasko
10b2229a27 Skip main file while configuring extra files in parameter info test 2018-08-03 16:00:03 +03:00
Nikolay Krasko
ce9e7261a7 Allow kotlin extra files in parameter info tests 2018-08-03 16:00:02 +03:00
Natalia Selezneva
6672fd7bbf Fix tests for highlighting in scripts with custom script definition 2018-08-03 15:25:35 +03:00
Natalia Selezneva
41dc059da9 Register custom file extension for scripts loaded from script template 2018-08-03 15:25:35 +03:00
Natalia Selezneva
be2d4964fd Fix testData, add script-runtime 2018-08-03 15:25:35 +03:00
Natalia Selezneva
f71269009a Refactoring: use KtScript.scriptDefinition instead of KotlinScriptDefinitionProvider.findScriptDefinition if possible 2018-08-03 15:25:35 +03:00
Natalia Selezneva
736361e345 Provide a default scriptDefinition for script 2018-08-03 15:25:35 +03:00
Natalia Selezneva
c802428326 Do not check script definitions in parser 2018-08-03 15:25:35 +03:00
Alexey Sedunov
3ce4a14583 Misc: Workaround for failing tests due to unknown ".gradle" extension 2018-08-03 14:48:56 +03:00
Toshiaki Kameyama
1ac6f18a47 "Convert put to assignment": Fix false positive inside elvis expression
So #KT-22072 Fixed
2018-08-03 13:21:50 +03:00
Toshiaki Kameyama
1b1e503716 Add quick-fix for default parameter value removal #KT-25146 Fixed 2018-08-03 13:17:49 +03:00
Toshiaki Kameyama
a059d50c8f "Call chain may be simplified": fix false positive on Java Map
So #KT-25089 Fixed
2018-08-03 13:15:53 +03:00
Ilya Gorbunov
c9a784ebb0 Deprecate projectDist and make it a temporary alias for default configuration 2018-08-03 09:37:38 +03:00
Ilya Gorbunov
2a598e0ac4 Replace ReadOnly/Mutable usages in the compiler
Replace ones from org.jetbrains.kotlin package with new annotations from kotlin.annotations.jvm.
No need to copy them to compile kotlin-reflect anymore.
Then simplify reflect project more: no sources — no need to pack its direct output.
2018-08-03 09:37:38 +03:00
Dmitry Petrov
1bfb75a51b Generate intrinsic-based numeric comparison only for FP types 2018-08-03 09:34:59 +03:00
Vyacheslav Gerasimov
cce9505e31 Fix AbstractSpringClassAnnotatorTest compilation 2018-08-02 23:15:29 +03:00
Vyacheslav Gerasimov
5c177a86fe Use snapshot repository if platform version ends with SNAPSHOT 2018-08-02 23:15:28 +03:00
Simon Ogorodnik
07cc3bd63a KT-25733: Fix regression after optimization
#KT-25733 fixed
2018-08-02 22:41:48 +03:00
Nikolay Krasko
be3f0628ef Fix file structure tests in 182 2018-08-02 21:30:05 +03:00
Vyacheslav Gerasimov
8ccfdc70ac as33: Add private bintray repo to build against custom AS 3.3 build 2018-08-02 20:53:17 +03:00
Vyacheslav Gerasimov
8fc0c1d7b0 as33: Add AS 3.3 bunchset built with AS 3.3 C4 2018-08-02 20:53:17 +03:00
Vyacheslav Gerasimov
94bbb3831a Add as33 rule to .bunch file 2018-08-02 20:53:17 +03:00
Alexander Udalov
0355746304 Implement OpenAddressLinearProbingHashTable.entries for debug when needed
Otherwise it's very difficult to view the contents of BindingContext in
debugger views
2018-08-02 18:36:22 +02:00
Vyacheslav Gerasimov
53b1a8bd37 Remove hacks introduced for 172 platform compatibility 2018-08-02 19:32:18 +03:00
Vyacheslav Gerasimov
a2bf417d75 Remove 172 bunchset 2018-08-02 19:32:18 +03:00
Ilmir Usmanov
0c867b4804 Disable callable references to suspend functions in 1.2
#KT-25604: Fixed
2018-08-02 18:55:49 +03:00
Vyacheslav Gerasimov
ec276a07cb Add keep rule to compiler.pro for org.jdom.output.XMLOutputter
Without this class PluginManagerCore.loadDescriptorFromJar fails
2018-08-02 18:17:08 +03:00
Vyacheslav Gerasimov
0103c0d2fd Switch to 182 platform 2018-08-02 18:17:06 +03:00
Mikhael Bogdanov
a8b9393e79 Fix test data 2018-08-02 15:51:16 +02:00
Svyatoslav Scherbina
e923c65704 backend.common: improve support for unsigned types 2018-08-02 16:29:39 +03:00
Svyatoslav Scherbina
1aac1c2d69 Prepare default arguments IR lowering for inline classes support
Allow `nullConst` to be customized by backend
2018-08-02 16:29:38 +03:00
Natalia Selezneva
d57099088e Fix unusedReceiverParameter test 2018-08-02 15:12:56 +03:00
Nikolay Krasko
79ad0ea2ef Test for Gradle and Maven migration (KT-23401) 2018-08-02 14:44:42 +03:00
Nikolay Krasko
7aadf95f66 Don't show migration dialog if there're no project files changed (KT-23401) 2018-08-02 14:44:41 +03:00
Nikolay Krasko
f0794dbc0a Ability to disable migration detection (KT-23401)
-- to disable
2018-08-02 14:44:40 +03:00
Nikolay Krasko
bffbcc595c Add inspections to migration (KT-23401) 2018-08-02 14:44:40 +03:00
Nikolay Krasko
30ec73f322 Add migration action and marker fix interface (KT-23401) 2018-08-02 14:44:40 +03:00
Nikolay Krasko
feb456b0e1 Migration dialog (KT-23401) 2018-08-02 14:44:39 +03:00
Nikolay Krasko
4574fd94c6 Monitor maven projects synchronization (KT-23401)
-- Maven migrator
2018-08-02 14:44:39 +03:00
Nikolay Krasko
b4c88651f6 Migration detector for external systems (KT-23401) 2018-08-02 14:44:39 +03:00
Nikolay Krasko
02796783d3 Minor: update maven external system id 2018-08-02 14:44:39 +03:00
Nikolay Krasko
f9845bab54 Workaround for the case when some classes are unloaded during ranking (KT-25774)
It's important that ranking preserve order of files found
in findFilesByNameInPackage()

It's only a workaround because it's expected for debugger to have
classes unloaded and some valid variants might get bad rank and
rejected because of that.

 #KT-25774 Fixed
2018-08-02 14:38:28 +03:00
Nikolay Krasko
da6bcc9d46 Do not check locations inside synthetic and bridge methods
No valid psi declarations can be found for such locations leading to
negative rank.
2018-08-02 14:38:27 +03:00
Nikolay Krasko
c2dc66fe1b Minor: reformat DebuggerUtils.kt 2018-08-02 14:38:26 +03:00
Nikolay Krasko
449069b1b7 Attach preceding line comments to property accessors (KT-25417)
#KT-25417 Fixed
2018-08-02 14:38:25 +03:00
Mikhael Bogdanov
e3462a2999 Remove IrOnlyBoxCodegenTestGenerated test 2018-08-02 13:19:28 +02:00
Mikhael Bogdanov
6c41f078a6 Mute jvm ir box tests 2018-08-02 13:19:28 +02:00
Mikhael Bogdanov
34a12cb87c Mute 'boxAgainstJava' tests 2018-08-02 13:19:27 +02:00
Mikhael Bogdanov
7a98f5c5f7 Add 'boxAgainstJava' tests to ir test suite 2018-08-02 13:19:26 +02:00
Mikhael Bogdanov
261a00eec7 Remove IrCompileKotlinAgainstInlineKotlinTestGenerated tests 2018-08-02 13:19:26 +02:00
Mikhael Bogdanov
6c65507f29 Mute inline tests 2018-08-02 13:19:25 +02:00
Mikhael Bogdanov
9ccb25789b Unmute jvm-ir inline tests 2018-08-02 13:19:24 +02:00
Svyatoslav Kuzmich
826c524a9b [JS IE BE] Lower string equality method/operators 2018-08-02 13:42:50 +03:00
Alexander Udalov
aa1321287c Add ChangeLog for 1.2.60 2018-08-02 12:14:58 +02:00
Mikhael Bogdanov
0ddbe12e62 Use common assertion in ir-tests and proper arithmetic flag 2018-08-02 10:38:06 +02:00
Mikhael Bogdanov
cb53e86183 Move ir box test under "box/ir" 2018-08-02 09:52:48 +02:00
Natalia Selezneva
24579c27a2 Extract common part in inspections that checks usage of descriptor in some call 2018-08-02 09:23:27 +03:00
Toshiaki Kameyama
4c34ced1fa Introduct "Redundant 'with' call" inspection #KT-6633 Fixed 2018-08-02 09:23:27 +03:00
Artem Zinnatullin
58becffb1f Add documentation for @JvmSynthetic 2018-08-02 08:53:47 +03:00
Sergey Rostov
4f3f4dd025 ScriptDependenciesLoader: Fix calling notifyRootsChanged in write-unsafe context (EA-123239) 2018-08-02 08:38:17 +03:00
Alexander Udalov
0c8b231fde Add tests on coercion to Unit for callable references
#KT-11723
2018-08-01 16:26:07 +02:00
Alexander Udalov
9babd90999 Support default arguments and varargs for callable references
#KT-8834
 #KT-19869
 #KT-25514
2018-08-01 16:26:06 +02:00
Ilya Chernikov
f71909ee73 Fix classpath calculation for scripts, e.g. in JSR-223 setting
#KT-25814 fixed
2018-08-01 13:09:05 +02:00
Nikolay Krasko
a406f1b361 Revert registering ClsCustomNavigationPolicy EP in 182 (KT-24891)
Registration can't be removed because there's still a usage in ClsFileImpl:

Caused by: java.lang.IllegalArgumentException: Missing extension point: com.intellij.psi.clsCustomNavigationPolicy in area null
    at com.intellij.openapi.extensions.impl.ExtensionsAreaImpl.getExtensionPoint(ExtensionsAreaImpl.java:335)
    at com.intellij.openapi.extensions.impl.ExtensionsAreaImpl.getExtensionPoint(ExtensionsAreaImpl.java:26)
    at com.intellij.openapi.extensions.Extensions.getExtensions(Extensions.java:104)
    at com.intellij.openapi.extensions.Extensions.getExtensions(Extensions.java:98)
    at com.intellij.openapi.extensions.Extensions.getExtensions(Extensions.java:93)
    at com.intellij.psi.impl.compiled.ClsFileImpl.getNavigationElement(ClsFileImpl.java:312)
2018-08-01 14:02:59 +03:00
Mikhael Bogdanov
2b3162732b Fix lazy parent calculation for property accessor 2018-08-01 12:29:31 +02:00
Mikhael Bogdanov
bf60835975 Delete unused properties 2018-08-01 12:29:30 +02:00
Mikhael Bogdanov
b27177b7ee Get rid of 'referenceAllTypeExternalClassifiers' 2018-08-01 12:29:30 +02:00
Mikhael Bogdanov
b22352a60d Get rid of 'externalPackageFragments' and 'dependencyModules' in IrModuleFragment 2018-08-01 12:29:29 +02:00
Mikhael Bogdanov
0df6fddd0a Extract utils from ReferenceSymbolTable 2018-08-01 12:29:28 +02:00
Mikhael Bogdanov
8a0c585c09 Move lazy var to separate file 2018-08-01 12:29:28 +02:00
Mikhael Bogdanov
bee0803ac9 Generate ExternalPackageFragment lazily 2018-08-01 12:29:27 +02:00
Mikhael Bogdanov
1bf3f4bda7 Extract ReferenceSymbolTable, support lazy type parameters 2018-08-01 12:29:27 +02:00
Mikhael Bogdanov
6623799671 Clean 2018-08-01 12:29:26 +02:00
Mikhael Bogdanov
952bc6da63 Set parent for non-lazy declarations 2018-08-01 12:29:25 +02:00
Mikhael Bogdanov
c19d45a2fc Initial lazy ir implementation 2018-08-01 12:29:25 +02:00
Mikhael Bogdanov
2884d728fd Mute/unmute jvm_ir tests 2018-08-01 12:29:24 +02:00
Mikhael Bogdanov
74aa8f054e Fix type parameters count in synthetic accessor lowering 2018-08-01 12:27:08 +02:00
Dmitry Petrov
60d93aee87 Drop IrProperty.typeParameters 2018-08-01 12:06:41 +03:00
Roman Artemev
c9b7db646c Temporary mute test with issue between coroutines and crossinline 2018-08-01 10:56:08 +03:00
Roman Artemev
dac1fac957 Unmute working test 2018-08-01 10:55:21 +03:00
Vyacheslav Gerasimov
2ec7c4fd0d Update platform versions for 181, 182, as32, as33 plugins 2018-07-31 19:27:23 +03:00
Pavel V. Talanov
e1a27929ac Do not throw on using kotlin resolve via light classes in dumb mode
Fix an exception when kotlin resolve was invoked when searching
    for tests while indexing (probably many other cases)
Does not actually fix the behaviour, the test will not be found
    resulting in undesired behaviour
Full-blown infrastructure for resolving Kotlin in dumb mode is needed
    to fix the behaviour

 #KT-24979 Fixed
2018-07-31 14:47:21 +02:00
Dmitry Petrov
ea710ce607 IrField.isStatic: Update testData for new test 2018-07-31 14:04:04 +03:00
Dmitry Petrov
6dfcf15a39 IR: IrField.isStatic 2018-07-31 13:39:54 +03:00
Zalim Bashorov
8d97512179 [JS IR BE] Improve diagnostics in tests 2018-07-31 11:28:39 +03:00
Zalim Bashorov
2fb286e39c [JS IR BE] Update tests 2018-07-31 11:28:39 +03:00
Zalim Bashorov
0da14e4189 [JS IR BE] Support calls, property accesses and most of operators on expressions with dynamic type 2018-07-31 11:28:38 +03:00
Zalim Bashorov
4a7ecaa908 [JS IR BE] Add basic support for external declarations 2018-07-31 11:28:38 +03:00
Zalim Bashorov
3c0d0d2ab4 [JS IR BE] Move external declarations to a separate IrPackageFragment to not generate code for them 2018-07-31 11:28:38 +03:00
Zalim Bashorov
c66bb8c57d [JS IR BE] Remove no longer needed descriptor based utils 2018-07-31 11:28:38 +03:00
Zalim Bashorov
990ad8719d [JS IR BE] Run each lowering on all files instead of running all lowering on each file 2018-07-31 11:28:38 +03:00
Lucas Smaira
49292cd26c Move model interfaces code from Java to Kotlin 2018-07-30 19:08:04 +03:00
Lucas Smaira
52990c9eb1 Set JAVA and ANDROID_HOME when fetching Gradle models
In BaseGradleIT
2018-07-30 19:08:04 +03:00
Lucas Smaira
8cb03fcdec Fix model tests in Windows
By comparing files instead of paths, avoiding problems with separator
'/' or '\'.
2018-07-30 19:08:04 +03:00
Lucas Smaira
5e515590cb Restrict methos in Tasks.kt to internal 2018-07-30 19:08:04 +03:00
Lucas Smaira
3588547d8c Remove *ImplTest for Kotlin Gradle Models
Equality should already be guaranteed by Kotlin data classes.
2018-07-30 19:08:04 +03:00
Lucas Smaira
3c88f761a6 Introduce tooling model for Android extensions plugin
Introduce Gradle models for plugins 'kotlin-android-extensions'.
2018-07-30 19:08:04 +03:00
Lucas Smaira
5a423e8dcd Introduce tooling model for annotation based projects
Introduce Gradle models for plugins 'kotlin-allopen', 'kotlin-noarg' and
'kotlin-sam-with-receiver'. Corresponding model builders are registered
in each one of those plugin main classes.
2018-07-30 19:08:04 +03:00
Lucas Smaira
5671dbb929 Introduce tooling model for Kapt gradle projects
A Kapt model for Gradle projects including 'kotlin-kapt'plugin is
introduced. Its model builder KaptModelBuilder produces an
implementation of these models and can be queried through the Gradle
Tooling API when needed. Model builder is registered in
Kapt3GradleSubplugin.
2018-07-30 19:08:04 +03:00
Lucas Smaira
9def6f020f Introduce tooling model for Kotlin gradle projects
A KotlinProject model for Gradle projects including Kotlin (JVM, JS or
common) plugins is introduced. Its model builder KotlinModelBuilder
produces an implementation of these models and can be queried through
the Gradle Tooling API when needed. Model builder is registered in the
corresponding Kotlin Gradle plugins.

Model definition should be published as a separate artifact in public
repositories so it can be consumed when needed.
2018-07-30 19:08:04 +03:00
Ilmir Usmanov
4b03db771a Minor. Fix test. 2018-07-30 18:59:44 +03:00
Mikhail Zarechenskiy
acd5b62148 Introduce limited constant conversions for Kotlin/Native
#KT-25320 Fixed
2018-07-29 04:32:32 +03:00
Alexander Udalov
1a51132884 Add CLI tests on internal from other module (JVM, JS, common) 2018-07-27 18:51:42 +02:00
Alexander Udalov
4bd66d5aa8 Add compiler argument -Xfriend-paths for kotlinc-jvm
#KT-21910 Fixed
2018-07-27 18:51:42 +02:00
Dmitry Savvinov
8edbb10420 Fix typo introduced in f90b29c2e3 2018-07-27 18:55:52 +03:00
Dmitry Savvinov
f90b29c2e3 Support contracts in PartialBodyResolveFilter
Previously, PartialBodyResolveFilter didn't know about contracts and was
filtering out calls of such functions, leading to unstable completion in
cases like that:

fun test(x: Any?) {
    require(x is String)
    x.<caret>
}

However, PartialBodyResolveFilter works by pure PSI, while to determine
if function has a contract we have to resolve it.

To solve it, we do something very similar to what has been done with
Nothin-returning functions: introduce
KotlinProbablyContractedFunctionShortNameIndex, which collects all
function which *may* have a contract during indexing.

^KT-25275 Fixed
2018-07-27 16:59:24 +03:00
Dmitry Savvinov
5ab79a111d Introduce 'mayHaveContract'-flag in stubs
This is needed for further commit, which supports contracts-based
smartcasts in partial body resolve mode.

NB: Stubs can be built from 3 sources:
- source code (contract presence can be checked by PSI)
- binary data (contract presence can be checked by Kotlin Metadata)
- decompiled sources

The last case is a bit of a headache, because usually bodies are omitted
in decompiled sources. To workaround it, we have to inject stubbed
contract-call in the body.
2018-07-27 16:59:24 +03:00
Dmitry Savvinov
24245c2245 Support compiler test directives in PartialBodyResolve tests 2018-07-27 16:59:23 +03:00
Dmitry Savvinov
ca64346b55 Add compiler test directives to the list of valid directives 2018-07-27 16:59:23 +03:00
Dmitry Savvinov
2a57807c85 Minor: reformat and clean-up KotlinFixtureCompletionBaseTestCase 2018-07-27 16:59:23 +03:00
Dmitry Savvinov
099fc0ad51 Push compiler options from test directives into project-wide settings
This may be useful if we want to configure how we read binaries
2018-07-27 16:59:23 +03:00
Dmitry Savvinov
724b7bf363 Minor: rename and refactor contract-related PSI checks in ktPsiUtil 2018-07-27 16:59:23 +03:00
Dmitry Savvinov
b943140f3a Move purely PSI checks of contract presence to ktPsiUtil.kt 2018-07-27 16:59:23 +03:00
Alexey Sedunov
5275e19c76 Move: Do not consider type alias -> expect class change as a conflict
Given they have the same fqname

 #KT-23594 Fixed
2018-07-27 16:08:13 +03:00
Alexey Sedunov
1c30a12d95 Move: Account for implemented modules in internal access check
#KT-23590 Fixed
2018-07-27 16:08:13 +03:00
Alexey Sedunov
0406d61622 Rename: Update filenames within expect/actual set (when necessary)
#KT-23772 Fixed
2018-07-27 16:08:13 +03:00
Alexey Sedunov
d586a84f31 Configuration: Include test roots of dependent modules to the module scope
#KT-23914 Fixed
2018-07-27 16:08:13 +03:00
Alexey Sedunov
04500914f3 Misc: Update Kotlin Gradle script icons for IDEA 182
#KT-25356 Fixed
2018-07-27 16:08:12 +03:00
Dmitry Petrov
893e19e9f8 StrictJavaNullabilityAssertions is enabled since 1.3
https://youtrack.jetbrains.com/issue/KT-20830#focus=streamItem-27-2670071-0-0
2018-07-27 09:52:29 +03:00
Dmitry Petrov
566b5856ec Constructor call normalization mode depends on language version 2018-07-27 09:52:29 +03:00
Roman Artemev
14b1f0ef6a Fix issue #KT-24475
* count coroutine metadata references during RemoveUnusedImport pass in JsInliner
* add cases to test usage of stdlib symbols in inlined functions
2018-07-26 19:23:06 +03:00
Anton Bannykh
75c7045ea7 JS: fix bug in resolveTemporaryNames.kt 2018-07-26 18:23:20 +03:00
Alexander Udalov
3323fd5a11 Check "kotlin" package usage when compiling common code
#KT-25369 Fixed
2018-07-26 17:10:33 +02:00
Mikhail Glukhikh
ddd3a0a46e Implement liftToExpected correctly for primary constructor properties
Before this commit, we always tried to find expect property in this case.
However, there is at least one case when we should find parameter of
expect primary constructor instead (safe delete).
So #KT-25321 Fixed
2018-07-26 18:01:42 +03:00
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
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
Nikolay Krasko
668708170f Add intention for replacing experimental coroutines usages to cleanup (KT-25251)
#KT-25251 In Progress
2018-07-23 13:43:35 +03:00
Denis Zharkov
56a87ec98e Restore method broken in f72aa78eec
Otherwise plugin compatibility tests are failing
2018-07-23 10:36:31 +03:00
Denis Zharkov
01503a84d9 Partially revert 79e776e9d7 2018-07-23 10:36:31 +03:00
Yan Zhulanow
7803294546 PrePush hook (temporary): Do nothing on a download failure 2018-07-20 22:17:45 +03:00
Nikolay Krasko
8fc377b3b3 Do not spam for same compiler version during the session (KT-25546)
Otherwise it might be too distracting when auto-import feature is enabled.
2018-07-20 19:15:20 +03:00
Nikolay Krasko
94e5f25569 Guarantee max compiler version will be shown in popup (KT-25546) 2018-07-20 19:15:20 +03:00
Nikolay Krasko
4be5c395aa Show popup about too old bundled compiler in Gradle and Maven (KT-25546) 2018-07-20 19:15:19 +03:00
Nikolay Krasko
d27002827e Refactoring: move ModuleSourceRootMap.kt from idea-jvm to idea module 2018-07-20 19:15:19 +03:00
Nikolay Krasko
99e0b998cf Minor: show class of the problem file in error 2018-07-20 19:15:19 +03:00
Simon Ogorodnik
b58e35a3e5 173: Revert changes for IDEA < 181 2018-07-20 18:41:24 +03:00
Simon Ogorodnik
c2e27a3c46 KT-22815: Rename parameter to match semantics 2018-07-20 18:41:21 +03:00
Simon Ogorodnik
ad6eac6ec6 KT-22815: Cleanup findKDoc logic 2018-07-20 18:41:18 +03:00
Simon Ogorodnik
1bd02472a2 KT-22815: Fix documentation for primary constructor params/props 2018-07-20 18:41:14 +03:00
Simon Ogorodnik
c608395c7c KT-22815: Update testData 2018-07-20 18:41:11 +03:00
Simon Ogorodnik
9ec0ce6ec8 KT-22815: Show documentation for function value/type params 2018-07-20 18:41:08 +03:00
Simon Ogorodnik
e4d76382b8 KT-22815: Update testData for quick documentation 2018-07-20 18:41:04 +03:00
Simon Ogorodnik
0b9d4a93dd KT-22815: Use 'Params' instead of 'Parameters' to save h-space 2018-07-20 18:41:01 +03:00
Simon Ogorodnik
6e95ae7393 KT-22815: Put colon after section names 2018-07-20 18:40:56 +03:00
Simon Ogorodnik
b237298c20 KT-22815: Position deprecated section between definition and description 2018-07-20 18:40:49 +03:00
Simon Ogorodnik
1918836340 KT-22815: Use gray color for filename 2018-07-20 18:40:38 +03:00
Simon Ogorodnik
84b299d7dc KT-22815: Use bold for root identifier, and not for keywords 2018-07-20 18:40:30 +03:00
Simon Ogorodnik
33a6721270 KT-22815: Update quick-doc testData 2018-07-20 18:40:21 +03:00
Simon Ogorodnik
48d0493edb Fix enum special function quick navigation behaviour 2018-07-20 18:40:15 +03:00
Simon Ogorodnik
9a34e91dec KT-22815: Render annotations on separate lines 2018-07-20 18:40:10 +03:00
Simon Ogorodnik
831e7fdc06 KT-22815: Render definition file for top-level declarations
Do not show defined in for local declarations
2018-07-20 18:40:05 +03:00
Simon Ogorodnik
6255743148 KT-22815: Cleanup quick doc rendering 2018-07-20 18:40:00 +03:00
Simon Ogorodnik
1d0fc0e736 Copy template engine from ktor 2018-07-20 18:39:57 +03:00
Simon Ogorodnik
9283089397 Reformat 2018-07-20 18:39:54 +03:00
Simon Ogorodnik
bfa5afa564 KT-22815: Cut Java signatures off properly 2018-07-20 18:39:52 +03:00
Simon Ogorodnik
263ed47aac KT-22815: Render sections properly 2018-07-20 18:39:48 +03:00
Simon Ogorodnik
39e72f4041 Reformat 2018-07-20 18:39:45 +03:00
Simon Ogorodnik
99f0a0368a KT-22815: Wrap parameters and try new DocumentationMarkup 2018-07-20 18:39:42 +03:00
Dmitry Petrov
86e863951e Compare FP numbers properly when determining if field initializer needed 2018-07-20 17:53:25 +03:00
Roman Elizarov
819ffe7117 Remove suspending function migration adapters for 1.3-M1 2018-07-20 16:57:42 +03:00
Dmitry Petrov
ae0704af9c Generate singleton references as GET_OBJECT in nested classes 2018-07-20 16:46:18 +03:00
Dmitry Petrov
779cae7db5 Adjust receivers for possibly synthetic properties access
Synthetic property accessors are treated as extension functions on Java
classes by the front-end. However, underlying Java accessor methods are
proper members.
2018-07-20 16:46:18 +03:00
Denis Zharkov
73acc86785 Store computed library kind for jar in a file attribute
It should help to avoid visiting children of each jar in java projects
LibraryEffectiveKindProviderImpl has it's own in-memory cache
but it doesn't help when project is reopened

 #KT-25129 Fixed
 #KT-25034 Fixed
2018-07-20 15:35:58 +03:00
Alexander Udalov
ad326f7875 Fix assert on parameter type length for functions with big arity
In case of a bridge for a vararg invoke with big arity, the bridge only
has one parameter (array of parameters), and the delegate method has at
least 23 parameters. This assert was added in 77959247d2 and it didn't
cause any tests in master to fail because tests on functions with big
arity are disabled there
2018-07-20 14:01:09 +02:00
Dmitry Savvinov
6dacd1011f Do not report warning if -XXLanguage turns on bugfix
KT-25554 Fixed
2018-07-20 14:24:42 +03:00
Alexander Udalov
e42017a468 Fix ISE in ReflectJavaMember.getValueParameters on Java 6
The exception was incorrectly introduced in 0f0602230a. We should not
fail when `names` is null, only when there's no element at the
corresponding index. On Java 6, `names` is always null. On Java 8,
`names` is never null (it's an empty list if the class was compiled
without "-parameters")
2018-07-20 13:11:11 +02:00
Mikhail Zarechenskiy
f8d19718c8 Fix exception on trying to evaluate red code with inline classes
#KT-25600 Fixed
2018-07-20 13:58:35 +03:00
Mikhail Zarechenskiy
17243c08c1 Forbid lateinit variables of inline class types
Proper support of lateinit inline class values will be added later,
 see #KT-23814

 #KT-25603 Fixed
2018-07-20 13:58:33 +03:00
Mikhail Zarechenskiy
045058c29a Support inline class values inside string templates through boxing
#KT-25626 Fixed
 #KT-25613 Open
2018-07-20 13:58:31 +03:00
Mikhail Zarechenskiy
9aa4247065 Do not box primitives in a single-entry string template expression 2018-07-20 13:46:11 +03:00
Mikhail Zarechenskiy
045e3f53b0 Propagate KotlinType into codegen methods where it's possible 2018-07-20 13:46:09 +03:00
Mikhail Zarechenskiy
ec9d8e580e Leave boxing for compareTo/areEqual methods for inline classes
Inline classes can override methods and thus introduce side effects
2018-07-20 11:51:34 +03:00
Denis Zharkov
4e7718bfff Minor. Extract many properties to ImportResolutionComponents 2018-07-20 11:27:08 +03:00
Denis Zharkov
0b2fde3886 State on types level that forcing imports works only for non-default 2018-07-20 11:27:08 +03:00
Denis Zharkov
79e776e9d7 Drop KtImportsFactory as it became unused after previous commit 2018-07-20 11:27:08 +03:00
Denis Zharkov
ec23695f77 Avoid creating fake PSI for default imports
#KT-13860 Fixed
2018-07-20 11:27:08 +03:00
Dmitry Petrov
acf0bb349c Update testData for restricted expression annotations retention 2018-07-20 10:39:51 +03:00
Dmitry Petrov
92a8448042 DiagnosticsTestWithJsStdLib should use proper language version settings 2018-07-20 10:39:51 +03:00
Yan Zhulanow
63d37ec93b as33: Remove AndroidGradleOrderEnumerationHandler (should be moved to the Android plugin) 2018-07-19 19:09:40 +03:00
Yan Zhulanow
314cc5c2f5 Add support for Android Studio 3.3 Canary 1 2018-07-19 19:09:40 +03:00
Yan Zhulanow
315de660ca Minor: Make plugin.xml and build files more consistent with the main bunch 2018-07-19 19:09:40 +03:00
Yan Zhulanow
88422fb7ce Make source set empty for Android modules of deleting the resulting JAR files in 'ideaPlugin' task 2018-07-19 19:09:40 +03:00
Raluca Sauciuc
0e8a04c4ba as33: Android dependency reversal
(cherry picked from commit be781f4f462f74ca0efcc91b5c07a5b3756ba5b2)
2018-07-19 19:09:39 +03:00
Georgy Bronnikov
db19a6e150 Make @JvmOverloads work with JVM_IR 2018-07-19 18:36:37 +03:00
Yan Zhulanow
1eb69a6960 Kapt: Do not add JDK jars if the 'no-jdk' option is set (KT-25258) 2018-07-19 17:31:25 +03:00
Nikolay Krasko
bdbe6d617c Remove setting kotlin internal mode in pill configurations 2018-07-19 16:37:28 +03:00
Denis Zharkov
f72aa78eec Fix libraries analysis for case of isReleaseCoroutines feature enabled
#KT-25466 In Progress
2018-07-19 16:19:04 +03:00
Nikolay Krasko
f1463b4a2e Add version replace fix for kotlinx coroutines in Maven (KT-25251) 2018-07-19 16:09:57 +03:00
Nikolay Krasko
481c428881 Add version replace fix for kotlinx coroutines in Gradle (KT-25251)
#KT-25251 In Progress
2018-07-19 16:09:57 +03:00
Nikolay Krasko
86a33defd8 Refactoring: introduce parameter for getResolvedKotlinStdlibVersionByModuleData 2018-07-19 16:09:56 +03:00
Nikolay Krasko
7358cc5bd6 Fix QuickFix-es with the same family name should be the same class instances (KT-25251)
#KT-25251 In Progress
2018-07-19 16:09:56 +03:00
Nikolay Krasko
adfa469b21 Maven inspection for incompatible coroutines libraries (KT-25251)
#KT-25251 In Progress
2018-07-19 16:09:56 +03:00
Nikolay Krasko
3bb9288e86 Refactoring: remove ProgressManager.progressIndicator usages 2018-07-19 16:09:55 +03:00
Alexey Sedunov
652d074bca Misc: Change display name of Kotlin/Protractor run configuration type
#KT-25595 Fixed
2018-07-19 15:20:51 +03:00
Ilmir Usmanov
0ed5ec868c Generate probeCoroutineSuspended call in suspendCoroutineUninterceptedOrReturn
#KT-25508: Fixed
2018-07-19 14:24:09 +03:00
Dmitry Savvinov
76c651421b Deprecate visibility of static members inherited from Java
Now they are not visible by short name through companion objects, just
like classifiers in KT-21515

^KT-25333 In progress
2018-07-19 13:32:38 +03:00
Dmitry Savvinov
63202fe560 Minor: spelling fixes in javadocs 2018-07-19 13:32:37 +03:00
Dmitry Petrov
99a71b9ecc Desugar synthetic Java properties in psi2ir 2018-07-19 12:34:45 +03:00
Dmitry Petrov
44962b00b2 Introduce SyntheticPropertyDescriptor interface 2018-07-19 12:34:45 +03:00
Dmitry Petrov
4061a36506 Minor: reformat 2018-07-19 12:34:45 +03:00
Dmitry Petrov
76bfb94538 Add tests for Java synthetic properties in external dependencies 2018-07-19 12:34:45 +03:00
Mikhael Bogdanov
56c535d505 Fix test data 2018-07-19 10:52:13 +02:00
Roman Elizarov
f5193802fc Uncommented coroutines tests that were failing due to inline class bugs 2018-07-19 10:32:55 +03:00
Yan Zhulanow
094cb6be1d Pill: Add an order entry for module's sources 2018-07-18 22:05:36 +03:00
Yan Zhulanow
2049d00ca8 Pill: Fix packages to find tests in for default test run configurations 2018-07-18 22:05:36 +03:00
Yan Zhulanow
e243dd18c1 Pill: Add "-Duse.pill=true" parameter to the default test configurations
This switches 'JUnit3RunnerWithInners' to the JPS mode.
2018-07-18 22:05:36 +03:00
Yan Zhulanow
af2f5549c5 Debugger: Do not report division by zero also for rem 2018-07-18 22:05:36 +03:00
Alexander Udalov
1464a4ac58 Load Java parameter names correctly in BinaryJavaMethod
PSI-based implementation (accessible via
`-Xuse-old-class-files-reading`) loads parameter names from the
"MethodParameters" attribute if it's present, so our own implementation
should as well.

This metadata doesn't seem supported in the java.lang.model.element API
though, so SymbolBasedValueParameter (which is used in `-Xuse-javac`)
will continue to have incorrect behavior for now

 #KT-25193 Fixed
2018-07-18 18:15:09 +02:00
Alexander Udalov
0f0602230a Fix parameter names of Java inner classes in reflection
#KT-25541 Fixed
2018-07-18 18:15:09 +02:00
Alexander Udalov
873e1b01d6 Merge and improve tests on Java parameter metadata in reflection 2018-07-18 18:15:08 +02:00
Alexander Udalov
5fbe35d1c8 Add tests on RequireKotlin on nested classes with metadata version 1.4 2018-07-18 17:59:37 +02:00
Alexander Udalov
ea3c5c0107 Use -Xmetadata-version in tests instead of custom preprocessing
Test data for the wrongMetadataVersion test has changed because now not
only the .class files have the "future" version, but also the
.kotlin_module file, which prevents the current compiler from being able
to read what parts does a package in the library consist of. This is
related to the TODO in ModuleMapping.kt:89
2018-07-18 17:59:37 +02:00
Alexander Udalov
871b896a21 Add internal compiler argument to change metadata version
Will be used in tests to check how we behave on binaries produced by a
"future" compiler
2018-07-18 17:59:37 +02:00
Alexander Udalov
cfc0f5e453 Support correct way of writing/loading version requirement table
Tests are added in subsequent commits.

KT-25120 Fixed
2018-07-18 17:59:37 +02:00
Alexander Udalov
4122021090 Add BinaryVersion to DeserializationContext
This will be useful to implement version-dependent deserialization,
which is needed for gradual fixes of issues in metadata

 #KT-25120 In Progress
2018-07-18 17:58:46 +02:00
Alexander Udalov
1e9694f1db Fix version requirement serialization for nested classes
Use the version requierement table of the outer DescriptorSerializer
instance when serializing metadata for a class. Pass parent serializer
to DescriptorSerializer.create to make sure the correct table is used.
Serialize nested classes before the outer class in JS and common code,
to make sure requirements are not lost. Also, split
VersionRequirementTest to JVM and JS

 #KT-25120 In Progress
2018-07-18 17:58:46 +02:00
Ilya Chernikov
a61de052c7 Do not throw on incompatible cli scripting plugin
More reliably fixes #KT-24946, #KT-24438 and alike
2018-07-18 15:15:41 +02:00
Roman Artemev
e4b314c26c Fix inlining of invoke operator [#KT-25474]
* add test
2018-07-18 16:12:41 +03:00
Dmitry Petrov
a457a9f870 Update testData for IDEA tests for annotations with target EXPRESSION 2018-07-18 15:56:11 +03:00
Svyatoslav Kuzmich
b23dabb8b7 Revert EXPECTED_REACHABLE_NODES for failed tests 2018-07-18 15:31:29 +03:00
Dmitry Petrov
82f22f92ca Don't generate ConstantValue for non-const vals in Kotlin 1.3+ 2018-07-18 15:02:54 +03:00
Georgy Bronnikov
7640b7f63a Stylistic changes suggested in review for @JvmStatic 2018-07-18 14:29:03 +03:00
Alexander Udalov
1e675bdc01 Simplify implementation of JvmField property in interface companion
Move parts of the logic to the only places where they're needed:
checking for public/final/val is only needed in
JvmFieldApplicabilityChecker, checking the proto flag is only needed in
reflection, checking the JvmField annotation presence is only needed in
backend
2018-07-18 13:24:45 +02:00
Alexander Udalov
79c2aa4acf Minor, move tests on JvmField into subdirectory 2018-07-18 13:24:45 +02:00
Alexander Udalov
715abda908 Add JvmFlags, use flags field instead of is_moved_from_interface_companion
To be able to add more property-related flags into the same int field
later
2018-07-18 13:24:44 +02:00
Dmitry Petrov
5767f84c0e Restrict retention for annotations with target EXPRESSION
#KT-13762 Fixed
2018-07-18 14:21:03 +03:00
Ilya Chernikov
70eaa0ec75 Cleanup annotations in script-util:
remove unused targets and runtime retention
2018-07-18 13:11:32 +02:00
Roman Elizarov
20c255948a Coroutines migration adapters 2018-07-18 12:29:17 +03:00
Dmitry Petrov
ebe3fca45c Enable ProperIeee754Comparisons in "progressive mode"
See https://youtrack.jetbrains.com/issue/KT-22723#focus=streamItem-27-2917037-0-0
2018-07-18 12:10:10 +03:00
Denis Zharkov
cc2280b95b Fix test data after 89d99e3989 2018-07-18 11:14:46 +03:00
Mikhail Zarechenskiy
48606ad983 Advance bootstrap to 1.2.70-dev-491 2018-07-18 11:05:09 +03:00
Mikhael Bogdanov
bca6b98ea8 Fix test data 2018-07-18 08:41:48 +02:00
Mikhail Zarechenskiy
bb575866cb Pass actual invoke parameters for inline functions with inline classes
#KT-25511 Fixed
2018-07-17 23:39:38 +03:00
Mikhail Zarechenskiy
77959247d2 Fix bridge generation for inline classes over Any type 2018-07-17 23:39:34 +03:00
Ilmir Usmanov
4811757d8d Disable intercepted instrinsic in 1.3
Fix compiler bootstrapping.
2018-07-17 22:25:43 +03:00
Nicolay Mitropolsky
a616f6cca9 Uast: implicit receiver for local function calls (KT-25524) 2018-07-17 21:41:03 +03:00
Nicolay Mitropolsky
5212728a82 Uast: implicit receiver for function variables calls (KT-25524) 2018-07-17 21:41:03 +03:00
Alexander Udalov
53a57e8e1b Reformat module 'deserialization', fix warnings/inspections 2018-07-17 20:26:31 +02:00
Alexander Udalov
ae6627fe94 Simplify code in JS serialization related to module descriptors
Do not use `JsModuleDescriptor<...>` where only its `data` is needed
2018-07-17 20:26:31 +02:00
Alexander Udalov
77405b2cca Reformat module 'js.serializer' 2018-07-17 20:26:31 +02:00
Yan Zhulanow
37411c823d Android Extensions: Check the backing 'virtualFile' validity before calling 'findFile()' (EA-124028) 2018-07-17 20:54:30 +03:00
Yan Zhulanow
a4b3653e1c Debugger: Navigate to the right file in MPP projects (#KT-25152, #KT-25147) 2018-07-17 20:54:29 +03:00
Yan Zhulanow
02ee3aef3f Kapt: Fix "Unknown option: infoAsWarnings" (#KT-25396) 2018-07-17 20:54:28 +03:00
Svyatoslav Kuzmich
1abb4f42ac [JS IR BE] Add ranges to runtime, rangeTo for primitive numbers 2018-07-17 20:18:29 +03:00
Pavel V. Talanov
4c38899a2a Improve error message on failing to get javaResolutionFacade 2018-07-17 17:37:22 +02:00
Pavel V. Talanov
770c280ba5 Light classes: handle broken context in case of supertype delegation
This lead to an exception being thrown frequently
Proper fix would be to prevent binding context from being corrupted
Known cases are hard to debug/reproduce

 #EA-101081 Fixed
2018-07-17 17:37:20 +02:00
Ilmir Usmanov
991b4251f3 Remove redundant RequireKotlin annotations from coroutines' stdlib. 2018-07-17 17:31:03 +03:00
Ilmir Usmanov
38c4006d9e Update bootstrap compiler. 2018-07-17 17:30:58 +03:00
Dmitry Savvinov
db1fc7f358 Use 'stableName' instead of 'name' in tests on module name 2018-07-17 17:14:22 +03:00
Mikhael Bogdanov
52b261e19e Fix test data 2018-07-17 13:30:43 +02:00
Alexander Udalov
bca3e1b95b Restore getDefaultImports for compatibility with an external plugin
(see ce34deb9af)
2018-07-17 12:48:43 +02:00
Roman Elizarov
2236049341 Wrapper for suspend fun main and @Test suspend fun testXXX functions. 2018-07-17 12:15:02 +03:00
Roman Elizarov
d33d21907d SuccessOrFailure test on JVM added 2018-07-17 12:15:01 +03:00
Roman Elizarov
0b59061bfe Coroutines debug probes 2018-07-17 12:15:01 +03:00
Roman Elizarov
78192ea712 Fixed createCoroutineFromSuspendFunction
Passes an object that extends BaseContinuationImpl to the
suspend function invocation, so that it can use .intercepted on it.
This requires implementation to track its state via label variable.
2018-07-17 12:14:59 +03:00
Roman Elizarov
d3982472a4 Explanatory comment to createCoroutineFromSuspendFunction 2018-07-17 11:28:48 +03:00
Roman Elizarov
96b5bb1b31 Fixed JVM Serialization problems:
* EmptyCoroutineContext readResolve fixed
* CombinedContext.writeReplace serializes all context elements
2018-07-17 11:28:38 +03:00
Roman Elizarov
e0f6165f10 Updated SuccessOrFailure:
* Parameter names for lambda
* getOrElse takes exception parameters
* fold added
* Improved docs
2018-07-17 11:26:49 +03:00
Nikolay Krasko
2a6dfba8bc Check kotlinx.coroutines libraries used with Kotlin 1.3 in Gradle (KT-25251)
#KT-25251 In Progress
2018-07-17 02:46:34 +03:00
Nikolay Krasko
f9de91016a Inspection for experimental coroutines imports migration (KT-25251)
#KT-25251 In Progress
2018-07-17 02:22:14 +03:00
Nikolay Krasko
5b34498162 Do not report code style warnings on overridden declarations (KT-25416)
#KT-25416 Fixed
2018-07-17 02:22:14 +03:00
Mikhail Zarechenskiy
b6db8971e4 Warn about annotations that targets non-existing accessors
#KT-15453 In Progress
2018-07-17 00:22:53 +03:00
Dmitry Savvinov
70144f8003 Make warning about usage of -XX-flags less scary 2018-07-16 18:49:21 +03:00
Dmitry Savvinov
9634734abf Minor: fix kdoc of LanguageFeature.Kind 2018-07-16 18:49:20 +03:00
Pavel V. Talanov
48a38f1820 Do not try inexact resolve on scripts
Script light psi depends on script definition
    which is costly to compute correctly

 #KT-25395 Fixed
2018-07-16 16:25:18 +02:00
Mikhael Bogdanov
5b8df2f6f2 Use proto flag to determine companion field moved to interface 2018-07-16 16:13:18 +02:00
Mikhael Bogdanov
e00b7a993f Write version requirements for @JvmField in interface companion 2018-07-16 16:13:18 +02:00
Mikhael Bogdanov
b412c90cef Move version requirements serialization for @JvmDefault to JvmSerializerExtension 2018-07-16 16:13:17 +02:00
Mikhael Bogdanov
0ca3afbb34 Code clean after converion 2018-07-16 16:13:17 +02:00
Mikhael Bogdanov
8633e8b329 Convert JvmSerializerExtension to Kotlin 2018-07-16 16:13:16 +02:00
Mikhael Bogdanov
ac7f33a9b5 Rename JvmSerializerExtension.java to JvmSerializerExtension.kt 2018-07-16 16:13:16 +02:00
Mikhael Bogdanov
1d283d243e Support @JvmField on interface properties
#KT-15807 Fixed
2018-07-16 16:13:15 +02:00
Mikhael Bogdanov
719c1882e0 Add new flag to proto for field moved out from interface companion 2018-07-16 16:13:14 +02:00
Mikhael Bogdanov
f3b419377b Minor. Reformat 2018-07-16 16:13:14 +02:00
Alexey Sedunov
65e763d562 Misc: Fix flaky test failing due to unstable ordering of libraries 2018-07-16 16:12:23 +03:00
Ilmir Usmanov
8fa3584c5c Minor. Fix test 2018-07-16 15:09:23 +03:00
Ilmir Usmanov
bc4a7aec76 Remove suspendCoroutineOrReturn intrinsic from compiler
#KT-21240: Fixed

Also, change logic of intrinsics check.

 #KT-23438: Fixed
2018-07-16 15:09:18 +03:00
Alexander Udalov
f766b2c473 Improve "optimize imports" behavior on default imports
Optimize imports to classes when there's an import of a type alias to
that class with the same name. This results in "java.lang.*" imports
being optimized in favor of the corresponding type aliases in "kotlin.*"
which are imported by default
2018-07-16 13:45:11 +02:00
Alexander Udalov
ce34deb9af Delete DefaultImportProvider, refactor TargetPlatform.defaultImports 2018-07-16 13:45:11 +02:00
Alexander Udalov
1f0fb4823f Simplify DefaultImportProvider, introduce "low priority imports"
Previously, packages `java.lang` and `kotlin.jvm` were imported on JVM
by default on the same rights, causing problems when the same classifier
existed both in `java.lang` and `kotlin.jvm`. Since the only known case
of such conflict were type aliases to JVM classes, the corresponding
classes (expansions of those type aliases) were manually excluded from
default imports. This made the code in DefaultImportProvider complicated
and resulted in multiple problems, regarding both correctness and
performance (see 82364ad3e5, a9f2f5c7d0, dd3dbda719).

This change adds a new concept, a "low priority import", and treats
`java.lang` as such. Since these imports are now separated from the rest
of default imports in LazyImportScope via secondaryClassImportResolver,
conflicts between classifiers are handled naturally: the one from
`kotlin.jvm` always wins (unless the one from `java.lang` is imported
explicitly, of course). This approach is simpler, safer and does not
require any memory to cache anything.

Skip ResolveToJava.kt test for javac-based resolve; it now fails because
of a weird issue which I didn't have time to investigate (this is OK
because it's a corner case of an experimental functionality)
2018-07-16 13:45:11 +02:00
Mikhail Zarechenskiy
857cc0f728 Make tests about mod and varargs valid for 1.3 version 2018-07-16 14:01:59 +03:00
Alexander Udalov
f03dc62173 Ignore tests on big function types until master is 1.3 2018-07-16 11:11:35 +02:00
Alexander Udalov
dcbb8045bd Disallow function types with big arity on JVM if LV < 1.3 or API < 1.3
The implementation is a bit obscure because this worked on JS since
Kotlin 1.0 and we should not break that; however, on JVM, a diagnostic
will be reported with old language/API version

 #KT-25241 Fixed
2018-07-16 10:41:27 +02:00
Alexander Udalov
56f509ba09 Support function types with >= 23 parameters
See https://github.com/Kotlin/KEEP/issues/107

 #KT-13764 Fixed
2018-07-16 10:41:27 +02:00
Max Medvedev
5c8afea68e Completion fallback to DescriptorToSourceUtilsIde.getAnyDeclaration
That's in case if DescriptorToSourceUtils.getSourceFromDescriptor fails

#KT-22373 Fixed
2018-07-14 15:17:03 +03:00
Zalim Bashorov
74df1208ae Make "localClassCaptureExtensionReceiver" test more robust and mute it for JS IR BE 2018-07-13 23:42:41 +03:00
Zalim Bashorov
3f0b31dc23 Speed up JS IR BE tests compiling the common parts (runtime + test common utils) once (on demand) and sharing the result between tests
It's a temporary hack until we implement IR based library format.
It relies on the fact that currently, IR BE generates stable (enough) names.​
2018-07-13 23:42:41 +03:00
Zalim Bashorov
34758110ee JS IR test runner: collect all .kt files from the "irRuntime" dir automatically instead of declaring each one in the list 2018-07-13 23:42:40 +03:00
Nikolay Krasko
dfcc41ebb0 Fix source position NPE (EA-118863) 2018-07-13 20:00:05 +03:00
Nikolay Krasko
f1c87376b9 Another NPE in PlainTextPasteImportResolver.kt (EA-91517) 2018-07-13 20:00:05 +03:00
Nikolay Krasko
5e35fd1758 Check created javaFileFacadeFqName short name (EA-122324) 2018-07-13 20:00:05 +03:00
Nikolay Krasko
819f6c036b Add '//' char to identifier validity check 2018-07-13 20:00:05 +03:00
Nikolay Krasko
ee5d357336 Guard PatternConfigurationProducer usages with JUnit presence check (EA-122472) 2018-07-13 20:00:04 +03:00
Nikolay Krasko
752cdedfe2 Stop reporting "using default platform" messages to log (KT-15300)
#KT-15300 Fixed
2018-07-13 20:00:04 +03:00
Alexander Udalov
dec003af71 Minor, improve wording in exception message 2018-07-13 18:45:44 +02:00
Alexander Udalov
66b383349f Fix regression in reflection on looking up equals/hashCode/toString in interface
Caused by 4266e50be8 and 8ccbbf71ec. Previously it worked because we
used hardcoded signatures of equals/hashCode/toString and always looked
them up in java.lang.Object

 #KT-25404 Fixed
2018-07-13 18:45:44 +02:00
Alexander Udalov
1f4dfbf5f3 Fix compilation of Java 9 sources for kotlin-reflect-api
Do not pass the jars for modules such as descriptors, descriptors.jvm,
etc to `--module-path` because javac assumes that these are separate
modules (even though they're listed later as parts of this module in
`--patch-module), and prohibits to have split packages and foreign
service implementations among them
2018-07-13 18:45:09 +02:00
Alexander Udalov
0d03d5abf6 Regenerate tests 2018-07-13 18:40:31 +02:00
Denis Zharkov
89d99e3989 Refine diagnostics for nullability migration warnings
#KT-24911 Fixed
2018-07-13 17:51:21 +03:00
Georgy Bronnikov
f85030b1e6 Remove a file added by mistake 2018-07-13 16:16:39 +03:00
Mikhail Zarechenskiy
820d168607 First, check for inline class type before boxing
The problem was that if `type` is of primitive type, but `KotlinType` is
 actually an inline class type, then anyway we boxed this type as primitive
2018-07-13 15:48:21 +03:00
Nicolay Mitropolsky
3c71761cf3 lightAnnotations: check element validity before resolving call 2018-07-13 15:46:44 +03:00
Nicolay Mitropolsky
cedc6821c3 lightAnnotations: proper parents for KtLightAnnotationsValues 2018-07-13 15:45:30 +03:00
Georgy Bronnikov
8478c73434 Make @JvmStatic work on JVM_IR 2018-07-13 13:43:02 +03:00
Toshiaki Kameyama
2547612d54 Implement Smart Enter handler for value argument list (KT-18807)
#KT-18807 Fixed
2018-07-13 13:04:19 +03:00
Natalia Selezneva
25cc85241f 172: Fix absent method in 172 branch 2018-07-13 12:02:08 +03:00
Natalia Selezneva
68ffcdc653 182: Fix imports in 182 branch 2018-07-13 11:33:10 +03:00
Natalia Selezneva
6835e5dd6f Wraps syncPublisher() call in KotlinCompilerSettings in a dispose check
Fix ConfigureKotlinTest
2018-07-13 09:50:42 +03:00
Mikhail Zarechenskiy
ef2095e4d3 Mute tests about unsigned types for JS backend 2018-07-13 00:27:12 +03:00
Yan Zhulanow
a464cc7f28 Minor: Do not report stack traces about PCE to the debug log 2018-07-12 20:36:42 +03:00
Yan Zhulanow
2070d40963 Minor: Move safeSourceName to utils, make it a function 2018-07-12 20:36:41 +03:00
Yan Zhulanow
423bd573a3 Kapt: Do not add imports for overloaded callables (#KT-25071) 2018-07-12 20:36:41 +03:00
Yan Zhulanow
00edc007f8 Minor: Fix the "Could not find installation home path" terminal warning 2018-07-12 20:36:41 +03:00
Yan Zhulanow
f6afab1226 Minor: Remove an obsolete warning in Android subplugin 2018-07-12 20:36:41 +03:00
Yan Zhulanow
22cfde3d43 Debugger: Check if the class instance is not yet collected before usage (EA-118758) 2018-07-12 20:36:41 +03:00
Yan Zhulanow
a2fdf7d47d Evaluator: Support when expressions (EA-119639) 2018-07-12 20:36:41 +03:00
Yan Zhulanow
c749a222eb Debugger: Add a missing read action (EA-119592) 2018-07-12 20:36:41 +03:00
Yan Zhulanow
2203615085 Check if the stackFrame we use is valid (EA-120312)
Unfortunately, the 'isValid' is a private field in StackFrameImpl so we have to catch an exception with an empty catch block.
2018-07-12 20:36:41 +03:00
Yan Zhulanow
cf3550b139 Add a number of runReadAction() in debugger (EA-120985) 2018-07-12 20:36:40 +03:00
Yan Zhulanow
115356b990 Eval4J: Do not report certain kinds of exceptions to EA 2018-07-12 20:36:40 +03:00
Yan Zhulanow
d8bab58b2c Minor: Fix exception message 2018-07-12 20:36:40 +03:00
Yan Zhulanow
d6db9e8f6f Evaluator: Do not report division by zero (EA-122365) 2018-07-12 20:36:40 +03:00
Yan Zhulanow
f16da8c566 Debugger: Add a missing read action (EA-123238) 2018-07-12 20:36:40 +03:00
Yan Zhulanow
6392adcfc9 Kapt: Ensure we collect .java files from the unique directories (#KT-24963) 2018-07-12 20:36:40 +03:00
Yan Zhulanow
20299f6224 Pill: Allow '18x-SNAPSHOT' versions 2018-07-12 20:36:40 +03:00
Yan Zhulanow
778df36dfa Debugger: Exclude inline callable usages inside itself (EA-117459) 2018-07-12 20:36:39 +03:00
Yan Zhulanow
6e3c2e8015 Revert "Android Extensions: Allow to access library project resources in Gradle setup (#KT-22430)"
This reverts commit a70707b
2018-07-12 20:36:39 +03:00
Raluca Sauciuc
e0137ed1d5 Android Extensions: make synthetic import resolution more resilient
In commit ec0abb0 (Fix EA-79206: Process only valid layout.xml...) we
started to drop layouts with invalid PsiFiles during resolution of
(synthetic) package fragments.

In Android Studio we run into invalid files quite often, and it seems
to be caused by a race with some invokeLater'ed code from android-ndk;
this has the side effect of now showing all the corresponding symbols
as unresolved, and the imports themselves are suggested for removal.

As a temporary fix I propose we try again to get a valid PsiFile.

Bug: https://issuetracker.google.com/78547457
(cherry picked from commit 3e8789225bd653caaedeca7f761a6442d48214b0)
2018-07-12 20:36:39 +03:00
Raluca Sauciuc
e7c1f578d1 Recognize Instant Apps plugin
Tested with sample project and Studio 3.2 Canary 18:
https://github.com/googlesamples/android-instant-apps/tree/master/hello-kotlin

(cherry picked from commit 528d66d5840cc8f584270c516e85da1a632df8b8)
2018-07-12 20:36:39 +03:00
Yan Zhulanow
392460e426 Kapt: Allow to disable info->warning mapping in logger (#KT-24985) 2018-07-12 20:36:39 +03:00
Yan Zhulanow
8b3aa3dc7f as32: Kapt: 'kapt.kotlin.generated' is not marked as source root in Android Studio (#KT-24449) 2018-07-12 20:36:39 +03:00
Yan Zhulanow
b2938ceacf Remove Gradle(Java) Kotlin configurator in Android modules (#KT-17946) 2018-07-12 20:36:39 +03:00
Yan Zhulanow
06af2a88f0 Uast: Move all IDE-related code to uast-idea, get rid of the 'idea' dependency
Uast is used in the CLI version of Android Lint so 'uast-kotlin' should run correctly even without IDE.
2018-07-12 20:36:39 +03:00
Yan Zhulanow
8d9c53da92 Kapt: Allow to disable warning for 'annotationProcessor' dependencies (#KT-24883) 2018-07-12 20:36:38 +03:00
Yan Zhulanow
57133af5f9 Pill: Support Android Studio bunches in "IDEA" run configuration 2018-07-12 20:36:38 +03:00
Yan Zhulanow
e958a9771f Extract refactoring: Make an extracted function 'inline' if any of its type parameters are reified (#KT-23983) 2018-07-12 20:36:38 +03:00
Yan Zhulanow
90bffbf4c8 Minor: Fix test data for Parcelize annotation checker 2018-07-12 20:36:38 +03:00
Yan Zhulanow
88c9d7e383 Parcelize: Recognize '@IgnoredOnParcel' with @get: use-site annotation target 2018-07-12 20:36:38 +03:00
Yan Zhulanow
26ca7a140d Parcelize: Generate non-final 'writeToParcel()' and 'describeContents()' (#KT-24720) 2018-07-12 20:36:38 +03:00
Yan Zhulanow
adf3057fea Parcelize: Fix Parcelize box tests 2018-07-12 20:36:38 +03:00
Yan Zhulanow
3c1c776cdb Parcelize: Check @IgnoredOnParcel annotation usage (#KT-24459) 2018-07-12 20:36:38 +03:00
Yan Zhulanow
ee37bcf14b Parcelize: Serialize primitive arrays correctly when the custom parceler is provided.
This fixes failing 'customSerializerBoxing' test.
2018-07-12 20:36:37 +03:00
Yan Zhulanow
defe97e4ef Parcelize: Always map primitive array element types as boxed types for Array<T> (#KT-23808) 2018-07-12 20:36:37 +03:00
Yan Zhulanow
d5f0495031 Parcelize: Support objects and enums (#KT-22576) 2018-07-12 20:36:37 +03:00
Mikhail Zarechenskiy
4e3674b330 Fix for-in iterator over list of boxed inline class values
#KT-25325 Fixed
2018-07-12 18:53:30 +03:00
Mikhail Zarechenskiy
0308e10c11 Fix for-in iterator over array of boxed inline class values
#KT-25324 Fixed
2018-07-12 18:53:24 +03:00
Mikhail Zarechenskiy
584c888e5b Fix exception from UAST: don't use constant of error type
#EA-121947 Fixed
2018-07-12 16:12:49 +03:00
Ilya Gorbunov
ed7f7ba737 Assigning single value to varargs is prohibited, use arrayOf 2018-07-12 14:33:15 +03:00
Anton Bannykh
d042038045 JS IR: mute tests with language version 1.0
Long.rem declaration doesn't compile
2018-07-12 14:18:34 +03:00
Anton Bannykh
6a9b8d27e6 JS: update DCE test data 2018-07-12 14:18:34 +03:00
Anton Bannykh
cf9ad635e1 JS: add more tests 2018-07-12 14:18:34 +03:00
Anton Bannykh
0579b52d6b JS: enabled codegen box tests for release coroutines 2018-07-12 14:18:34 +03:00
Anton Bannykh
99ac43eb84 JS: implement release coroutines in stdlib 2018-07-12 14:18:34 +03:00
Anton Bannykh
2604da6f0e Advance bootstrap to 1.2.70-dev-258 2018-07-12 14:18:34 +03:00
Nikolay Krasko
5bfb35c8aa Revert "Add knowledge about eap-1.3 channel to plugin (KT-25414)"
It's decided to migrate to scheme with two predefined channels:
`eap` and `eap-next`.

This reverts commit 4f1f1e6
2018-07-12 13:32:19 +03:00
Sergey Rostov
c8d85150de ReplOutputHandler: log xml parsing exception cause (EA-103447) 2018-07-12 10:26:37 +03:00
Natalia Selezneva
79a80ce8de Use new syntax for '.gradle.kts' files in AddKotlinLibQuickFix
^KT-25403 Fixed
2018-07-12 10:03:40 +03:00
Natalia Selezneva
e395a32734 Add quickfix to adding kotlin-script-runtime.jar to classpath
^KT-25402 Fixed
2018-07-12 10:03:35 +03:00
Simon Ogorodnik
75fa02646b EA-109046: Add diagnostic to catch NPE 2018-07-11 20:50:02 +03:00
Nikolay Krasko
4f1f1e66eb Add knowledge about eap-1.3 channel to plugin (KT-25414)
#KT-25414 Fixed
2018-07-11 17:25:30 +03:00
Natalia Selezneva
d241c092e2 Fix deadlock in ScriptTemplatesFromCompilerSettingsProvider
^KT-25373 Fixed
2018-07-11 16:23:58 +03:00
Svyatoslav Kuzmich
7bf2cd8054 [JS IR BE] Fix lost toLong conversions during merge 2018-07-11 16:16:50 +03:00
Mikhael Bogdanov
9cf9cb3ecd Fix KotlinType building by IrType: don't miss type parameters of outer for inner class
#KT-25405 Fixed
2018-07-11 15:12:43 +02:00
Anton Bannykh
9c6452778f JS IR: unmute tests 2018-07-11 15:25:41 +03:00
Anton Bannykh
ac1a97ad83 JS IR: unmute tests 2018-07-11 14:49:36 +03:00
Anton Bannykh
9e9b27fe79 JS IR: bug fixes 2018-07-11 14:49:36 +03:00
Anton Bannykh
9233e6c176 JS IR: char (always boxed for now) 2018-07-11 14:49:36 +03:00
Nikolay Krasko
d709b03160 Load/Save for old Intellij formatting settings (KT-22252)
#KT-22252 In Progress
2018-07-11 14:25:24 +03:00
Nikolay Krasko
6a4d2c1fdb Predefined obsolete code style (KT-22252)
#KT-22252 In Progress
2018-07-11 14:25:24 +03:00
Nikolay Krasko
b51880332e Migration inspection for fromClosedRange() call (KT-17176)
#KT-17176 Open
2018-07-11 14:25:24 +03:00
Ilmir Usmanov
6ba2baa9da Deserialize constructors and properties with version requirement 1.3
if they have suspend function type in their descriptors.
Also, review fixes.

 #KT-25256: Fixed
2018-07-11 14:20:46 +03:00
Ilmir Usmanov
c460593b7d Forbid coroutines in language version is 1.3 and api version is less 2018-07-11 14:20:45 +03:00
Ilmir Usmanov
03c50ea139 Add test for calling release coroutine from experimental one 2018-07-11 14:20:44 +03:00
Ilmir Usmanov
cbb81a343c Minor. Move experimental warning disabling to appropriate places. 2018-07-11 14:20:44 +03:00
Ilmir Usmanov
524cc3ffe4 Forbid old coroutineContext deserialization. Fix suspend function deserialization 2018-07-11 14:20:43 +03:00
Ilmir Usmanov
d13e2ef32e Add tests 2018-07-11 14:20:42 +03:00
Ilmir Usmanov
dbc3ddc578 Support loading function types 2018-07-11 14:20:41 +03:00
Ilmir Usmanov
5b7e099842 Read old suspend functions in 1.3 2018-07-11 14:20:41 +03:00
Mikhail Zarechenskiy
6b73e528ce Ignore test for JS IR because of TODO() function 2018-07-11 11:41:24 +03:00
Nicolay Mitropolsky
be611cd154 LightAnnotations don't try to get kotlinOrigin if not building from sources 2018-07-11 09:37:28 +03:00
Nicolay Mitropolsky
eaa58c3ec2 KtLightParameter should have a KtLightModifierList anyway
otherwise we wouldn't get proper annotations for `equals` in data-classes
2018-07-11 09:37:28 +03:00
Alexander Udalov
628833af65 Generate nullability annotations as non-runtime-retained
org.jetbrains.annotations.NotNull/Nullable have retention CLASS,
therefore they should appear in RuntimeInvisibleAnnotations

 #KT-22201 Fixed
2018-07-11 09:37:28 +03:00
Jake Wharton
2e4f3ced9b Add nullability annotations to data class equals and toString.
KT-22201
2018-07-11 09:37:28 +03:00
Mikhail Zarechenskiy
8d24ca65a3 Propagate KotlinType into when expression codegen
This commit removes unneeded boxing when result expression of `when` is
 value of inline class type
2018-07-10 23:10:57 +03:00
Zalim Bashorov
35b2b762cd Pill: fix name of ignored kotlin-scripting compiler plugin 2018-07-10 21:53:59 +03:00
Nikolay Krasko
a58acdd537 Fix suspend inlay tests after adding yield() from stdlib to ignore 2018-07-10 19:24:23 +03:00
Nikolay Krasko
cd8d6439aa Minor: add PsiTreeUtilKt#parentOfType to incompatible API 2018-07-10 19:24:22 +03:00
Ilya Gorbunov
5e5b9e5912 Fix incorrect parameter order in TestNG asserter
#KT-25351 Fixed
2018-07-10 19:12:21 +03:00
Mikhail Zarechenskiy
2be08f4d60 [NI] Fix exception, recorded type for function statement can be null
See `checkStatementType`, we return `null` to reduce count of errors.

 Also, note that named function which is used as last statement in lambda
 doesn't coerce to Unit, this is a separate bug and will be addressed later,
 see #KT-25383

 #EA-121026 Fixed
2018-07-10 17:41:17 +03:00
Mikhael Bogdanov
eb745133c9 Switch @JvmStatic diagnostic test to LanguageFeature usage 2018-07-10 16:04:30 +02:00
Alexander Udalov
e937fe8258 Move PackagePartProvider to module descriptors.jvm 2018-07-10 15:16:49 +02:00
Alexander Udalov
2cb4b7c6d4 Extract MetadataPartProvider out of PackagePartProvider 2018-07-10 15:16:49 +02:00
Alexander Udalov
e25bc2865f Remove PackagePartProvider from ResolverForProjectImpl
To be able to move it to JVM-specific modules, and to provide a
replacement for common module analysis
2018-07-10 15:16:49 +02:00
Mikhail Zarechenskiy
33bd1b23a2 Don't assign single elements to varargs as it's deprecated
See #KT-20171
2018-07-10 14:25:45 +03:00
Svyatoslav Kuzmich
77ad97a39e [JS IR BE] Bridges construction 2018-07-10 14:11:09 +03:00
Svyatoslav Kuzmich
a2f89cc711 [JS IR BE] Eqeq operator lowering. IntrinsicifyCallsLowering.kt refactoring 2018-07-10 14:11:08 +03:00
Anton Bannykh
d412b6f4d0 JS IR: tell CodeConformanceTest that longjs.kt does contain third-party copyright 2018-07-10 13:34:19 +03:00
Anton Bannykh
07b3b66fd9 JS IR: unmute tests 2018-07-10 13:34:19 +03:00
Anton Bannykh
65846d783d JS IR: Long 2018-07-10 13:34:19 +03:00
Anton Bannykh
4872c97929 JS: enable release coroutines 2018-07-10 13:11:39 +03:00
Nicolay Mitropolsky
f77e023210 fix ResolveElementCacheTest.kt compilation for 172 2018-07-10 12:11:59 +03:00
Georgy Bronnikov
8ce658ab54 Introduce -Xuse-ir flag for cli compiler 2018-07-10 10:05:06 +02:00
Nicolay Mitropolsky
be8740e0ee 172: KotlinUastApiTest.kt compilation fix 2018-07-10 10:28:30 +03:00
Ilya Chernikov
903e613bdd Fix script templates tests after updating definitions selection logic 2018-07-10 08:43:52 +02:00
Natalia Selezneva
5741f81f25 Fix AbstractScriptConfigurationTest
Add dependency on script runtime for module.
Provide default test script template thought template-classpath.
2018-07-10 08:43:52 +02:00
Natalia Selezneva
790188120a Add LightProjectDescriptor with script-runtime dependency. Use it in PsiChecker tests. 2018-07-10 08:43:52 +02:00
Natalia Selezneva
3b8bf3e74e Fix testdata fo IdeaModuleInfoTest: for script in module IdeaModuleInfo is created instead of ScriptModuleInfo.ForFile 2018-07-10 08:43:52 +02:00
Ilya Chernikov
b979f3dc52 Fix testdata 2018-07-10 08:43:52 +02:00
Ilya Chernikov
b83948f241 Drop support of KOTLIN_HOME environment variable in the command-line compiler
it is proved to be fragile and seems unnecessary at the moment
2018-07-10 08:43:52 +02:00
Ilya Chernikov
9549736d35 Fixes after review 2018-07-10 08:43:52 +02:00
Ilya Chernikov
5d597eb382 Fix configurations chaining in the script compiler 2018-07-10 08:43:52 +02:00
Ilya Chernikov
92d4d986c8 Take path to scripting plugin libs only from compiler jar path...
ignoring all "kotlin home" settings, since we need to load a compatible
plugin. Fixes #KT-24946
2018-07-10 08:43:51 +02:00
Ilya Chernikov
ec58929e39 Allow multiple same jsr305 options in the command-line
do not report duplicate jsr305 entries if options are the same
2018-07-10 08:43:51 +02:00
Ilya Chernikov
563e4c9e57 Add kts to supported file extensions to the DirtySourceFilesHolder as well
allows jps to compile scripts along with sources,
finally fixes #KT-22611
2018-07-10 08:43:51 +02:00
Ilya Chernikov
f39c6f3b7a Drop half-backed support of "dynamic" annotations on scripts...
leaving it in the history so it could be restored and finished, if needed
2018-07-10 08:43:51 +02:00
Ilya Chernikov
dee141b26b Add script constructor annotations inheritance 2018-07-10 08:43:51 +02:00
Ilya Chernikov
0f46f62232 Add script class annotations generation from the base class 2018-07-10 08:43:51 +02:00
Ilya Chernikov
edf13c022e Refactor script definitions loading and discovery:
Improve logic, code reuse and readability
Add support for more corner cases
Improve reporting
Add definitions loading test
2018-07-10 08:43:51 +02:00
Ilya Chernikov
fbbfe600ec Fix list of script definitions recognized by the asm-based loading:
fix of the previous fix to #KT-24926
2018-07-10 08:43:50 +02:00
Ilya Chernikov
199c3bce40 Fix explicit custom scripting definitions choice logic:
add standard script def after custom defs are processed
2018-07-10 08:43:50 +02:00
Ilya Chernikov
e17c36cf12 Improve automatic scripting plugin picking logic 2018-07-10 08:43:50 +02:00
Ilya Chernikov
4812fcf1ad Fix script definition discovery logic:
for cases when directory-based dependencies are passed and directories
with resources are different from directories with classes
Significant refactoring to make code prettier
2018-07-10 08:43:50 +02:00
Ilya Chernikov
56e9bfcd62 Fix default configuration refinement in scripts 2018-07-10 08:43:50 +02:00
Ilya Chernikov
befa94689a Return script instance from the evaluation in the basic jvm evaluator 2018-07-10 08:43:50 +02:00
Pavel Talanov
2ecddc996a Implement support for static resolving to scripts in source roots in IDEA 2018-07-10 08:43:50 +02:00
Ilya Chernikov
9453834fb1 Create proper constructor in script descriptor
allows to resolve calls to scripts in compiler (but not in the IDE yet)
Some refactorings on the way
2018-07-10 08:43:50 +02:00
Ilya Gorbunov
b7d3382f13 Report more diagnostics when JDK8PlatformImplementations can't be cast to base type
#EA-120914 - CCE: PlatformImplementationsKt.<clinit>
2018-07-09 22:13:57 +03:00
Ilya Gorbunov
35beb9698e Fix overflow in empty progressions' last element
#KT-24204 Fixed
2018-07-09 22:13:51 +03:00
Ilya Gorbunov
be8cb94105 Add failing tests for overflow in empty progressions KT-24204 2018-07-09 22:08:01 +03:00
Mikhail Zarechenskiy
14b8ff7d71 Load unsigned constants from class file with the use of expected type 2018-07-09 20:19:26 +03:00
Mikhail Zarechenskiy
9b6e8fa5d1 Do not recreate compile time initializer to avoid type info loosing
When we resolve arguments of annotation, expected type of parameters can
 be unknown. Therefore, if we'll try to load constants without expected type,
 info about unsigndness will be lost. For primitives it worked because we
 can differ type by its value
2018-07-09 20:19:25 +03:00
Mikhail Zarechenskiy
0c6757a8b0 Write is_unsigned flag into metadata for an annotation arguments
Instead of adding new kind of types, we'll use flag to disambiguate
 usual types from unsigned ones, this approach has two advantages:
 - less changes in the metadata format
 - it allows naturally extend format for unsigned arrays,
  which will be supported later

 #KT-25310 Fixed
 #KT-25273 Fixed
2018-07-09 20:06:05 +03:00
Mikhail Zarechenskiy
8c075bc622 Add ability to use unsigned types in LoadJava tests
This is a temporary solution, which will be completely removed in 1.3, see KT-25226
2018-07-09 20:05:38 +03:00
Nicolay Mitropolsky
dd0e3cd135 Uast: ULambdaExpression returns proper functionalInterfaceType for SamAdapterExtensionFunctionDescriptor (KT-25297) 2018-07-09 19:41:07 +03:00
Nicolay Mitropolsky
2c7687195c Uast: properly handling explicit SAM (KT-25297) 2018-07-09 19:41:07 +03:00
Nicolay Mitropolsky
38e2d474b7 Uast: create KotlinULambdaExpression for in-place lambdas (KT-25297)
and provide appropriate functionalInterface
2018-07-09 19:41:07 +03:00
Dmitry Savvinov
668bd209f2 Use -Xallow-kotlin-package while compiling common sources
K2MetadataCompiler doesn't perform explicit check of compilation of
'kotlin' package, thus stdlib build wasn't passing '-Xallow-kotlin-package'.

However, we have special hack for compiling stdlib with contracts: if
'-Xallow-kotlin-package' is passed, then allow compiling contracts for
custom functions. We have to do it this way, because we don't want
stdlib artifacts to be marked with pre-release flag, even though
contracts for custom functions are not enabled yet
(see eae9923dbe).

Therefore, it's crucial to pass -Xallow-kotlin-package properly for that
side-effect.
2018-07-09 18:57:58 +03:00
Dmitry Savvinov
2783e9939b Fix internal-visibility mangling in IDE
Collect module name properly from facets settings, using CLI arguments
which define module name ('-module-name' on JVM and Common,
'-output-file' on JS).

^KT-23668 Fixed
2018-07-09 18:50:50 +03:00
Dmitry Savvinov
04f12846f1 Minor: reformat ModuleDescriptorImpl.kt 2018-07-09 18:50:35 +03:00
Nikolay Krasko
b709012dea Minor: "Recheck now" -> "Check again" 2018-07-09 18:07:25 +03:00
Nikolay Krasko
aa21e9c3bc Show current Kotlin installed version in update form (KT-25255)
#KT-25255 Fixed
2018-07-09 18:07:25 +03:00
Nikolay Krasko
90f1829fb8 Minor: find tested element with <caret> in ResolveElementCacheTest.kt 2018-07-09 18:07:24 +03:00
Mikhael Bogdanov
66e68fbb53 Generate sam wrappers in inlined lambda in same way as in inline function
#KT-24825 Fixed
2018-07-09 15:52:54 +02:00
Alexey Tsvetkov
93e183c2e4 Test for KT-25051 2018-07-09 15:50:06 +03:00
Alexey Tsvetkov
f735586819 Remove redundant test
`testMultiModuleICNonAndroidModuleIsChanged` already tested
android and non-android change
2018-07-09 15:50:05 +03:00
Alexey Tsvetkov
5760b8cf8b Register kotlin_module as output of all files
Previously kotlin_module was registered as output
only for files containing top-level declarations
2018-07-09 15:48:11 +03:00
Alexey Tsvetkov
63b4302cea Always generate kotlin_module
#KT-25133 fixed
    #KT-25051 fixed
2018-07-09 15:48:11 +03:00
Denis Zharkov
4bf51af2fa Fix reference-public-api
It's necessary because of the changes in 3497880f203449121ea8035c49b792cc4dc53bd6
2018-07-09 15:27:19 +03:00
Denis Zharkov
0b3048f60a Replace trivial usages of suspendCoroutineOrReturn in tests
This is necessary since suspendCoroutineOrReturn gets removed in 1.3
2018-07-09 15:27:19 +03:00
Denis Zharkov
a23ce42c80 Replace a couple of usages of suspendCoroutineOrReturn in tests 2018-07-09 15:27:19 +03:00
Denis Zharkov
e753e0978f Fix dispatchResume.kt tests after suspendCoroutineOrReturn removal
To leave them COMMON_COROUTINES_TEST use suspendCoroutine instead
But, since it requires for continuation to be called externally
the tests are rewritten
2018-07-09 15:27:19 +03:00
Denis Zharkov
8c65e55c02 Fix some of the bytecodeText tests
The changes are necessary because of release coroutines support:
- Get rid of suspendCoroutineOrReturn calls. It's anyway irrelevant
to what is being tested here

- In varValueConflictsWithTable.kt, variables slots have been shifted
because the variable for continuation's exception was removed

- In varValueConflictsWithTableSameSort.kt, a variable has been introduced
to preserve the same slot numbers for old variables.
Otherwise, they become shifted and to the second slot,
and there are a lot of irrelevant "ALOAD 2" instructions

This change is another example of why bytecode text tests are evil
2018-07-09 15:27:19 +03:00
Denis Zharkov
820506d9c6 Fix tests after new Continuation API support
#KT-24863 Fixed
2018-07-09 15:27:19 +03:00
Denis Zharkov
170086250b Support new Continuation API in JVM BE
#KT-24863 Fixed
2018-07-09 15:27:19 +03:00
Denis Zharkov
aee0afbff1 Support CoroutineUtil.kt helpers within AbstractCompileKotlinAgainstKotlinTest 2018-07-09 15:27:19 +03:00
Denis Zharkov
f23a0c8fea Add ContinuationAdapter to coroutine tests helpers
It allows having the same Continuation implementations for different
API versions
2018-07-09 15:27:19 +03:00
Denis Zharkov
f01e690f49 Minor. Use coroutine test helpers for inline/diagnostics tests
It should help with decreasing test data copy-pasting when
testing against release / pre-release coroutines
2018-07-09 15:27:19 +03:00
Denis Zharkov
2c195555ad Minor. Reformat CoroutineCodegen.kt 2018-07-09 15:27:19 +03:00
Denis Zharkov
1ced127660 Minor. Move helpers for coroutines tests to kt-file 2018-07-09 15:27:19 +03:00
Roman Elizarov
3aa76c58fc Updated SuccessOrFailure class corresponding to KEEP-127 and docs. 2018-07-09 15:27:19 +03:00
Roman Elizarov
33f4a3fcbf Extracted BaseContinuationImpl 2018-07-09 15:27:19 +03:00
Roman Elizarov
38c17249b9 releaseInterceptedContinuation clarified and ref check in impl fixed 2018-07-09 15:27:19 +03:00
Roman Elizarov
d33409ff8a Fixed boxing of SuccessOrFailure inside SafeContinuation impl 2018-07-09 15:27:19 +03:00
Roman Elizarov
0370fac0b6 Further design improvements for coroutines 1.3 APIs
* Documentation improvements and clarification
* Dropped legacy intrinsic functions
* Remove context parameter default from Continuation builder function
2018-07-09 15:27:19 +03:00
Roman Elizarov
719d45510a Continuation builder function 2018-07-09 15:27:19 +03:00
Roman Elizarov
0b17c619bc Fixed ContinuationImpl.intercepted 2018-07-09 15:27:19 +03:00
Roman Elizarov
7513557315 Unroll recursion in resumeWith
Fixes KT-18987
2018-07-09 15:27:19 +03:00
Roman Elizarov
af9743709c Implement COROUTINE_SUSPENDED as a property with getter 2018-07-09 15:27:19 +03:00
Roman Elizarov
aaabfa6382 Missing SinceKotlin declarations added for resume extensions 2018-07-09 15:27:19 +03:00
Roman Elizarov
b06d626b21 releaseInterceptedContinuation and few other minor fixes 2018-07-09 15:27:19 +03:00
Roman Elizarov
8e2fae3322 More work on draft coroutines 1.3 ABI & API:
* SuspendFunction[01] interfaces removed, moved to RestrictedContinuationImpl
* validateContext introduced to check restricted coroutines
* Distinguish SuspendLambda as being lambda/coroutine and provide a separate
  toString implementation (draft) in its coroutine incarnation.
2018-07-09 15:27:19 +03:00
Roman Elizarov
29dcc4f18c Better support for mixed-version libs (override old method, too) 2018-07-09 15:27:19 +03:00
Roman Elizarov
8bbd78ca9a Draft Kotlin Coroutines 1.3 ABI & API:
* SuccessOrFailure inline class is introduced
* Continuation.resumeWith(SuccessOrFailure)
* createCoroutineUnintercepted
* [Restricted]ContinuationImpl as named suspending function base
* [Restricted]SuspendLambda as suspending lambda base
* SuspendFunction[01] interfaces for efficient createCoroutine
* Serializable coroutine classes
2018-07-09 15:27:19 +03:00
Alexander Podkhalyuzin
fb5e11dfc6 simple public interface is Java, not Kotlin
#KT-22823 Fixed
2018-07-09 15:23:52 +03:00
Alexander Podkhalyuzin
04fd4ef9de Do not stop recursive visitor with return
#KT-23627 Fixed
2018-07-09 15:19:38 +03:00
Simon Ogorodnik
2d4cbc712d KT-25012: Use index to check is java file selected instead of traversing file tree
Add initial estimation via fileType index

 #KT-25012 fixed
2018-07-09 14:37:11 +03:00
Alexander Podkhalyuzin
a92ce467a7 Fixed patchset branches 2018-07-06 18:31:21 +03:00
Alexander Podkhalyuzin
571fda0f45 Fixed deprecation of ConcurrentFactoryMap()
#KT-24892 Fixed
2018-07-06 17:20:46 +03:00
Mikhail Zarechenskiy
6dc36055b8 Make diagnostic about redundant spread in @Foo(s = *[A]) more clear 2018-07-06 15:54:23 +03:00
Mikhail Zarechenskiy
513b27f65f Make tests about varargs compatible with 1.2 and 1.3 versions 2018-07-06 15:23:33 +03:00
Mikhail Zarechenskiy
c032a02373 Prohibit assigning single elements into varargs in named form
#KT-20588 Fixed
 #KT-20589 Fixed
2018-07-06 15:23:31 +03:00
Alexander Udalov
959c2f4843 Get rid of split packages in descriptors, descriptors.jvm, deserialization
Also move some other files to related packages and reformat moved files
2018-07-06 14:08:35 +02:00
Natalia Selezneva
4b1ce15619 Run script dependencies update on editor focus change
^KT-24588 Fixed
2018-07-06 11:58:35 +03:00
Sergey Rostov
7408504356 Fix StringIndexOutOfBoundsException in KotlinConsoleFilterProvider.kt (EA-118757) 2018-07-06 11:35:26 +03:00
Denis Zharkov
0d00eb7de3 Add postfix template for listOf/setOf/etc
#KT-25239 Fixed
2018-07-06 10:06:56 +03:00
Denis Zharkov
4ab97e8454 Minor. Reformat org.jetbrains.kotlin.idea.codeInsight.postfix 2018-07-06 10:06:56 +03:00
Denis Zharkov
6f4aa2296d Implement quickfix wrapping elements in collection literal calls
#KT-25238 Fixed
2018-07-06 10:06:56 +03:00
Nikolay Krasko
189260c013 Remove old code style settings files 2018-07-05 16:15:37 +03:00
Nikolay Krasko
36933a52ec Remove code style settings irrelevant for Kotlin project 2018-07-05 16:15:36 +03:00
Ilmir Usmanov
bc8295b137 Minor: regenerate tests 2018-07-05 15:09:13 +03:00
Ilmir Usmanov
4ec82cad90 Minor: add test to call callable references from Java 2018-07-05 15:09:06 +03:00
Ilmir Usmanov
4e8cc53962 Minor: pass suspend flag to lambda's copy 2018-07-05 15:09:00 +03:00
Ilmir Usmanov
28ad498956 Use AnonymousFunctionDescriptor for suspend callable references
Also use it for local suspend functions, which allows us to remove hack
with dropSuspend.

Regenerate tests.
2018-07-05 15:08:49 +03:00
Ilmir Usmanov
eea95441c5 Add diagnostics tests. Forbid callable reference to coroutineContext
#KT-16908: Fixed
2018-07-05 15:08:42 +03:00
Ilmir Usmanov
f94b579d19 Implement callable references to suspend functions
In FE they have type KSuspendFunctionN
In BE they are treated like normal callable references with additional
parameter in invoke function.
2018-07-05 15:08:34 +03:00
Mikhail Zarechenskiy
5869274ff1 Disable errors in mod/rem tests that depend on language feature
Otherwise these tests will fail with LV=1.3
2018-07-05 12:59:43 +03:00
Mikhail Zarechenskiy
2939d9c8c6 Use correct lhs KotlinType & AsmType for is check generation
There were two problems:
  - For asm type `OBJECT_TYPE` was used, which can be wrong in case of
  inline classes, because it can be an underlying value of some inline class
  - For KotlinType, type from rhs was used
2018-07-05 12:55:43 +03:00
Mikhail Zarechenskiy
4f490ac264 Fix generation of checkcast instructions for inline classes
Normalize LHS and RHS types to use only boxed ones and then let bytecode
 optmizer reduce redundant boxing
2018-07-05 12:55:39 +03:00
Dmitry Savvinov
8eb7eab535 Make tests on -XXLanguage more tolerant to 1.2 -> 1.3 transition 2018-07-05 10:42:50 +03:00
Dmitry Savvinov
5cb949ad7f Fix language features in tests for gradual migration to 1.3 (part 2)
In 1.3, due to changes in language, testdata for some tests can be
different from 1.2

We want to simlultaneously test both versions, so instead of fixing
language version in such tests, we split them into two: one with fixed
1.2, another with fixed 1.3
2018-07-05 10:42:49 +03:00
Dmitry Savvinov
6d733ff7b9 Disable ContracsDSL in 1.3 2018-07-05 10:42:38 +03:00
Dmitry Savvinov
984ef9c3b1 Parse testing directives in AbstractLoadJavaTest 2018-07-05 10:41:41 +03:00
Ilya Gorbunov
1266ba682c Opt-in to use experimental unsigned types in tests
The opt-in is required to avoid side diagnostics about the experimentality.
2018-07-04 19:13:30 +03:00
Ilya Gorbunov
b5fabf3f72 Make unsigned types experimental (with warning if not opted-in) 2018-07-04 19:12:11 +03:00
Nikolay Krasko
71292bd681 Disable formatting inspection for unmodified files 2018-07-04 17:31:14 +03:00
Nikolay Krasko
370608d12f Ignore more methods from stdlib in argument name hints (KT-18350)
#KT-18350 Fixed
2018-07-04 17:31:13 +03:00
Nikolay Krasko
dcc6579dcb Modification trackers increment highlighting test 2018-07-04 17:31:10 +03:00
Vyacheslav Gerasimov
1cb97259aa Add :compiler:ir.backend.common to kotlin-plugin fat jar
#KT-25225 Fixed
2018-07-04 17:17:39 +03:00
Alexey Sedunov
2efd467c42 JS: Fix detection of run configuration with preconfigured Mocha
#KT-25253 Fixed
2018-07-04 16:40:01 +03:00
Mikhael Bogdanov
be40127ab3 Mute coroutines ir-tests in jvm 2018-07-04 15:33:41 +02:00
Nicolay Mitropolsky
5d9807ac36 Uast: converting Unit to void on type mapping (KT-25249) 2018-07-04 16:16:22 +03:00
Alexey Tsvetkov
39fc7cffe1 Temporarily ignore Kapt3WorkersAndroid32IT 2018-07-04 15:15:57 +03:00
Alexey Tsvetkov
bab8c97c09 Allow overriding default Gradle version per test class 2018-07-04 14:55:42 +03:00
Alexey Tsvetkov
05fa8b7451 Add SDK jars to compile classpath for Kapt Workers task 2018-07-04 14:55:42 +03:00
Alexey Tsvetkov
bfc608de29 Close kapt context 2018-07-04 14:55:42 +03:00
Alexey Tsvetkov
3b18debee3 Test kapt with workers 2018-07-04 14:55:42 +03:00
Alexey Tsvetkov
efeea9d7d4 Update android tools versions in Gradle plugin tests 2018-07-04 14:55:42 +03:00
Alexey Tsvetkov
357518be0d Remove projectDir input from KaptWithoutKotlincTask
It is redundant since the task would be restarted when project dir changes,
because paths of sources would also change
2018-07-04 14:55:42 +03:00
Alexey Tsvetkov
9b97108db4 Fix getting plugin version for kotlinKaptWorkerDependencies configuration
Previously the configuration would not work for non-android projects,
because it looked only at KotlinAndroidPluginWrapper for plugin version
2018-07-04 14:55:42 +03:00
Alexey Tsvetkov
43b7ffd823 Create kotlinKaptWorkerDependencies only once
#KT-25124 fixed
2018-07-04 14:55:42 +03:00
Alexey Tsvetkov
5bf5632886 Do not load annotation processors when generating stubs
#KT-25131 fixed
2018-07-04 14:55:42 +03:00
Alexey Tsvetkov
f438b7501c Fix compilation of plugin projects in JPS
#KT-25218 fixed
2018-07-04 14:54:07 +03:00
Alexander Udalov
285912f556 Minor, add helper StackValue.constant(int) 2018-07-04 13:39:32 +02:00
Denis Zharkov
22a9cecfe0 Optimize KotlinPropertyAccessorsReferenceSearcher for case of no kt-files
Property names by accessors can be computed without resolving
java descriptors

 #KT-11477 Fixed
 #KT-16890 Fixed
2018-07-04 14:03:28 +03:00
Denis Zharkov
2d50ad82a5 Optimize SyntheticJavaPropertyDescriptor.Companion::findByGetterOrSetter
Do not force getContributedDescriptors call when we need to request
at most three names
2018-07-04 14:03:28 +03:00
Denis Zharkov
5e6a3673c8 Reformat SyntheticJavaPropertiesScope.kt 2018-07-04 14:03:28 +03:00
Alexey Sedunov
fc93f00c7b Misc: Make LibraryEffectiveKindProvider cache an instance property 2018-07-04 13:34:20 +03:00
Ilya Chernikov
db73ed1d0c Add 1.2.51 issues to changelog 2018-07-04 11:42:47 +02:00
Alexey Sedunov
5f69eebe66 Misc: Fix SOE due to wrong overloaded method call
#KT-25247 Fixed
2018-07-03 22:09:55 +03:00
Alexander Udalov
50904d4216 Add JvmFunctionExtensionVisitor.visitEnd
#KT-25223 Fixed
2018-07-03 19:15:34 +02:00
Ilya Gorbunov
cbc3480d9e Split common builtin companion tests from JVM-only tests
Remove duplicated tests from NumbersJVMTest.
2018-07-03 19:58:53 +03:00
Svyatoslav Kuzmich
83f8cfaa66 [JS IR BE] hashCode, toString, number conversion support 2018-07-03 19:51:58 +03:00
Svyatoslav Kuzmich
a7a695f203 KJS: Add JsLoop AST interface and corresponding visitors 2018-07-03 19:51:58 +03:00
Roman Artemev
d130ba6f44 [JS IR BE] Update test data 2018-07-03 19:14:00 +03:00
Roman Artemev
47d088d4c5 [JS IR BE] Reimplement block decomposer lowering 2018-07-03 19:13:53 +03:00
Mikhail Zarechenskiy
e2c287c77e Fix language feature for mod/rem tests for migration to 1.3 version
After 2e88f5c47d
2018-07-03 16:10:37 +03:00
Alexander Podkhalyuzin
7ee055fccc Merge pull request #1745 from JetBrains/rr/suppressor
Introduce KotlinInspectionSuppressor
2018-07-03 14:37:39 +03:00
Svyatoslav Scherbina
226f16b44e ir.tree: fix .originalKotlinType for transformed IR types 2018-07-03 09:55:12 +03:00
Ilya Gorbunov
4fd6dcd063 Turn progressive mode on with the gradle parameter test.progressive.mode 2018-07-03 05:10:24 +03:00
Ilya Gorbunov
3c86e40bcb Fix WITH_UNSIGNED directive in noBoxingOperationsOnNonTrivialSpread 2018-07-03 03:52:18 +03:00
Ilya Gorbunov
16fb5f6901 Set language and api versions automatically for unsigned types box tests
Remove InlineClasses feature directive from tests
2018-07-03 03:52:18 +03:00
Ilya Gorbunov
181a8d7d6a Extract default language version settings for diagnostics tests
And override it in unsigned types diagnostics tests.
Remove InlineClasses feature directive from tests, because it's already
enabled in that language version.
2018-07-03 03:52:18 +03:00
Ilya Gorbunov
3349976279 Make MIN_VALUE and MAX_VALUE of unsigned types actual constants 2018-07-03 03:52:18 +03:00
Ilya Gorbunov
7a208c3e01 Simplify unsigned array constructor functions 2018-07-03 03:52:18 +03:00
Ilya Gorbunov
615f57f2fc Compile unsigned types sourceset with 1.3 and annotate them with SinceKotlin("1.3") 2018-07-03 03:52:18 +03:00
Ilya Gorbunov
a72ad8b267 Advance bootstrap to 1.2.70-dev-23 2018-07-03 03:52:18 +03:00
Alexey Tsvetkov
1dea01a479 Build: remove testRuntime dependency on ":kotlin-compiler:dist" 2018-07-02 22:36:35 +03:00
Alexey Sedunov
03ed4e39e3 Search Everywhere: Recover original behavior for non-functions
#KT-25189 Fixed
2018-07-02 20:18:21 +03:00
Alexander Udalov
e4af8dc7d8 Improve reflection error message when function/property is not found 2018-07-02 18:49:09 +02:00
Alexander Udalov
4f2fdd1c01 Load all resources in RuntimePackagePartProvider; optimize code
The issue was reproducible when the same package is present in different
modules with the same -module-name (which is a popular case of src/test
roots in simple IDEA projects). The problem was in the fact that several
resource files containing package name mapping with the same name were
present in the classpath, but RuntimePackagePartProvider only considered
the first one. The fix is to use getResources instead of
getResourceAsStream and handle each returned resource.

Also, optimize internal representation to store the mapping in the form
which is the most convenient for findPackageParts, which should be
faster than registerModule because in theory, it's called more often.

 #KT-21973 Fixed
 #KT-24651
2018-07-02 18:49:09 +02:00
Alexander Udalov
8ccbbf71ec Remove obsolete BuiltInFunction and mapIntrinsicFunctionSignature
This is now fully covered by the JVM signature mapping, introduced in
the previous commit. The change in KDeclarationContainerImpl.methodOwner
is needed because primitive classes have no methods on JVM; and when
we're looking for "Int.equals", we'll now look it up in the Class object
for java.lang.Integer, not for the primitive int.
2018-07-02 18:49:08 +02:00
Alexander Udalov
4266e50be8 Use manual type mapping in reflection for members from built-ins
There are cases when members deserialized from JVM classes have no JVM
signature in the proto. For example, if a member is inherited from a
built-in class (such as Map.getOrDefault in some Map implementations),
or if a member is synthesized in the compiler front-end and back-end
separately (such as enum values/valueOf). In these cases, we'll use the
naive type mapping to try to recover the signature.

 #KT-16616 Fixed
 #KT-17542 Fixed
2018-07-02 18:49:08 +02:00
Alexander Udalov
a7c80f2df1 Reformat module reflection.jvm, fix inspections/warnings 2018-07-02 18:49:08 +02:00
Alexander Udalov
25ee67a644 Catch SecurityException when reading system property in BitEncoding
This does not fix KT-15167 though because the exception from KT-20575 is
thrown shortly afterwards

 #KT-15167
2018-07-02 18:49:08 +02:00
Alexander Udalov
42de05f3fa Improve diagnostic for missing BuiltInsLoader implementation
Also initialize it lazily to avoid wrapping the exception into
ExceptionInInitializerError

 #KT-20575
2018-07-02 18:49:08 +02:00
Alexander Udalov
50c515deca Do not serialize constructors for anonymous objects
The only client of this data is reflection, and since anonymous objects
do not have constructors in the source code, they shouldn't in
reflection as well

 #KT-20442 Fixed
2018-07-02 18:49:08 +02:00
Alexander Udalov
17fc41e0f9 Do not create primary constructor for enum entry synthetic class
The change in DescriptorSerializer is needed so that serialized protos
of enum entry classes which are resolved in sources
(LazyClassDescriptor) and are deserialized from binaries
(EnumEntrySyntheticClassDescriptor) are the same. There are tests on
incremental compilation in JS that check that the serialized proto is
exactly the same after rebuild and after an incremental build.

 #KT-22048 Fixed
2018-07-02 18:49:08 +02:00
Alexey Sedunov
b52b07ec79 Test Support: KT-22306
Do not show run markers in JS modules when no relevant run configurations are available

 #KT-22306 Fixed
2018-07-02 19:15:52 +03:00
Alexey Sedunov
3e91346240 Rename: Fix processing of references to synthetic Java properties
Fixes for non-master-bunch plugin.xml
2018-07-02 19:15:51 +03:00
Alexey Sedunov
22d74276a0 Misc: Configure stdlib in failing tests 2018-07-02 19:08:10 +03:00
Alexey Sedunov
65dad5eb74 Misc: Fix test assertion 2018-07-02 19:08:10 +03:00
Mikhail Zarechenskiy
59567c8012 Improve exception message to detect actual problem
This relates to EA-120082, EA-119637
2018-07-02 16:12:39 +03:00
Mikhail Zarechenskiy
2e88f5c47d Prohibit operator mod as declaration and calls that resolved via it
#KT-24197 Fixed
2018-07-02 16:12:36 +03:00
Roman Artemev
c887b88ed9 Fix coroutine test generator 2018-07-02 15:35:02 +03:00
Nikolay Krasko
f1a44ed1a4 Allow to disable bad format inspection for unchanged files (KT-25199)
#KT-25199 Fixed
2018-07-02 15:06:47 +03:00
Nikolay Krasko
30a2969887 Move KotlinCleanupInspection to Migration group 2018-07-02 15:06:47 +03:00
Denis Zharkov
3b968351bb Load Java overrides of Kotlin suspend functions as suspend, too
There's still some blind spots:
- Covariant overrides in Java (KT-25036)
- Current implementation assumes that when language version is 1.3 every suspend function
reference only release-coroutines-package Continuation
(we need to check if it's a correct statement)

 #KT-24848 Fixed
 #KT-25036 Open
2018-07-02 14:14:59 +03:00
Denis Zharkov
0fc9bb3f4a Minor. Reformat LazyJavaClassMemberScope.kt 2018-07-02 14:14:59 +03:00
Mikhail Zarechenskiy
de60c9b635 Fix language features in tests for gradual migration to 1.3 version 2018-07-02 12:13:11 +03:00
Vyacheslav Gerasimov
931ebb4c3c as32: Limit until-build to prevent installation on AS 3.3 2018-07-01 00:09:21 +03:00
Alexey Tsvetkov
ece991639e Do not compile jps tests for android studio
I accidentally enabled compilation in one of my previous commits
2018-06-29 20:16:53 +03:00
Ilya Gorbunov
bed26dc700 Fix local delegated property smartcast usage 2018-06-29 20:11:03 +03:00
Nicolay Mitropolsky
80f022c3d5 182: IDEA sdk set to 182.3458.5 2018-06-29 16:42:44 +03:00
Dmitry Petrov
bbcb12ea4b samAdapter test doesn't actually need FULL_JDK 2018-06-29 14:27:57 +03:00
Dmitry Petrov
92430fc63a Update testData for JS_IR tests 2018-06-29 14:23:09 +03:00
Dmitry Petrov
38e9c86443 Update testData for irCfg and sourceRanges tests 2018-06-29 14:01:54 +03:00
Mikhail Glukhikh
537655a4c2 KotlinInspectionSuppressor: introduce more precise quick-fix names
Related to KT-11154, KT-25169
2018-06-29 11:58:28 +03:00
Mikhail Glukhikh
a51bda64dc Add a pair of tests for KT-11154 2018-06-29 11:44:48 +03:00
Dmitry Petrov
f0050930b5 Add ":compiler:ir.backend.common" to compilerModules 2018-06-29 11:24:46 +03:00
Mikhael Bogdanov
da0a966d65 Initialize return type and use unit type in IrDelegationConstructorCall
(cherry picked from commit faac924)
2018-06-29 11:24:46 +03:00
Mikhael Bogdanov
7bd5031eaf Fix array check
(cherry picked from commit e662f82)
2018-06-29 11:24:46 +03:00
Dmitry Petrov
b1d0a5e807 Fix delegated function body generation 2018-06-29 11:24:46 +03:00
Dmitry Petrov
71c5bf0b97 Fix annotation copying for IrValueParameters 2018-06-29 11:24:46 +03:00
Dmitry Petrov
799fcc2606 Fix IrType rendering, update testData 2018-06-29 11:24:46 +03:00
Dmitry Petrov
7fd3fac122 Minor: fix after rebase 2018-06-29 11:24:46 +03:00
Mikhael Bogdanov
2a721ea0f6 Fix EnumClassLowering
(cherry picked from commit 1aa7e1a)
2018-06-29 11:24:46 +03:00
Mikhael Bogdanov
95d72d0a32 Fix unbound symbol problem
Make property initialization non-lazy to bind owner by general mechanism

(cherry picked from commit eec6c18)
2018-06-29 11:24:46 +03:00
Mikhael Bogdanov
ba9f12b617 Use original descriptor for property stub generation
(cherry picked from commit 1a9f242)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
068859eece Minor: use right type for null literal
(cherry picked from commit 88c824b)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
56bf1f895c Mute failed test for JS IR BE
(cherry picked from commit 6d379a6)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
15f33dd94a Unmute some tests for JS IR BE
(cherry picked from commit 04a9622)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
bf2aa5263e JS IR BE: migrate to IR types
(cherry picked from commit 064f47b)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
952163b2fb IR: define references to Throwable, KCallable and KProperty classes inside IrBuiltIns
(cherry picked from commit f92bda0)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
92407c509f IR BE common: add KotlinType based utils
(cherry picked from commit d8be3a6)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
686a3d631c IR BE common: provide type arguments count explicitly for ir calls to reduce dependency on descriptors
(cherry picked from commit af76ae2)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
f002e6030a IR BE common: use another ctor of IrGetValueImpl in LocalDeclarationsLowering
(cherry picked from commit 7e34d6e)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
d5906dd584 IR BE common: fix InnerClassesLowering
(cherry picked from commit 4239a5f)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
072804af52 ir.tree: uncomment and fix IrFunction.createParameterDeclarations
(cherry picked from commit af8b4be)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
6bc86bd42f IR: add ClassifierDescriptor.toIrType and KotlinType.toIrType
(cherry picked from commit 3e09659)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
fa51b962b8 IR: return original KotlinType from IrTupe.toKotlinType() when it possible instead of creating new one
(cherry picked from commit e3b921a)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
1c2ac364c7 IR: add more predicates on IrType
(cherry picked from commit 5cf136c)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
17454d3f9c ir.tree: fix return type of IrMemberAccessExpression.getTypeArgumentOrDefault
(cherry picked from commit 9e7661f)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
576dfda3a8 IrTypes: fix translating for Dynamic type
(cherry picked from commit bd04b46)
2018-06-29 11:24:46 +03:00
Mikhael Bogdanov
ecb5d29130 Add additional IrFunction constructor with custom visibility and modality
(cherry picked from commit 0664d77)
2018-06-29 11:24:46 +03:00
Mikhael Bogdanov
3063de82aa Fix JVM BE IR part
(cherry picked from commit 5e55040)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
1d67cd3b97 IR: add ir.backend.common to jvm backend dependencies
(cherry picked from commit 0776e3d)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
9bcc3cae79 IR Tree: add overloads for irCall and IrGetValueImpl
(cherry picked from commit 1420fc5)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
80b6d84c72 Add dependency: backend.js -> ir.backend.common
(cherry picked from commit a8b02f8)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
7e9cf64754 KJS: don't use onlyIf from ir/backend.common
(cherry picked from commit 34574a9)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
49f2598907 IrTypes: fix ir2cfg
(cherry picked from commit cf162c7)
2018-06-29 11:24:46 +03:00
Zalim Bashorov
ea7b344b80 Use IrType in IrSuspensionPointImpl and IrSuspendableExpressionImpl
(cherry picked from commit 06e1728)
2018-06-29 11:24:46 +03:00
Dmitry Petrov
d5286874bd Fix circular dependency: TypeTranslator <-> ConstantValueGenerator
TODO proper DI?
2018-06-29 11:24:46 +03:00
Dmitry Petrov
ede3a34baa Temporary fix for IR2CFG: use originalKotlinType 2018-06-29 11:24:46 +03:00
Dmitry Petrov
15eafc1513 IrTypes: IrSuspensionPoint, IrSuspendableExpression update 2018-06-29 11:24:46 +03:00
Svyatoslav Scherbina
b11abeed6a IrTypes: migrate some code from backend.common
(cherry picked from commit 3788130)
2018-06-29 11:24:46 +03:00
Svyatoslav Scherbina
f1bdb48a76 IrTypes: comment backend.common code to be migrated by someone else
(cherry picked from commit 0491fc4)
2018-06-29 11:24:46 +03:00
Svyatoslav Scherbina
25d0c57194 backend.common: remove obsolete lowerings
(cherry picked from commit 5d6b9c7)
2018-06-29 11:24:46 +03:00
Svyatoslav Scherbina
17312a305b psi2ir: fix type for IrGetField(delegate) when generating delegation
(cherry picked from commit 7601cc2)
2018-06-29 11:24:46 +03:00
Svyatoslav Scherbina
56fdf2c735 psi2ir: fix null support in 'promoteToPrimitiveNumericType'
(cherry picked from commit 9b2a637)
2018-06-29 11:24:46 +03:00
Svyatoslav Scherbina
0b4d9513eb psi2ir: fix generating fake override for property with type parameters
(cherry picked from commit 2051177)
2018-06-29 11:24:46 +03:00
Svyatoslav Scherbina
be413e4fab psi2ir: don't generate accessor type parameter supertypes twice
(cherry picked from commit 22e6d5f)
2018-06-29 11:24:46 +03:00
Dmitry Petrov
a9d0e6d3da IrTypes: generateAnnotationConstructorCall -> ConstantValueGenerator 2018-06-29 11:24:46 +03:00
Dmitry Petrov
3a11767fae IrTypes: use proper scope for type parameters in stub generation 2018-06-29 11:24:46 +03:00
Svyatoslav Scherbina
f837537cb6 IrTypes: fix multiple issues in psi2ir 2018-06-29 11:24:46 +03:00
Svyatoslav Scherbina
35cf7c4db3 Expose transformAnnotations from DeepCopyIrTree 2018-06-29 11:24:46 +03:00
Dmitry Petrov
d1b6e8901a Minor: IrTypes: fix after rebase 2018-06-29 11:24:46 +03:00
Dmitry Petrov
2d9ae6e93e IrTypes: approximate only non-denotable Kotlin types 2018-06-29 11:24:46 +03:00
Dmitry Petrov
93f4a4da10 IrTypes: star projections
Initial implementation, mostly to avoid infinite recursion in cases such
as 'Enum<*>'.
2018-06-29 11:24:46 +03:00
Dmitry Petrov
5b3947da11 IrTypes: Fix type arguments mapping for properties 2018-06-29 11:24:46 +03:00
Dmitry Petrov
7497372f65 IrTypes: IrProperty has no type of its own
Within the current scheme, type parameters for IrProperty become type
parameters for getter and setter (and, since only extension properties
can have type parameters, backing field's type can't depend on type
parameters; see also KT-24643). Either properties themselves can have
type parameters of their own (for the sake of representing the property
type), or properties don't have types and don't have type parameters.
2018-06-29 11:24:46 +03:00
Dmitry Petrov
ad65fa8c45 IrTypes: IrTypeParameter.superTypes can depend on type parameters
IrTypeParameter.superTypes can depend on type parameters and thus should
be initialized with type parameters in scope.
2018-06-29 11:24:46 +03:00
Dmitry Petrov
eb6f652763 IrTypes: IrClass.superTypes can depend on type parameters
IrClass.superTypes can depend on type parameters of a class and thus
should be initialized after type parameters are in put in scope.
2018-06-29 11:24:46 +03:00
Dmitry Petrov
8ae17ecbcb IrTypes: IrFunction.returnType can depend on type parameters
Function return type can depend on function type parameters and should
be initialized with type parameters in scope.
2018-06-29 11:24:46 +03:00
Dmitry Petrov
847223683e Minor: IrTypes: fix after rebase 2018-06-29 11:24:46 +03:00
Dmitry Petrov
0ffef64428 IrTypes: IrClass.superTypes, IrTypeParameter.superTypes 2018-06-29 11:24:46 +03:00
Dmitry Petrov
353076f596 compiler/ir/backend.common is NOT a part of compiler/backend-common 2018-06-29 11:24:46 +03:00
Dmitry Petrov
25a66916a6 IrTypes: minor: pass generator context where required 2018-06-29 11:24:46 +03:00
Dmitry Petrov
6649ef2740 IrTypes required to declare symbol 2018-06-29 11:24:46 +03:00
Dmitry Petrov
609a6ca9bb IrTypes: dummy implementation of IrType.render 2018-06-29 11:24:46 +03:00
Dmitry Petrov
4eb2fc66d0 IrTypes: deep copy with symbols
Preliminary implementation of type remapper (does nothing).
2018-06-29 11:24:46 +03:00
Dmitry Petrov
062c4bf41d IrTypes: make old DeepCopy compile
Lots of TODOs, should figure out proper type mapping strategy
(or simply drop this frankenstein code, finally).
2018-06-29 11:24:46 +03:00
Dmitry Petrov
62a42130c8 Add dependency: ir.tree -> intellij
AnnotationGenerator looks into PsiElement
2018-06-29 11:24:46 +03:00
Dmitry Petrov
c22f6dee4a IrTypes: update minor utilities 2018-06-29 11:24:46 +03:00
Dmitry Petrov
e8fe788df6 IrTypes: Implicit casts, take 1
Keep KotlinType along with IrTypes created by psi2ir.
2018-06-29 11:24:46 +03:00
Dmitry Petrov
54e9a2bb7b IrTypes in psi2ir: generators (seem to be) complete 2018-06-29 11:24:46 +03:00
Dmitry Petrov
5f4f6ef863 IrTypes in psi2ir (work in progress) 2018-06-29 11:24:46 +03:00
Dmitry Petrov
0774ca415c Rebase + reformat 2018-06-29 11:24:46 +03:00
Dmitry Petrov
0f718ec2d8 IrTypes: Fix up some back-end code 2018-06-29 11:24:46 +03:00
Dmitry Petrov
326e4a160f IrTypes in psi2ir (work in progress) 2018-06-29 11:24:46 +03:00
Dmitry Petrov
0e34ee5270 IrTypes: basic built-in types 2018-06-29 11:24:46 +03:00
Dmitry Petrov
c97697d7a9 psi2ir: translate types in StatementGenerator
TODO: DI
2018-06-29 11:24:46 +03:00
Dmitry Petrov
372f280578 DeclarationStubGenerator uses IrTypes 2018-06-29 11:24:46 +03:00
Dmitry Petrov
1353cf879c IR: Drop obsolete builders (should be rewritten) 2018-06-29 11:24:46 +03:00
Dmitry Petrov
f66f3c1fed psi2ir: cleanup TypeTranslator 2018-06-29 11:24:46 +03:00
Dmitry Petrov
4bd2504367 IR declarations: KotlinType -> IrType 2018-06-29 11:24:46 +03:00
Dmitry Petrov
4992ca9179 IR expressions: KotlinType -> IrType 2018-06-29 11:24:46 +03:00
Dmitry Petrov
c28877d23c psi2ir: approximate types in TypeTranslator 2018-06-29 11:24:46 +03:00
Dmitry Petrov
1be28d6032 IrType -> IrDynamicType, IrErrorType, IrSimpleType 2018-06-29 11:24:46 +03:00
Mikhail Glukhikh
fdc0335b4a Add actual: handle (incorrect) case with expect function with body
So #KT-23326 Fixed
2018-06-29 10:54:37 +03:00
Mikhail Glukhikh
0fb183e302 Add actual: handle parameters with val/var as compatible with property
So #KT-23762 Fixed
2018-06-29 10:54:36 +03:00
Mikhail Glukhikh
dd0b267531 Add actual: handle primary & secondary constructors as compatible
So #KT-23686 Fixed
2018-06-29 10:54:35 +03:00
Mikhail Glukhikh
082c3e6767 Reformat: AddActualFix 2018-06-29 10:54:33 +03:00
Mikhail Glukhikh
16c6d63b10 Create actual: do not generate default parameter values
So #KT-23105 Fixed
2018-06-29 10:54:32 +03:00
Mikhail Glukhikh
b13e4535f5 Safe delete: add dialog asking about expect / actual declarations
Related to KT-15666
2018-06-29 10:54:30 +03:00
Mikhail Glukhikh
aac71bf904 Safe delete: when invoking on actual, delete expect & actual neighbors
So #KT-15666 Fixed
2018-06-29 10:54:24 +03:00
Mikhail Glukhikh
50e70e4638 Safe delete: when invoking on expect, delete also relevant actual
Partial fix of KT-15666
2018-06-29 10:53:43 +03:00
Mikhail Glukhikh
465d5c077e Safe delete: search for actual declarations more accurately 2018-06-29 10:53:42 +03:00
Mikhail Glukhikh
5bdaef4983 Cleanup: KotlinSafeDeleteProcessor 2018-06-29 10:53:42 +03:00
Mikhail Glukhikh
c4bba135bf Introduce KotlinInspectionSuppressor
So #KT-25169 Fixed
So #KT-11154 Fixed
2018-06-29 10:43:02 +03:00
Alexey Tsvetkov
8848d7a043 Remove groovy plugin from kotlin-gradle-plugin build script 2018-06-28 22:03:11 +03:00
Alexey Tsvetkov
22c1907167 Track project version in ":kotlin-gradle-plugin:processResources"
Before the change consecutive incremental builds with different project versions
produced kotlin-gradle-plugin with the same project.version in project.properties file
2018-06-28 22:03:11 +03:00
Alexey Tsvetkov
3a7c674957 Fix test dependencies in jps-plugin
Otherwise tests fail on clean checkout
2018-06-28 22:03:10 +03:00
Alexey Sedunov
a63aa5b7ca Misc: Restore utility functions misplaced in a previous commit 2018-06-28 20:39:16 +03:00
Alexey Sedunov
76ac65f723 Configuration: Use soft references to keep library kind cache
#KT-24943 Fixed
2018-06-28 18:22:28 +03:00
Alexey Sedunov
60583e557f PSI: Do not delete package directive for file in default package
#KT-24968 Fixed
2018-06-28 18:22:28 +03:00
Alexey Sedunov
e2a632e326 Misc: Add "refactoring exit" message
This allows executing mandatory code at the end of particular refactoring.
Also this fixes memory leak due to listener not being disposed

 #KT-17235 Fixed
2018-06-28 18:22:28 +03:00
Alexey Sedunov
ba2f28720f Introduce Parameter: Fix exceptions caused by write actions in dialogs
#KT-24992 Fixed
2018-06-28 18:22:27 +03:00
Alexey Sedunov
ed597e2da5 Extract Function: Make compliant with PublicApiImplicitTypeInspection 2018-06-28 18:22:27 +03:00
Alexey Sedunov
633c67ebf0 Misc: Use KtToken to represent visibility in ExtractableCodeDescriptor 2018-06-28 18:22:27 +03:00
Mikhael Bogdanov
b1693acfcd Unmute smap test in ir 2018-06-28 17:12:09 +02:00
Alexey Sedunov
83745010ba Search Everywhere: Update renderer to reflect changes in IDEA
#KT-24812 Fixed
2018-06-28 17:52:05 +03:00
Alexey Sedunov
31d248c42d Search Everywhere: Use Kotlin renderer for Kotlin elements only 2018-06-28 17:52:05 +03:00
Alexey Sedunov
bede2e1c16 Extract Interface: Fix type import when converting parameter to property
#KT-18736 Fixed
2018-06-28 17:52:05 +03:00
Alexey Sedunov
9b7450cfdb Extract Superclass: Report private members used in abstracted members
#KT-16284 Fixed
2018-06-28 17:52:04 +03:00
Alexey Sedunov
bd88e02172 Extract Superclass: Fix visibility lifting when moving to interface
#KT-16281 Fixed
2018-06-28 17:52:04 +03:00
Alexey Sedunov
b0e0460ee6 Extract Superclass: Allow extraction to existing file
#KT-15351 Fixed
2018-06-28 17:52:04 +03:00
Alexey Sedunov
5ef54a2f03 Extract Superclass: Run refactoring inside of transaction
#KT-18555 Fixed
2018-06-28 17:52:03 +03:00
Nikolay Krasko
87f4d0c5a4 Move "Copy Current File As Diagnostic Test" action to internal (KT-25164)
#KT-25164 Fixed
2018-06-28 16:02:14 +03:00
Nikolay Krasko
c68284030d Check files is valid before searching for children (EA-113417) 2018-06-28 16:02:14 +03:00
Alexander Udalov
8c8d0eefbb Relocate package org.jetbrains.kotlin in kotlinx-metadata-jvm
To prevent clashes in scenarios where it's used together with the Kotlin
compiler (e.g. in annotation processing)

 #KT-24945 Fixed
2018-06-28 14:39:53 +02:00
Mikhail Zarechenskiy
173bcd90df Simplify lexer rule for typed integers 2018-06-28 13:32:10 +03:00
Mikhael Bogdanov
e149cbe852 Mute failed jvm ir tests 2018-06-28 12:26:41 +02:00
Mikhael Bogdanov
a10c06eb4d Regenerate ir tests with JVM_IR target 2018-06-28 12:26:41 +02:00
Mikhail Zarechenskiy
dc7678a700 Use smartcast info that related to call in change signature quick fix
There is an inconsistency on how we record smartcasts in old and new
 inference, but we definitely should use all possible information about
 smartcasts in quick-fixes

 #KT-25144 Fixed
2018-06-28 13:14:18 +03:00
Nicolay Mitropolsky
698096f13e Uast: fix for creating an UClass for invalid object-literals (EA-122644, KT-20056) 2018-06-28 10:29:47 +03:00
Alexey Tsvetkov
25e6b76238 Build: disable jar compression for local builds
This speeds ups jar creation twice, which is significant for local
incremental builds when jar creation can dominate compilation time.

Changes in stripMetadata are required because putting entry from not-stripped
jar caused failures when compression was disabled (because size and crc
are actually changed during metadata removal; don't know why it works
with compression).
2018-06-27 23:56:26 +03:00
Alexey Tsvetkov
3dc38fe2f8 Build: enable Java incremental compilation for local builds 2018-06-27 23:56:26 +03:00
Alexey Tsvetkov
c73657b38d Build: disable incremental compilation for non-TC build
This should bring small performance improvements for CI builds
(since they are not incremental anyway).
2018-06-27 23:56:26 +03:00
Nico Mandery
5c16633175 fix typos in documentation of JsQualifier annotation (#1733) 2018-06-27 19:34:27 +03:00
Lucas Smaira
5820656aae Find Kotlin class with alternative resolve enabled
Kotlin run configurations are failing non-deterministically in Android
Studio due to not finding the class while in dumb mode (while AS invokes
Gradle build or in indexing after that).

Fix that by finding class in KotlinRunConfiguration with alternative
resolve enabled.
2018-06-27 16:38:44 +03:00
Vyacheslav Gerasimov
abd3ac4e96 UAST: Reformat KotlinUObjectLiteralExpression.kt 2018-06-27 16:04:41 +03:00
Vyacheslav Gerasimov
a829251690 UAST: Fix possible TypeCastException when creating KotlinUNamedExpression 2018-06-27 16:04:40 +03:00
Vyacheslav Gerasimov
23ee463053 Check if module disposed when getting modules with kotlin files 2018-06-27 16:04:40 +03:00
Vyacheslav Gerasimov
16b4d25c1d Reformat ConfigureKotlinInProjectUtils 2018-06-27 16:04:40 +03:00
Vyacheslav Gerasimov
62c0d37d45 UAST: Do not log PCE in DeclarationDescriptor.toSource 2018-06-27 16:03:16 +03:00
Nikolay Krasko
8ea19eda73 as32: Minor: use full sentences for reasons 2018-06-27 15:11:08 +03:00
Nikolay Krasko
17d4961760 as32: Use full sentences for reasons 2018-06-27 15:11:08 +03:00
Nikolay Krasko
099f3f3ddf Move isEap and isDev utility functions to idea module 2018-06-27 15:11:08 +03:00
Nikolay Krasko
54bb09a5fb Make disabled verification visible in UI 2018-06-27 15:11:07 +03:00
Alexander Udalov
0c45f20515 Minor, fix several CLI argument descriptions 2018-06-27 13:25:30 +02:00
Mikhail Zarechenskiy
a765ee41d7 Introduce uL/UL suffix to represent numbers of unsigned long type
#KT-24663 Fixed
2018-06-27 14:21:12 +03:00
Mikhail Zarechenskiy
7c44992016 Allow any case for u suffix
#KT-24663 In Progress
2018-06-27 14:21:07 +03:00
Alexander Udalov
984e37c7f1 Prohibit explicit usage of kotlin.Metadata as annotation 2018-06-27 12:37:18 +02:00
Alexander Udalov
8d124eb77f Minor, use array literal syntax in kotlin.Metadata 2018-06-27 12:20:03 +02:00
Dmitry Petrov
46a3f7420c When in debugger context, access private companion object directly 2018-06-26 16:46:55 +03:00
Nicolay Mitropolsky
bef3d4ace2 Uast: proper identifiers for KotlinUBinaryExpression (KT-25092) 2018-06-26 16:39:47 +03:00
Mikhail Glukhikh
eb92b7ed7f Unused symbol: don't suggest actual declaration used in another platform
Related to KT-17512
Related to KT-15666
2018-06-26 15:36:10 +03:00
Mikhail Glukhikh
30327aa9cc Do not mark kotlin.test.Test annotated declarations as unused
So #KT-20523 Fixed
2018-06-26 15:36:09 +03:00
Mikhail Glukhikh
7e0e7dc983 Unused symbol: remove forced "used" from actual declarations
Now we really check whether actual declaration has usages
(in expect or actual code) or not
Related to KT-17512
Related to KT-15666
2018-06-26 15:36:07 +03:00
Mikhail Glukhikh
e885e54233 Implement search from expect element in KotlinReferenceSearcher
So mostly #KT-17512 Fixed
2018-06-26 15:36:06 +03:00
Mikhail Glukhikh
97d158d833 Find property usages dialog: rename all check-boxes as in other dialogs 2018-06-26 15:36:05 +03:00
Mikhail Glukhikh
abbfea357a Add find usages option: search expected 2018-06-26 15:36:04 +03:00
Mikhail Glukhikh
69e420991a KotlinFindMemberUsagesHandler: get rid of deprecation 2018-06-26 15:36:03 +03:00
Mikhail Glukhikh
0a36edcf20 Cleanup: KotlinReferenceSearcher 2018-06-26 15:36:01 +03:00
Mikhail Glukhikh
ea7db42af6 Cleanup: findUsagesOptions 2018-06-26 15:36:00 +03:00
Mikhail Glukhikh
a46e4f3142 Cleanup: KotlinFindMemberUsagesHandler 2018-06-26 15:35:59 +03:00
Mikhail Glukhikh
cc2869988f Test for KT-17512 (yet with incorrect results) 2018-06-26 15:35:58 +03:00
Mikhail Zarechenskiy
600d135786 Fix internal compiler error on importing invisible fake reference
Note that this is not relevant for LOCAL/INHERITED visibilities:
  - for LOCAL visibility it's impossible to have a qualifier
  - INHERITED is an intermediate visibility, we enhance it later
    (see resolveUnknownVisibilityForMember)

 #KT-20356 Fixed
2018-06-26 14:18:21 +03:00
Nikolay Krasko
84b26fc61d Show kotlin internal information only in internal builds 2018-06-26 11:35:22 +03:00
Nikolay Krasko
5df0879538 Fix NPE in replaceImports() (EA-109700) 2018-06-26 11:35:21 +03:00
Alexander Udalov
1951d38f40 Retain optional expected annotations when compiling platform code
After this change, optional expected annotations will be compiled to
physical class files on JVM, and stored to metadata on other platforms,
to allow their usages from dependent platform modules. For example:

    @OptionalExpectation
    expect annotation class A

When compiling this code on JVM, A.class will be produced as if the
class A did neither have the 'expect' modifier, nor had it been
annotated with OptionalExpectation. Note that if there's no actual
annotation class for A, then usages (which can only be usages as
annotation entries) are simply skipped.

Class A will be public from Kotlin's point of view (since it should
be possible to use it in Kotlin sources), but _package-private_ in Java
to disallow its usages outside of the declaring module.

 #KT-18882 Fixed
 #KT-24617 Fixed
2018-06-26 10:23:55 +02:00
Alexander Udalov
4e217b180a Pass BindingContext to CodegenUtil.getActualDeclarations
Will be used in a subsequent commit. Also rename getActualDeclarations
-> getDeclarationsToGenerate
2018-06-26 10:23:55 +02:00
Mikhail Zarechenskiy
ba6da7c40a Support varargs of inline class types with non-trivial spread
#KT-24880 In Progress
2018-06-25 17:15:50 +03:00
Mikhail Zarechenskiy
333411c57d Associate vararg of unsigned types with corresponding arrays
This is a first step, full support will be added later

 #KT-24880 In Progress
2018-06-25 17:15:47 +03:00
Mikhail Zarechenskiy
3e45a1529c Allow to declare vararg parameters of unsigned types
varargs inside annotations will be supported later when
 constant evaluation of more complex expressions of unsigned types
 will be ready

 #KT-24880 In Progress
2018-06-25 17:15:44 +03:00
Mikhail Zarechenskiy
3f462659d2 Determine underlying property of inline class by its name
Previous way to distinguish "primary constructor properties" from other
 properties wasn't correct for deserialized properties, because currently
 we don't have special information about this in metadata
2018-06-25 17:11:59 +03:00
Sergey Igushkin
dbd72ae53b Fix Android ap option providers as Kapt task nested inputs
1) Exclude the providers arguments from the kapt inputs, as the values
may contain absolute paths, may be output properties etc. The providers
should correctly annotate their inputs.

2) Fix the options passed to kapt as 'value=option' (leading to all the
options collapse into one with the null key), use 'key=option' instead
to make Kapt pass them as '-Aoption'.

Issue #KT-23866 Fixed
Issue #KT-25027 Fixed
2018-06-25 15:03:52 +03:00
Mikhail Glukhikh
a3be68de82 Useless call: move class up from companion to remove 1.3 deprecation 2018-06-25 12:07:45 +03:00
Ilya Chernikov
7bff5e3ce7 Add missing tests dependencies on the renewed kotlin-scripting-idea plugin 2018-06-25 08:06:20 +02:00
Ilya Chernikov
1fbece9e7d Clean scripting plugin options and classpath on importing from gradle
should prevent problems that may appear if JPS will try to load
gradle scripting subplugin

(cherrypicked with update from 1.2.50)
2018-06-25 08:06:20 +02:00
Alexander Udalov
0dc12fc560 Update bootstrap to 1.2.60-dev-980 2018-06-24 18:14:37 +02:00
Ilya Gorbunov
39cad033a3 Cleanup: remove deprecated configuration property
Currently it's useless because we don't override compilerJarFile anymore.
2018-06-24 17:27:57 +03:00
xiexed
414fabb2c6 KtStringTemplateExpressionManipulator: properly works with interpolations (KT-24958) 2018-06-22 21:54:28 +03:00
Vyacheslav Gerasimov
01db78d776 Build: Introduce Project extension properties for source sets 2018-06-22 21:42:30 +03:00
Vyacheslav Gerasimov
42dc6a277f Build: Remove build.gradle.kts.182 for root project 2018-06-22 21:42:29 +03:00
Vyacheslav Gerasimov
07b0eeccc4 Build: Reduce differences in versions scripts 2018-06-22 21:42:13 +03:00
Vyacheslav Gerasimov
5ec535b680 Build: Rename File helper for creating file from pathes list to fileFrom 2018-06-22 21:42:12 +03:00
Vyacheslav Gerasimov
37ed8e2617 Build: Reformat CommonUtil.kt 2018-06-22 21:42:12 +03:00
Vyacheslav Gerasimov
4e3e4b2cd0 Build: Exclude android-lint.jar from CIDR plugin 2018-06-22 21:41:25 +03:00
Vyacheslav Gerasimov
e724cfa60f Revert "Build: Copy uast to idea plugin as separate artifacts"
This reverts commit e6f6451
2018-06-22 21:41:25 +03:00
Leonid Startsev
bef97d85af Respect version string in SubpluginArtifact to load compiler plugins
with versions different from compiler one
2018-06-22 21:13:34 +03:00
Nikolay Krasko
be5527b108 Merge pull request #1088 from lucamtudor/lucamtudor-patch-readme
Updates ReadMe.md to name the Sublime Text Package
2018-06-22 21:10:55 +03:00
Nicolay Mitropolsky
01e9dd5085 don't use project scope to resolve java.lang.String (#KT-25024) 2018-06-22 20:28:55 +03:00
Nikolay Krasko
cdfb813f2e Use single settings for Kotlin code style 2018-06-22 19:19:14 +03:00
Nikolay Krasko
8e31113a4f Ident elvis with normal ident in Kotlin code style (KT-25008)
#KT-25008 Fixed
2018-06-22 19:19:13 +03:00
Nikolay Krasko
341e7746a2 Minor: deprecated canBeOverriden -> canBeOverridden 2018-06-22 19:19:13 +03:00
Nikolay Krasko
6d29e44d1a Remove deprecated DirectClassInheritorsSearch.search call (KT-24933)
#KT-24933 Fixed
2018-06-22 19:19:13 +03:00
Nikolay Krasko
1973860e70 Indent content of when (KT-14066)
#KT-14066 Fixed
2018-06-22 19:19:12 +03:00
Nikolay Krasko
dc8a3ab534 Fix leak in debugger (KT-24903)
#KT-24903 Fixed
2018-06-22 19:19:12 +03:00
Nikolay Krasko
64f14ad89b Reformat: debugger.stepping 2018-06-22 19:19:12 +03:00
Alexey Tsvetkov
89f0b11765 Avoid exception when inspectClassesForKotlinIC produces empty file
Empty file should not happen, but we should process it correctly anyway.
2018-06-22 19:15:45 +03:00
Alexey Tsvetkov
2065f8e6fe Fix inter-project IC for android->non-android dependency
#KT-24832 fixed
2018-06-22 19:15:45 +03:00
Alexey Tsvetkov
9071a70a44 Avoid iterating jar inputs in inspectClassesForKotlinIC task
Jar's inputs can contain zipTrees in case of fat jars,
which can cause slow build
(Gradle unpacks them into temporary dir; that can be slow)

    #KT-24956 fixed
2018-06-22 19:15:45 +03:00
Alexey Tsvetkov
e38cafb1a2 Don't create build directory for task in getter
Since the property is public, it can be invoked from outside,
possibly trough other properties.
This can lead to unwanted side effects: we can create taskBuildDirectory,
because some other task reads the property in parallel with 'clean' task
in current project.
That's exactly what happened when we referenced the property from
'GradleCompilerRunner#buildModulesInfo'.

    #KT-24938 fixed
2018-06-22 19:15:45 +03:00
Alexey Tsvetkov
03839f6861 Test: speed up integration test by not building release variant 2018-06-22 19:15:45 +03:00
Alexey Tsvetkov
433e742d73 Fix location mapping test on Windows 2018-06-22 19:15:45 +03:00
Nikolay Krasko
36ced8a6a6 as32: Allow to override verifier checks 2018-06-22 18:56:24 +03:00
Yan Zhulanow
4aa7a95055 Android Extensions: Explicitly check if the Android plugin is enabled (EA-104651)
AndroidGradleOrderEnumerationHandler is defined in gradle.xml that doesn't depend on the Android plugin.
So we need to additionally check if the Android plugin is installed/enabled.
2018-06-22 17:48:13 +03:00
Dmitry Petrov
d35a92a81d Generate accessor for private companion object 2018-06-22 16:53:07 +03:00
Svyatoslav Scherbina
ba3411e7d7 JS IR: unmute tests 2018-06-22 13:36:47 +03:00
Ilya Gorbunov
6d027bbbfc Remove state from parts of multifile classes
Split COROUTINE_SUSPENDED marker to expect and actual because Kotlin/JS backend
expects it to be property without getter.

Update EXPECTED_REACHABLE_NODES in JS test data.

#KT-24986 Fixed
2018-06-22 11:35:05 +03:00
Svyatoslav Scherbina
cffe7fb23b backend.common: backport DefaultArgumentStubGenerator from Native 2018-06-21 18:18:03 +03:00
Svyatoslav Scherbina
830923e111 backend.common: backport LocalDeclarationsLowering from Native 2018-06-21 18:18:02 +03:00
Svyatoslav Scherbina
944c60eb66 ir.tree: fix bug in IrElementTransformerVoid 2018-06-21 18:18:01 +03:00
Simon Ogorodnik
e20ee0205a Update bunches to include performanceTest config 2018-06-21 16:05:47 +03:00
Simon Ogorodnik
0ac32ae41b Switch GC to ConcMarkSweep and add other options from IDEA defaults 2018-06-21 16:05:46 +03:00
Simon Ogorodnik
7531a103a3 Add options to use JFR 2018-06-21 16:05:45 +03:00
Alexey Tsvetkov
b97e82f604 Resolve bootstrap compiler classpath in root buildscript
Temporary workaround for bootstrapping.
Building the project with plugin version 1.2.60-dev-xxx
and deployVersion='1.3-SNAPSHOT' fails because Gradle
substitutes kotlin-stdlib dependency of kotlinCompilerClasspath
configuration with project dependency ':kotlin-stdlib'.
kotlinCompilerClasspath configuration is used to run the compiler,
which cannot be started with not yet built ':kotlin-stdlib'.
2018-06-21 16:03:27 +03:00
Denis Zharkov
a644cbb5ed Fix deserialization of kotlin.suspend when LV=1.3 is used
Before this change, kotlin.suspend was being loaded as having a common
function type instead of suspend function type.

With LV=1.3, we expect that suspend function types should have
new Continuation interface as a last type argument, while
kotlin.suspend is built with LV=1.2 and has old Continuation.

This change might be reverted once stdlib will be rebuilt with LV=1.3

NB: kotlin.suspend doesn't need to be intrinsified since it only returns
its parameter with checkcast to kotlinin.jvm.functions.Function1
(i.e., it doesn't refer the coroutines package)

 #KT-24861 Fixed
2018-06-21 16:02:13 +03:00
Denis Zharkov
3d3d21cb93 Minor. Extract function in TypeDeserializer 2018-06-21 16:02:13 +03:00
Denis Zharkov
9deb9473d2 Minor. Reformat TypeDeserializer.kt 2018-06-21 16:02:13 +03:00
Denis Zharkov
3fcf2f9c0d Minor. Move KOTLIN_SUSPEND_BUILT_IN_FUNCTION_FQ_NAME constant to 'core'
It will be used for deserialization of kotlin.suspend in the next commit
2018-06-21 16:02:13 +03:00
Denis Zharkov
effdcddeca Minor. Extract createDefaultFakeSMAP in InlineCodegen 2018-06-21 16:02:13 +03:00
Toshiaki Kameyama
5a4cba7528 "To raw/ordinary string literal" intention: Move cursor to same offset after conversion #KT-18106 Fixed (#1675) 2018-06-21 15:56:18 +03:00
Alexander Udalov
51c01c15b8 Refactor KotlinCoreEnvironment, fix warnings 2018-06-21 14:47:28 +02:00
Alexander Udalov
d2f278b601 Minimize content of version-specific bunch files for KotlinCoreEnvironment 2018-06-21 14:47:27 +02:00
Alexander Udalov
9309570752 Fix serialization of type parameters inner generic class
The call to `createTopLevel` instead of `create` (which creates
serializers for outer classes properly, with correct type parameter
contexts) caused MetadataSerializer to write type parameter metadata
incorrectly.  For example, in the following case:

    class A<E> {
        inner class B<T, E> { ... }
    }

A's type parameter E would get id 0, and B's type parameters T and E
would get ids 0 and 1. This is a problem because ids are supposed to be
unique for each class including its outer classes, and deserializer,
decompiler and stub builder rely on this assumption.

JVM metadata is unaffected because `create` is called correctly there,
see MemberCodegen#generateKotlinClassMetadataAnnotation

 #KT-24944 Fixed
2018-06-21 14:45:45 +02:00
Mikhail Zarechenskiy
c05285a23c Remove unneeded bunch file for TargetPlatform.kt
- added missing call checkers
 - fixed missing dependency for `KotlinCallComponents`

 #KT-25018 Fixed
2018-06-21 13:52:10 +03:00
Mikhail Zarechenskiy
6c06d441e5 Fix description of error type 2018-06-21 13:49:37 +03:00
Dmitry Savvinov
70714cb71e Deprecate smartcasts on local delegated properties
^KT-22517 Fixed
2018-06-21 13:36:43 +03:00
Dmitry Savvinov
31ce992ff2 Take DataFlowValueFactoryImpl from DI container instead of constructing directly 2018-06-21 13:36:43 +03:00
Dmitry Savvinov
fa72198505 Minor: narrow deprecation scope of DataFlowValueFactoryImpl to constructor 2018-06-21 13:36:43 +03:00
Dmitry Savvinov
8964b2c7a4 Minor: escape colon properly in interalArgWrongPrefix.args 2018-06-21 13:36:11 +03:00
Anton Bannykh
6edf138460 JS IR: muted newly failing tests 2018-06-21 13:27:17 +03:00
Anton Bannykh
04a2ffc0c1 JS IR: unmute tests 2018-06-21 13:27:17 +03:00
Anton Bannykh
6df9919eba JS IR: add DefaultContructorMarker to the runtime 2018-06-21 13:27:17 +03:00
Anton Bannykh
9039b75c25 JS IR: unmute tests 2018-06-21 13:27:17 +03:00
Anton Bannykh
c077b3ca5d JS IR: invoke missing lowering step for default arguments lowering 2018-06-21 13:27:17 +03:00
Dmitry Petrov
d546fca876 Enable JS_IR back-end on passing 'when' tests 2018-06-21 12:32:00 +03:00
Dmitry Petrov
8999e5bfe6 psi2ir: support unsigned integer literals
NB in FE unsigned integer constants are now represented using signed
integer types (e.g., UInt constant actually holds an Int value).
So, in IR so far we also represent unsigned constant literals as
constant values of corresponding signed types, but with corresponding
unsigned type:
0xFFFF_FFFFu becomes 'CONST Int type=kotlin.UInt value=-1'
2018-06-21 12:32:00 +03:00
Mikhael Bogdanov
c444db90fb Basic support of source mapping in inliner 2018-06-21 11:18:41 +02:00
Mikhael Bogdanov
83ab2b1d34 Minor. Code clean 2018-06-21 11:18:40 +02:00
Mikhael Bogdanov
7c615eb7ab Minor. Reformat 2018-06-21 11:18:40 +02:00
Mikhael Bogdanov
3dff3d61f5 Skip generic signature in bridges 2018-06-21 11:18:39 +02:00
Mikhael Bogdanov
0f7dc6e8af Fix IMPLICIT_COERCION_TO_UNIT 2018-06-21 11:18:38 +02:00
Mikhael Bogdanov
ede751c074 Support more cases in special bridge lowering 2018-06-21 11:18:37 +02:00
Mikhael Bogdanov
64835c1c9c Generate synthetic instructions in loops to support non standart stack transformation 2018-06-21 11:18:37 +02:00
Mikhael Bogdanov
f6038aafcc Fix IMPLICIT_NOT_NULL coercion 2018-06-21 11:18:36 +02:00
Mikhael Bogdanov
a4308e983a Set proper parent for lowered local declaration 2018-06-21 11:18:35 +02:00
Mikhael Bogdanov
c588d22e6a Don't sort descriptors in DeclarationStubGenerator
Sorting adds 30% time to test execution
2018-06-21 11:18:35 +02:00
Alexey Tsvetkov
32b1c42647 Specify root type in non-existent location warning 2018-06-20 23:58:37 +03:00
Alexey Tsvetkov
3fb26d92df Filter out non-existent java source roots in kapt tasks
#KT-24716 fixed
2018-06-20 23:58:37 +03:00
Denis Zharkov
5c04a302fa Add additional checks for RestrictsSuspension-marked functions
Namely, check that when one calls a restricted function
the reciever used for that calls is obtained exactly from the enclosing
suspend function

 #KT-24859 Fixed
2018-06-20 20:00:10 +03:00
Nikolay Krasko
35fdfc9f05 Fix running inner classes from console
#KT-24961 Fixed
2018-06-20 19:52:33 +03:00
Juan Chen
cd91cffdeb as32: Fine-tune exception handling in GooglePluginUpdateVerifier 2018-06-20 19:47:56 +03:00
Nikolay Krasko
bf890b46f3 Allow to leave decline reason empty but demand verifier name 2018-06-20 19:47:55 +03:00
Juan Chen
855c0a353c as32: Improve plugin update verification messages 2018-06-20 19:47:55 +03:00
Juan Chen
6523d4e306 as32: Implementation for GooglePluginUpdateVerifier 2018-06-20 19:47:55 +03:00
Nikolay Krasko
34111e8944 Prototype verify extension and apply it for Kotlin updater in AS 3.2 2018-06-20 19:47:55 +03:00
Dmitry Petrov
871dacbf6c Minor: generated tests update 2018-06-20 17:34:05 +03:00
Mikhail Glukhikh
e1d223937b Optimize "replace toString() with string template"
Related to KT-13782
2018-06-20 17:18:18 +03:00
Mikhail Glukhikh
7a1cf5704e MPP wizard: use more clear wording (KT-20554) 2018-06-20 17:18:18 +03:00
Mikhail Glukhikh
152327d69d Fix erroneous full resolve cache filling
Before this commit, we could store partial resolve results in full
resolve cache (for some declarations, e.g. primary constructors).
This may be done iff current partial resolve mode provides all results
from full resolve mode (CFA results & diagnostics).
Otherwise we should not do it.

This fixes four quick-fix tests on CreateTypeParameter
So #KT-23860 Fixed
So #KT-22758 Fixed
2018-06-20 17:18:18 +03:00
Mikhail Glukhikh
40668e3f96 Partial cleanup of ResolveElementCache 2018-06-20 17:18:18 +03:00
Toshiaki Kameyama
096f9fefd1 "Remove redundant '.let' call" intention: handle it inside function call
So #KT-20583 Fixed
2018-06-20 17:18:17 +03:00
Toshiaki Kameyama
d4798b699f Reformat: ReplaceSingleLineLetIntention 2018-06-20 17:18:17 +03:00
kenji tomita
817d75a47f Introduce ReplaceToStringWithStringTemplateInspection #KT-13782 Fixed 2018-06-20 17:18:17 +03:00
Dmitry Petrov
f956e8d85d Record special descriptor in REFERENCE_TARGET for type alias object
If a type alias is used to reference an object (companion object) as a
qualifier, record FakeCallableDescriptorForTypeAliasObject in
REFERENCE_TARGET. This tells IDE that type alias was used in the file,
thus, if it's imported, such import isn't redundant.
REFERENCE_TARGET is used mostly by IDE and by ClassifierUsageChecker,
which we also have to update to handle qualifiers with
FakeCallableDescriptorForTypeAliasObject in REFERENCE_TARGET.

Rewrite some parts of ClassifierUsageChecker for cleaner interaction.

 #KT-21863 Fixed Target versions 1.2.40
2018-06-20 17:16:25 +03:00
Dmitry Petrov
3b3cc5233f Minor: reformat code 2018-06-20 17:16:25 +03:00
Toshiaki Kameyama
6675d7814c KT-14779 Inspection to replace String.format with string templates (#1645)
* Add inspection to replace String.format with string templates #KT-14779 Fixed

* KT-14779 Fixed
2018-06-20 16:23:04 +03:00
Toshiaki Kameyama
e41a34af88 KT-11850 Add nested lambdas with implicit parameters warning (#1664)
* Add `Nested lambda has shadowed implicit parameter` inspection #KT-11850 Fixed

* KT-11850 Fixed
2018-06-20 15:57:03 +03:00
Roman Artemev
c0f53f3a4d Move IrSuspendableExpression and SuspensionPoint from Kotlin/Native to common part 2018-06-20 15:06:00 +03:00
Dmitry Petrov
c312fddb45 Ignore some 'when' subject variable tests in JS_IR be 2018-06-20 14:06:34 +03:00
Dmitry Petrov
a4b5d74ae3 Generate debug information for 'when' subject variable
NB debugger tests currently don't support language version or individual
language feature settings.
2018-06-20 14:06:34 +03:00
Dmitry Petrov
a7492e91c9 Check that subject expression is evaluated only once 2018-06-20 14:06:34 +03:00
Dmitry Petrov
6194cfc782 Additional IEEE754-related tests for subject variable in 'when' 2018-06-20 14:06:34 +03:00
Dmitry Petrov
34b76a3718 Support subject variable in specialized code generators for 'when' 2018-06-20 14:06:34 +03:00
Dmitry Petrov
3528405666 Minor: reformat 2018-06-20 14:06:34 +03:00
Dmitry Petrov
b4dc3dc91b Fix exhaustiveness check for when with subject variable 2018-06-20 14:06:34 +03:00
Dmitry Petrov
6949610dcb 'val' in 'when': IEEE754 equality 2018-06-20 14:06:34 +03:00
Dmitry Petrov
67247ee490 'val' in 'when' subject can't have modifiers (annotations are ok) 2018-06-20 14:06:34 +03:00
Dmitry Petrov
53fd883e2a Additional parser tests for both subject val and expression in 'when' 2018-06-20 14:06:34 +03:00
Dmitry Petrov
bf083314dd Support 'when' with subject variable in psi2ir 2018-06-20 14:06:34 +03:00
Dmitry Petrov
d6894091a9 Support 'when' with subject variable in JVM BE 2018-06-20 14:06:34 +03:00
Dmitry Savvinov
148d03e365 Add some data flow analysis tests on when 2018-06-20 14:06:34 +03:00
Dmitry Petrov
ae929d0f08 Handle nested when with subject properly
Hack: callee expression for when with subject variable is the subject
variable declaration. This solves the problem that all sub-calls in the
expression are implicitly considered to have a single common lexical
scope (and 'when (val x = ...)' introduces a new lexical scope, which
contains 'x').
2018-06-20 14:06:34 +03:00
Dmitry Petrov
758548603e Extra tests for when with val in subject 2018-06-20 14:06:34 +03:00
Dmitry Petrov
c691d64ea8 Minor: fix & reformat after rebase 2018-06-20 14:06:34 +03:00
Dmitry Petrov
8aec99f4b5 Fix parsing variable declaration in when subject
- parse destructuring declarations
- parse annotations on variable declaration in when subject
2018-06-20 14:06:34 +03:00
Dmitry Petrov
091b935c2d Introduce separate callee expression for when with subject variable
'Subject.Error' is redundant.
'Subject.None' can be an object.
'Subject#dataFlowValue' can be a lateinit property.

TODO: fix
- parsing local extension properties in 'when' subject
- parsing destructuring declarations in 'when' subject
- non-completed calls in nested 'when' with subject variable
- non-completed calls for subject variable in 'in' pattern
2018-06-20 14:06:34 +03:00
Dmitry Petrov
a76bf57694 Minor: remove redundant cast 2018-06-20 14:06:34 +03:00
Dmitry Petrov
5f0c9490bb Add test for smart cast on a value bound to when subject variable
E.g.:
  when (val y = x?.foo()) {
    null -> ...
    else -> ... // 'x' is also non-null here
  }
2018-06-20 14:06:34 +03:00
Dmitry Petrov
0a0bc67e8a Add test for UNUSED_VALUE on when subject variable 2018-06-20 14:06:34 +03:00
Dmitry Petrov
c20c1abb68 Add test for VAL_REASSIGNMENT on when subject variable 2018-06-20 14:06:34 +03:00
Dmitry Petrov
f6d446da47 It's ok to have no subject expression 2018-06-20 14:06:34 +03:00
Dmitry Petrov
7bc89b8871 Report error on illegal variable declaration in when subject 2018-06-20 14:06:34 +03:00
Dmitry Petrov
4fe894c03d Minor: extract variable subject processing to a separate fun 2018-06-20 14:06:34 +03:00
Dmitry Petrov
098d3eb235 Make smart casts work with variable declared in when subject 2018-06-20 14:06:34 +03:00
Dmitry Petrov
1eeafc2d0e Resolve variable declaration in 'when' subject 2018-06-20 14:06:34 +03:00
Toshiaki Kameyama
84e49e5b57 JS: Fix ClassCastException that occurs when 'when' clause has map range #KT-23458 Fixed 2018-06-20 14:00:29 +03:00
Toshiaki Kameyama
65ba57bcae JS: Fix TranslationRuntimeException on 'for (x in ("a"))' #KT-22376 Fixed 2018-06-20 13:59:10 +03:00
cobr123
db3c9962a2 Updates ReadMe.md JS issue link
{Backend. JS} instead {Back-end. JavaScript}
2018-06-20 12:51:10 +03:00
Dmitry Savvinov
9c61f65c0f Support internal compiler flags (-XX) in facets importing 2018-06-20 12:40:11 +03:00
Dmitry Savvinov
3fdfb49ac6 Minor: reformat and clean-up facetUtils.kt 2018-06-20 12:40:11 +03:00
Egor Neliuba
4fd076e4f4 Fix typo in DefaultErrorMessagesAndroid
"Delegating 'Parcelable' is now allowed" -> "Delegating 'Parcelable' is not allowed"
2018-06-20 01:04:30 +03:00
Yan Zhulanow
83ec49db31 Pill: Ignore kotlin-scripting compiler plugin from compiler arguments 2018-06-20 01:00:25 +03:00
Vyacheslav Gerasimov
fa56afca08 as31: Revert unintended changes in plugin.xml.as31 2018-06-19 21:35:26 +03:00
Vyacheslav Gerasimov
ea98a892d2 as31: Set until-build to 173.* instead of last AS 3.1 version (173.4301.25)
Was 173.4301.25 because of early builds of AS 3.2 which were 173 based
2018-06-19 21:05:58 +03:00
Vyacheslav Gerasimov
fa2eafe214 as31: Update AS to 3.1.3.0 2018-06-19 21:05:57 +03:00
Mikhail Zarechenskiy
fcacdc1fc5 Fix bridge methods generation when inline class types are used 2018-06-19 20:09:35 +03:00
Mikhail Zarechenskiy
f326fd66be Propagate KotlinType into if expression codegen for inline classes 2018-06-19 19:54:22 +03:00
Mikhail Zarechenskiy
c8c943e5fe [NI] Use context for relevant nested call to run call checkers
#KT-24808 Fixed
2018-06-19 19:54:21 +03:00
Roman Artemev
f69bd54d6c [JS IR BE] Update test data 2018-06-19 17:09:31 +03:00
Roman Artemev
02628e8de3 [JS IR BE] Support exceptions in IR BE runtime 2018-06-19 17:09:24 +03:00
Roman Artemev
b65443dd25 [JS IR BE] Support try-catch-finally in new backend 2018-06-19 17:08:14 +03:00
Alexey Tsvetkov
cdfcedb897 Minor: reword progress message
#KT-24936 fixed
2018-06-19 15:43:24 +03:00
Pavel V. Talanov
5063a4ce3d JavaElementFinder: revert to using ContainerUtil.quicksort
Fix comparator contract violated exception
Scopes inherited from LibraryScopeBase violate the comparator contract
2018-06-19 13:40:23 +02:00
Alexander Udalov
e689733f69 Revert "Map Kotlin TYPE target to Java TYPE_USE in bytecode"
This reverts commit d122406dca.

See KT-23857

 #KT-24952 Fixed
2018-06-19 12:08:18 +02:00
Alexander Udalov
863639c9ab Revert changes to data class equals/hashCode (KT-12330)
This looked like a small and useful change, but caused so many issues
(KT-24474, KT-24790, 30b9caea, and another unreported one -- see the
test update in this commit) that it didn't pay off after all. The
optimization is not that critical for now, as it's only relevant for
data classes where component types have trivial equals/hashCode
implementation, which is not very often

 #KT-12330 Declined
2018-06-19 12:05:55 +02:00
Max Medvedev
21ca06dace KT-22333 Extract function: make name editor focused once again 2018-06-19 12:51:18 +03:00
Toshiaki Kameyama
1e31d24e9b Add "Remove 'const'" quickfix for TYPE_CANT_BE_USED_FOR_CONST_VAL
So #KT-24815 Fixed
2018-06-19 12:48:13 +03:00
Toshiaki Kameyama
c344354395 Add quick-fix for 'is' absence in when #KT-18810 Fixed 2018-06-19 12:48:13 +03:00
Toshiaki Kameyama
2427406a8f Add 'Change to val' quickfix for delegates without setValue
So #KT-13688 Fixed
2018-06-19 12:48:13 +03:00
Toshiaki Kameyama
3292137acb "Convert lambda to anonymous function": Don't suggest in inline function
So #KT-24792 Fixed
2018-06-19 12:48:12 +03:00
Toshiaki Kameyama
fa58da85ee Add indices: don't suggest if parameter is destructuring declaration
So #KT-22162 Fixed
2018-06-19 12:48:12 +03:00
Toshiaki Kameyama
752c576e20 Reformat: AddForLoopIndicesIntention 2018-06-19 12:48:12 +03:00
Toshiaki Kameyama
2669193755 Use "Move to companion" quick fix for CONST_VAL_NOT_TOP_LEVEL_OR_OBJECT
So #KT-22871 Fixed
2018-06-19 12:48:12 +03:00
Toshiaki Kameyama
69d2e8898a "Main should return Unit" inspection: extend on JUnit test methods
So #KT-24509 Fixed
2018-06-19 12:48:11 +03:00
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
c2067eaa12 (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
Roman Artemev
6ac4fd2e5f [JS IR BE] Update test data 2018-06-14 19:54:30 +03:00
Roman Artemev
17d71f1e46 [JS IR BE] Implement type check
* IrTypeOperator lowering
 * runtime support
 * refactoring
2018-06-14 18:40:06 +03:00
Alexander Udalov
50eda3b8a0 Make metadata writers' properties protected
These properties are only supposed to be used from Writer classes in
KotlinClassMetadata
2018-06-14 17:19:08 +02:00
Alexander Udalov
fec2c14ea5 Support local delegated properties in kotlinx-metadata-jvm 2018-06-14 17:19:08 +02:00
Alexander Udalov
b00f765255 Pass whole ReadContext/WriteContext to kotlinx-metadata extensions 2018-06-14 17:19:08 +02:00
Anton Bannykh
05123c13f8 [JS IR BE] mute ranges' tests 2018-06-14 18:17:43 +03:00
Mikhail Glukhikh
cbcd35e2f5 Implement Kotlin sub-classes tooltip to handle MPP correctly
Before this commit, Java tooltip was in use which could not
work correctly with expect / actual classes
So #KT-21011 Fixed
2018-06-14 15:42:37 +03:00
Mikhail Glukhikh
90b6f369e0 Module-specific list cell renderer: wrap into runReadAction
This should fix KotlinGoto*ModuleTestGenerated.testExpectClassSuperclass
and related exception in IDEA
Additional fix for KT-23685
2018-06-14 13:55:31 +03:00
Mikhail Glukhikh
3d4b407d0c MPP wizard: introduce structure: root <- common <- js / jvm
This commit also removes deprecated structure with common root
So #KT-20554 Fixed
2018-06-14 13:14:45 +03:00
Ilya Chernikov
cf294b57f0 Update changelog with changes in 1.2.50 2018-06-14 12:02:40 +02:00
Alexander Udalov
5d76e463d3 Fix exception from reflection on local delegated properties
The problem was that in JvmSerializerExtension.writeLocalProperties, we
only serialized metadata for local properties, but indices generated in
MemberCodegen.generatePropertyMetadataArrayFieldIfNeeded were among all
delegated properties in the class (not only local). This behaved
incorrectly as long as there was a local and a non-local delegated
property in the same class. For example, if there were 5 non-local
properties and then one local, that local property would get the index 5
and the synthetic signature "<v#5>". But there would only be one
Property entry in the metadata, and so reflection would fail here trying
to load the 5th element of the list which contains only one element.

Now, the index for a local delegated property is computed only as the
number of _local_ delegated properties above it in the class, i.e. the
first local delegated property gets index 0 (and synthetic signature
"<v#0>"), the next one -- index 1, and so on.

 #KT-23413 Fixed
2018-06-14 11:07:26 +02:00
Alexander Udalov
b8722ad213 Fail with KotlinReflectionInternalError on non-found local delegated property
Instead of IndexOutOfBoundsException from the protobuf internals which
was thrown when loading extension with a non-existing index out of the
list of all extensions (KT-23413)
2018-06-14 11:07:26 +02:00
Pavel V. Talanov
2d7df21b0f JavaElementFinder: fix classes not being sorted as intended
This is tested by `whole project` inspection tests

 #KT-24704 Fixed
2018-06-14 10:51:13 +02:00
Vyacheslav Gerasimov
aae0f5123e Build: Specify metadata source for ivy repositories
Otherwise composite build with Kotlin Native fails unable to resolve metadata files
2018-06-13 20:43:16 +03:00
Vyacheslav Gerasimov
992a31af88 Build: introduce javaPluginConvention extension on project
`ExtensionAware.the<T>()` introduced in gradle 4.7 made existing calls `the<JavaPluginConvention>()` invalid (on wrong receiver)
2018-06-13 19:43:03 +03:00
Vyacheslav Gerasimov
94c636adc3 Build: Fix usage of jvmArgs which became nullable 2018-06-13 19:43:03 +03:00
Vyacheslav Gerasimov
4b3a989b90 Build: Workaround IndexOutOfBoundsException on configuration with gradle 4.7
Using delegated property syntax somehow causes IndexOutOfBoundsException from kotlin-reflect, needs further investigation

Should be reverted after #KT-23413 is resolved
2018-06-13 19:43:03 +03:00
Ilya Gorbunov
0065a74c7e Update to gradle 4.7, fix nullability issue in buildSrc
JavaExec args list is nullable now, so use orEmpty before copying it.
2018-06-13 19:43:03 +03:00
Mikhail Glukhikh
37124e0c0d Make collectSlowLineMarker handle parents to deal with changes correctly
So #KT-20825 Fixed
So #KT-21113 Fixed
Related to IDEA-141330 fix
2018-06-13 19:23:41 +03:00
Mikhail Glukhikh
232d340118 Expect/actual companion object: set gutter on leaf element
May fix KT-21113
2018-06-13 19:23:40 +03:00
Mikhail Glukhikh
0a2ed054f1 Add module-specific cell renderers to navigate to actuals correctly
So #KT-23685 Fixed
2018-06-13 19:23:39 +03:00
Mikhail Glukhikh
efd6b7a035 KotlinGotoTargetRenderProvider: .java -> .kt 2018-06-13 19:23:38 +03:00
Mikhail Glukhikh
ab32a9a564 Minor enhancement of "actual" gutter
This makes hint about Ctrl+Alt+B available
2018-06-13 19:23:37 +03:00
Mikhail Glukhikh
f139847e47 Cleanup: KotlinLineMarkerProvider 2018-06-13 19:23:36 +03:00
Mikhail Glukhikh
cfd1a54463 Do not create expect / actual gutters for primary constructor
So #KT-22177 Fixed
So #KT-21063 Obsolete
2018-06-13 19:19:26 +03:00
Mikhail Glukhikh
b235af0656 Can be private: correct detection of calls inside inline accessors 2018-06-13 19:17:50 +03:00
Mikhail Glukhikh
542f0a61d1 Unused receiver: optimization 2018-06-13 18:12:37 +03:00
Mikhail Glukhikh
faa8d92560 Unused receiver: do not report on actual declarations #KT-24562 Fixed 2018-06-13 18:12:36 +03:00
Mikhail Glukhikh
38632c2937 Can be private: correct detection of calls inside inline function
So #KT-22180 Fixed
So #KT-22094 Fixed
2018-06-13 18:12:34 +03:00
Mikhail Glukhikh
a8737a1278 Can be private -> could be private (violation of naming convention) 2018-06-13 18:12:33 +03:00
Mikhail Glukhikh
88974ee32b Can be private: simplification
Related to KT-22030
2018-06-13 18:12:31 +03:00
Toshiaki Kameyama
7786896e9b Can be private: don't report when object or subclass calls the function
Questionable
So #KT-22030 Fixed
2018-06-13 18:12:30 +03:00
Mikhail Glukhikh
6c8276b701 Do not report "can be private" on annotated declarations #KT-24422 Fixed 2018-06-13 18:12:28 +03:00
Mikhail Glukhikh
d1155070a7 Do not report "can be private" on expect or actual declarations
So #KT-24374 Fixed
So #KT-24537 Fixed
2018-06-13 18:12:27 +03:00
Mikhail Glukhikh
11acea51b7 Reformat: can be private inspection 2018-06-13 18:12:25 +03:00
Mikhail Glukhikh
a09f6e14a5 Do not suggest "convert to object" for sealed sub-classes with state
So #KT-24816 Fixed
2018-06-13 18:12:18 +03:00
Alexander Udalov
813d7fcb6a Fix bytecode for equals/hashCode of data classes once again
#KT-24790 Fixed
2018-06-13 16:06:20 +02:00
Alexander Udalov
8749bd901b Fix MalformedParameterizedTypeException on classes from kotlin-reflect
This allows GraalVM's `native-image` to work correctly on
kotlin-reflect.jar. The size of the artifact has increased only by 66
bytes

 #KT-23962 Fixed
2018-06-13 16:01:34 +02:00
Alexander Gorshenev
6d7dd58f70 Separated idl2k frontend and backend invocations. 2018-06-13 15:45:54 +03:00
Ilmir Usmanov
6b777356e8 Add test with java reflection 2018-06-13 15:08:32 +03:00
Ilmir Usmanov
de7aa23119 Make private inline suspend functions effectively inline-only 2018-06-13 15:08:26 +03:00
Ilmir Usmanov
8a5ae16947 Generate separate methods for inline and noinline uses of inline suspend functions
Previously, inline suspend functions were effectively inline only,
but ordinary inline functions can be used as noinline.
To fix the issue, I generate two functions: one for inline with suffix
$$forInline and without state machine; and the other one without any
suffix and state machine for direct calls.
This change does not affect effectively inline only suspend functions,
i.e. functions with reified generics, annotated with @InlineOnly
annotation and functions with crossinline parameters.
 #KT-20219: Fixed
2018-06-13 15:08:19 +03:00
Alexander Udalov
bb4972b00e Regenerate tests 2018-06-12 14:01:33 +02:00
Alexander Udalov
fab45365c9 Update .idea/misc.xml for IDEA 2018.2 2018-06-12 14:01:33 +02:00
Nicolay Mitropolsky
79487a6a21 KotlinLanguageInjector: injecting into returned literals (#KT-21673) 2018-06-09 22:56:25 +03:00
Anton Bannykh
675d02093d mute new test + regenerate tests 2018-06-09 19:59:19 +03:00
Anton Bannykh
5fdc304a51 JS_IR: mute coroutine tests 2018-06-09 19:15:38 +03:00
Anton Bannykh
96355e2732 JS IR: mute codegen box tests automatically 2018-06-09 19:15:38 +03:00
Anton Bannykh
7e1713af44 Tests: keep "// !" directives first when auto-muting box tests 2018-06-09 19:15:38 +03:00
Anton Bannykh
1e169b0838 JS_IR: add common codegen box tests (same as for old backend) 2018-06-09 19:15:38 +03:00
Vyacheslav Gerasimov
7fb2452dba 182: Fix toNullability clash in j2k 2018-06-09 16:51:24 +03:00
Vyacheslav Gerasimov
411afb0303 182: Suppress compiler proguard warnings from intellij-core dependencies 2018-06-09 14:45:55 +03:00
Vyacheslav Gerasimov
272f8b832b 182: Set since build to 182.3040 2018-06-09 14:44:50 +03:00
Yan Zhulanow
e57463e5fd 182: Fix compatibility with the Android plugin from AS 3.1
(cherry picked from commit 0592121)
2018-06-09 14:44:50 +03:00
Vyacheslav Gerasimov
4dbcb2e50e 182: Switch 182 to SNAPSHOT builds (until next EAP)
Android plugin 3.1 is merged to IJ 182, we need to provide compatible plugin
2018-06-09 14:44:50 +03:00
Ростов Сергей
d9c9e6ef0a jps, mpp: fix GenerateTests.kt.172 2018-06-09 11:18:55 +03:00
Yan Zhulanow
3df6d63580 Minor: Fix compilation after unsuccessful rebase. Add back the isMultiplatformModule() method 2018-06-09 00:19:17 +03:00
Yan Zhulanow
3ec33f4193 Debugger: Evaluate expression in MPP common module: @JvmName is unresolved (KT-23162) 2018-06-08 19:37:47 +03:00
Yan Zhulanow
e334f693b2 Minor: Do not place line markers in code fragments and in non-Kotlin files 2018-06-08 19:37:47 +03:00
Yan Zhulanow
ab5614eaac Minor: Replace a number of trivial Guava usages with constructor calls and kotlin-stdlib function calls 2018-06-08 19:37:47 +03:00
Yan Zhulanow
61ffde54fd Minor: Remove unneeded bunch file 2018-06-08 19:37:21 +03:00
Yan Zhulanow
ed43cb57e3 PrePush: Add a pre-push warning before committing to locked branches 2018-06-08 19:37:21 +03:00
Yan Zhulanow
bf10c1162a Kapt: Fix Gradle input/output verification 2018-06-08 19:37:21 +03:00
Yan Zhulanow
8645be3ace Kapt: Remove the remaining kapt1-related code in Gradle plugin 2018-06-08 19:37:20 +03:00
Yan Zhulanow
5f43808cfd Revert "Debugger: Fix breakpoints and stepping for inline-only function lambda arguments (#KT-23064)" 2018-06-08 19:37:20 +03:00
Yan Zhulanow
d851c8679a Fix a number of potential exceptions in debugger (EA-119717) 2018-06-08 19:37:20 +03:00
Yan Zhulanow
0f15dfdfdc Handle AbsentInformationException correctly (EA-119717) 2018-06-08 19:37:20 +03:00
Yan Zhulanow
4dfcb72fa1 Print source file location/contents if possible (EA-120038) 2018-06-08 19:37:20 +03:00
Yan Zhulanow
fc6057e34f Fix NPE in DelegateSourcePosition (EA-120042) 2018-06-08 19:37:20 +03:00
Yan Zhulanow
d08dcb9f0f Add missing read action in debugger (EA-120163) 2018-06-08 19:37:20 +03:00
Yan Zhulanow
93d668ad63 Support types without backing ClassLoader in 'safeArgumentTypes()' (EA-120387) 2018-06-08 19:37:19 +03:00
Yan Zhulanow
64ea16fdfc Kapt: Allow running kapt using Workers API in Gradle 2018-06-08 19:37:19 +03:00
Yan Zhulanow
2bc45e0484 Kapt: Extract annotation processing running logic from the compiler plugin 2018-06-08 19:37:19 +03:00
Yan Zhulanow
3ecf355e7a Kapt: Leave getBasePath() in ProGuard-ed kotlinc 2018-06-08 19:37:19 +03:00
Yan Zhulanow
eb4492394e Kapt: Fix compatibility with Java 9
1. Move option set up to one place, before using any of Java context components;
2. Set Javac file manager options (new to Java 9)
2018-06-08 19:37:19 +03:00
Yan Zhulanow
386f05bb91 Fix "Run" action for Kotlin sources in non-Android modules 2018-06-08 19:37:18 +03:00
Yan Zhulanow
ab611a20c5 Kapt: Do now show a warning for APs from 'annotationProcessor' configuration also declared in 'kapt' configuration (#KT-23898) 2018-06-08 19:27:00 +03:00
Yan Zhulanow
e1d22b8515 MPP: Fix implemented modules importing in Android projects (#KT-23697) 2018-06-08 19:27:00 +03:00
Yan Zhulanow
614003ad70 Android Extensions: Allow to disable specific features of Android Extensions (#KT-23244) 2018-06-08 19:26:59 +03:00
Yan Zhulanow
a70707b72b Android Extensions: Allow to access library project resources in Gradle setup (#KT-22430) 2018-06-08 19:26:59 +03:00
Yan Zhulanow
5eedbf4177 G2K: Rewrite AndroidGradleWrapper in Kotlin 2018-06-08 19:26:59 +03:00
Yan Zhulanow
9aa02c7ae4 G2K: Move AndroidGradleWrapper to the Kotlin source set, rename to .kt 2018-06-08 19:26:59 +03:00
Mikhail Zarechenskiy
d29f3fc3c5 Add test to check work of inline classes with callable references 2018-06-08 19:14:41 +03:00
Mikhail Zarechenskiy
8148bdc4d0 Support inline classes in MPP resolver/checker model 2018-06-08 19:13:39 +03:00
Alexander Podkhalyuzin
3d57276bc6 Fixed Readme about Gradle Test Runner 2018-06-08 18:44:25 +03:00
Denis Zharkov
01a2330a70 Avoid retaining protobuf package within DeserializedPackageFragmentImpl
It's only used for DeserializedPackageMemberScope that's being created
during initialization

At the same time, protobuf objects may be not very light-weight
(see 2e933a165a)

 #KT-24513 Fixed
2018-06-08 17:49:40 +03:00
Denis Zharkov
0a3e8fbe66 Pull down some implementation details from DeserializedPackageFragment
- DeserializedPackageFragmentImpl doesn't actually need member scope to be lazy
in a sense of optimization. It was only necessary for breaking
initialization cycle: DeserializationComponents <-> DeserializedPackageFragment
- For MetadataPackageFragment it might be useful to have
member scope actually lazy since it has O(n) complexity when n is a number
of package parts

This change is helpful for avoidance of storing reference to package-proto

 #KT-24513 In Progress
2018-06-08 17:49:40 +03:00
Nikolay Krasko
99b44faf5a Add information about bunch files to ReadMe 2018-06-08 17:11:16 +03:00
Alexey Sedunov
fc5a0b6768 Misc: Fix compilation of KotlinAwareJavaGetterRenameProcessor in 172 2018-06-08 16:01:40 +03:00
Vyacheslav Gerasimov
020d941c27 Fix test compilation for AS branches
There is no devkit is AS
2018-06-08 15:26:47 +03:00
Nikolay Krasko
88bbeae270 Make Tools->Kotlin be visible in dumb mode (KT-12075)
Kotlin update check works fine in dumb mode already.

 #KT-12075 Fixed
2018-06-08 14:44:08 +03:00
Nikolay Krasko
19eaf9289b Reformat: KotlinPluginUpdater.kt 2018-06-08 14:44:07 +03:00
Nikolay Krasko
f797592365 Minor: leave bunch directive for 173-specific code 2018-06-08 14:44:07 +03:00
Nikolay Krasko
f8d352c3d0 Fix auto-indent for when entry (KT-24743)
#KT-24743 Fixed
2018-06-08 14:44:07 +03:00
Nikolay Krasko
cd54c7922d Fix lambda return hint for labeled expressions (KT-24828)
#KT-24828 Fixed
2018-06-08 14:44:07 +03:00
Nikolay Krasko
076870ee05 Fix double return hint in lambda for annotated expression (KT-23238)
#KT-23238 Fixed
2018-06-08 14:44:06 +03:00
Nikolay Krasko
c5d5f0c2e2 Minor: reformat LambdaReturnValueHints.kt 2018-06-08 14:44:06 +03:00
Nikolay Krasko
9fbb7c5d14 Reformat: search\ideaExtensions package 2018-06-08 14:44:06 +03:00
Dmitry Savvinov
6d29e14a33 Improve message for serialization crash in JavaClassTrackerImpl 2018-06-08 14:38:44 +03:00
Alexey Sedunov
0ea1784d33 Introduce Parameter: Add suspend to lambdas with nested suspend-calls
#KT-24712 Fixed
2018-06-08 14:34:23 +03:00
Alexey Sedunov
8a838ab5bb Change Signature: Fix parameter name for kt-function overriding Java's
#KT-24763 Fixed
2018-06-08 14:34:23 +03:00
Alexey Sedunov
8978c4b9e8 Rename: Fix processing of references to synthetic Java properties
#KT-17742 Fixed
2018-06-08 14:34:23 +03:00
Alexey Sedunov
862dc76ed9 Rename: Fix processing of overriding methods with mangled names
#KT-24460 Fixed
2018-06-08 14:34:22 +03:00
Alexey Sedunov
eea9113d1c Introduce Type Alias: Fix replacement of references to nested classes
#KT-15159 Fixed
2018-06-08 14:34:22 +03:00
Alexey Sedunov
3902e1b51d Run: Add browse button to Kotlin "main" run configuration editor
#KT-17668 Fixed
2018-06-08 14:34:22 +03:00
Alexey Sedunov
8a09dcf821 Configuration: Update settings.gradle without loading its PSI
Otherwise dumb-mode problems may happen in latest builds of 182

 #KT-24667 Fixed
2018-06-08 14:34:22 +03:00
Sergey Rostov
c71357dd76 173: jps, mpp: fix AbstractIncrementalJpsTest.kt.173 2018-06-08 13:50:05 +03:00
Mikhael Bogdanov
a0060dd25b Generate synthetic method for @JvmDefault properties in DefaultImpls 2018-06-08 10:08:23 +02:00
Sergey Rostov
5455b6c0c0 jps: add common source roots to the final platform modules as a workaround for absence of incremental k2metadata compiler 2018-06-08 09:46:56 +03:00
Sergey Rostov
e0d44ecb90 jps, daemon: pass incremental compilation flag from jps process to daemon (fix) 2018-06-08 09:46:55 +03:00
Sergey Rostov
f86c6db4bf Idea gradle: proper support for composite MPP projects
(cherry picked from commit ca841f0)

#KT-24748 fixed
2018-06-08 09:46:54 +03:00
Sergey Rostov
80ed963f97 jps, daemon: (minor) formatting 2018-06-08 09:46:53 +03:00
Sergey Rostov
e831964871 jps, daemon: pass incremental compilation flag from jps process to daemon 2018-06-08 09:46:52 +03:00
Sergey Rostov
ce96c1b9a8 jps, daemon: fix javascript inline functions tracking
inline function hash should computed after compilation
2018-06-08 09:46:50 +03:00
Sergey Rostov
5a2ed364fe jps: checkCachesVersions for js and common (BuildMetaInfo save/check) 2018-06-08 09:46:49 +03:00
Sergey Rostov
3cfb200e07 jps: improve KotlinDirtySourceFilesHolder 2018-06-08 09:46:48 +03:00
Sergey Rostov
b5acb83325 jps: (minor) fix java module detection 2018-06-08 09:46:47 +03:00
Sergey Rostov
5478a552ed jps, js: Fix exception on rebuild js module 2018-06-08 09:46:46 +03:00
Sergey Rostov
d75a2be31b jps: Don't create cache for common modules (KOTLIN-CR-2028) 2018-06-08 09:46:45 +03:00
Sergey Rostov
c24aa13f12 jps: fixes for KOTLIN-CR-2028 2018-06-08 09:46:44 +03:00
Sergey Rostov
c2d87140ec jps, daemon: fix JsFunction.toString() serialization 2018-06-08 09:46:43 +03:00
Sergey Rostov
40b9fa88b7 jps: fix mergedCompilerArguments getter (mergedCompilerArguments) 2018-06-08 09:46:42 +03:00
Sergey Rostov
1cbef873ec jps: implement mpp and js daemon compiler services
#KT-24635 fixed
2018-06-08 09:46:41 +03:00
Sergey Rostov
b2fedd7b1e jps, mpp: fix marking expect/actual complementary files as dirty
This files should be marked as dirty for current round, not next
2018-06-08 09:46:40 +03:00
Sergey Rostov
65bdfa72c1 jps: support KotlinSourceRootType
KotlinSourceRootType will added with KotlinSourceRootProvider (ex KotlinMppCommonSourceRootProvider).
New target type (with computeAllTargets) is not possible because ModuleBuildTarget is final.

#KT-24506 fixed
2018-06-08 09:46:39 +03:00
Sergey Rostov
b2f58ad9c3 jps, mpp: temporary disable mpp tests 2018-06-08 09:46:38 +03:00
Sergey Rostov
0eee2729cd jps: support multiplatform incremental compilation for jvm and js
- support common modules metadata compilation under flag (it is not required since all common source roots are included transitively for now)
- introduce expect actual tracker in jps: move implementation from gradle to build-common
- support js incremental compilation: move implementation from gradle to build-common
2018-06-08 09:46:37 +03:00
Sergey Rostov
4a6554a36d multiplatform: remove MultiplatformGradleProjectTaskRunner
JPS is now able to build multiplatform projects, so build/run actions should be delegated to gradle only with "Delegate IDE build/run action actions" setting enabled.
2018-06-08 09:46:36 +03:00
Sergey Rostov
f7695dd039 mpp: Run tests from common modules should recompile correspond JVM implementation module
#KT-23722 Fixed
2018-06-08 09:46:35 +03:00
Ivan Gavrilovic
44482dbe90 Revert access modifier change in android history 2018-06-07 19:10:09 +03:00
Ivan Gavrilovic
728508e0ae Return an error when build history for dir does not exist 2018-06-07 19:10:04 +03:00
Ivan Gavrilovic
6bb54fd9a3 Support fetching build history files from directories for Android
Android Gradle plugin will start publishing clases in directories.
This commit adds support to find build history files when changed
files come from directories. It is similar to existing implementation
for jars i.e. it looks for .kotlin_module file under META-INF.

Test: ModulesApiHistoryAndroidTest
2018-06-07 19:10:00 +03:00
Mikhail Zarechenskiy
b2d9015723 Prohibit identity equals on inline class types 2018-06-07 18:22:05 +03:00
Mikhail Zarechenskiy
9891f562cc [NI] Make subtyping algorithm more robust to error types
During subtyping/incorporation we transform types (e.g. changing nullability,
 form of the type) and, basically, we're doing this to some FIXPOINT.
 It's important that we use `KotlinType.hashCode()` to compare types, but
 for error types hashCode is a hashCode of its supertype and, for example,
 `makeNullableAsSpecified` method recreate type every time. So, we continue
 to generate new constraints and we'll never stop incorporation algorithm
2018-06-07 15:45:53 +03:00
Ilya Gorbunov
1ee37b1772 Update ReadMe for stdlib-js 2018-06-07 14:39:48 +03:00
Anton Bannykh
544222167e Update ReadMe.md
js.libraries doesn't exist anymore
2018-06-07 14:11:37 +03:00
Mikhail Zarechenskiy
177d949f75 Advance bootstrap to 1.2.60-dev-544 2018-06-07 13:13:20 +03:00
Svyatoslav Kuzmich
563637548a KJS: Fix loop levels in ContinueReplacingVisitor (KT-24777) 2018-06-07 12:57:36 +03:00
Svyatoslav Kuzmich
2ec8c4aae6 KJS: Label loops in LabeledBlockToDoWhileTransformation
Fix KT-24542: insert labes for affected loops, breaks and continues
statements during LabeledBlockToDoWhileTransformation
2018-06-07 12:57:36 +03:00
Pavel V. Talanov
463d9b690f Minor: rename PsiFile.moduleInfo -> forcedModuleInfo 2018-06-06 21:04:05 +02:00
Pavel V. Talanov
74052542b4 Minor: rename KtFile.targetPlatform -> forcedTargetPlatform
To avoid confusing with platform extension and debugging for 3 hours
2018-06-06 21:04:04 +02:00
Pavel V. Talanov
ced3cf0904 Light classes: fix multifile facades for mpp modules with jvm part
When creating multifile facades respect that facade files can be both
    in common and jvm parts

 #KT-23942 Fixed
2018-06-06 21:04:02 +02:00
Pavel V. Talanov
a8a490ea5a Test multifile facades in mpp projects 2018-06-06 21:04:00 +02:00
Pavel V. Talanov
8185b1bf02 Test accessing file facades from java in mpp project 2018-06-06 21:03:57 +02:00
Pavel V. Talanov
1be477c816 Fix "add member" quick fix when invoked from java on common class
#KT-24115 Fixed
2018-06-06 21:03:56 +02:00
Pavel V. Talanov
9e493d8b73 Mpp tests: allow to test java code in highlighting and quickfix tests 2018-06-06 21:03:55 +02:00
Pavel V. Talanov
0157d7bd5d Mpp utils: remove erroneous cache
Note: can't use Module.cached to calculate data that depends on input
   other than the module itself (isTests in this case)
2018-06-06 21:03:53 +02:00
Pavel V. Talanov
1f957de9d8 Minor: use utils appropriately 2018-06-06 21:03:52 +02:00
Pavel V. Talanov
fa7531f342 Refactor: move and prettify mpp util code 2018-06-06 21:03:51 +02:00
Pavel V. Talanov
05e6c4e0a2 Minor: move utils to more appropriate place 2018-06-06 21:03:50 +02:00
Pavel V. Talanov
e67f449476 Fix exception from kotlin bytecode window on common code
Do not show bytecode window for non-jvm platform modules

 #KT-24159 Fixed
2018-06-06 20:48:18 +02:00
Pavel V. Talanov
d18846201a JavaElementFinder: avoid returning fake light class in findClass*
findClass* are supposed to return a single visible class
    from given scope with given fqname
After sorting FakeFileForLightClass would sometimes be first in the list
    leading to exceptions like KT-24704

  #KT-24704 Fixed
2018-06-06 20:45:41 +02:00
Pavel V. Talanov
86e52f45b1 J2K JavaElementFinder: prettify code 2018-06-06 20:45:41 +02:00
Pavel V. Talanov
6cea843461 J2K JavaElementFinder: autoconvert and fix compilation errors 2018-06-06 20:45:41 +02:00
Pavel V. Talanov
00b1e9281b J2K JavaElementFinder: rename file 2018-06-06 20:45:41 +02:00
Alexey Tsvetkov
451c732b8f Test: speed up tests by minimizing number of tasks to run
E.g. avoid building release variants for Android
(extremely slow due to proguard minification, optimization)
2018-06-06 17:54:51 +03:00
Alexey Tsvetkov
0383584f33 Test: rename file to match class name 2018-06-06 17:54:51 +03:00
Alexey Tsvetkov
0c12b0e5fb Test: refactor Gradle daemon memory test
Currently the test makes more harm than use:
* It is too slow: two executions (with different Gradle versions)
take 5 minute on CI.
* It is unreliable: the test fails on CI for months
with insignificant violation of the memory growth limit.

After this change:
* the memory growth limit is increased;
* the test run count is decreased;
* changes the test to use separate project with minimal amount of classes
(we're not interested in compiler's memory leaks; only Gradle plugin specific ones);
2018-06-06 17:54:51 +03:00
Alexey Tsvetkov
43e7b0425d Test: move Gradle daemon memory test to separate class 2018-06-06 17:54:50 +03:00
Ilya Gorbunov
0f972f2412 Restore default parameter values in JS collection constructors
Even if they now have overloads that will be selected when these parameters are omitted.
This is to preserve compatibility with the libraries compiled against the older library.

#KT-24782 Fixed
2018-06-06 15:32:34 +03:00
Nicolay Mitropolsky
c150878086 172: Uast: testdata fixes 2018-06-06 14:05:31 +03:00
Nicolay Mitropolsky
5c8e4958db Uast: exposing enum constants literal values (#KT-23456) 2018-06-06 14:05:30 +03:00
Nicolay Mitropolsky
12707a6443 Uast: handling resolve to deserialized methods (KT-24679) 2018-06-06 14:05:30 +03:00
Nicolay Mitropolsky
2ede37496c 173: Uast: removing kotlinInternalUastUtils.kt.173
no sense to keep difference
2018-06-06 14:05:30 +03:00
Mikhael Bogdanov
4cf58654b2 Implement toArray lowering 2018-06-06 10:34:51 +02:00
Mikhael Bogdanov
427a8886e4 Reuse new descriptor in bridge lowering 2018-06-06 10:34:51 +02:00
Mikhael Bogdanov
c72a3e08f7 Use field original in ir transformation 2018-06-06 10:34:50 +02:00
Mikhael Bogdanov
a53fa4f6f8 Properly calculate shift for default args in enum constructor call 2018-06-06 10:34:49 +02:00
Roman Artemev
4b8d906e45 Add runtime for JS IR BE 2018-06-05 21:21:18 +03:00
Alexey Tsvetkov
2fecf07dd7 Test: do not expect copy classes task to run with Gradle 4.0+ 2018-06-05 19:27:08 +03:00
Alexey Tsvetkov
141cf43153 Test: remove KotlinGradlePluginMultiVersionIT
We run all tests with multiple Gradle versions now,
so parametrized test is not needed anymore.

Test cases are moved to relevant test classes.

testKaptProcessorPath is removed because kapt1 is not supported anymore.
2018-06-05 19:27:07 +03:00
Alexey Tsvetkov
fdbd3cd8cb Test: remove unsupported Gradle versions from tests 2018-06-05 19:27:07 +03:00
Alexey Tsvetkov
80731437a8 Drop forcing Java task to recompile
We don't support Gradle <= 3.5 at the moment,
it does not make sense to have the code for Gradle < 2.14
2018-06-05 19:27:07 +03:00
Alexey Tsvetkov
0eadc76cb7 Remove unneeded code from Gradle plugin 2018-06-05 19:27:07 +03:00
Alexey Tsvetkov
3dc314d509 Remove com.intellij usages from Gradle plugin 2018-06-05 19:27:07 +03:00
Alexey Tsvetkov
c9e49ed198 Remove unused util 2018-06-05 19:27:07 +03:00
Alexey Tsvetkov
5f2513ee20 Get rid of split package org.jetbrains.kotlin.incremental in Gradle plugin
#KT-18621 fixed
2018-06-05 19:27:07 +03:00
Nicolay Mitropolsky
045cc253ab Uast: KotlinUEnumConstant.returnType now is evaluated from containing сlass
to make it not load additional clsDelegates
2018-06-05 18:00:15 +03:00
Nicolay Mitropolsky
0fb879dfc2 lightAnnotations: KtLightPsiClassObjectAccessExpression added
as implementation of `PsiClassObjectAccessExpression` for class literals in annotations
2018-06-05 18:00:15 +03:00
Mikhail Glukhikh
92727d2945 Downgrade "redundant type check for object" to INFORMATION level 2018-06-05 17:54:30 +03:00
Alexander Podkhalyuzin
116a99ddb8 Fixed Icon link to proper variant 2018-06-05 17:41:47 +03:00
Mikhail Glukhikh
24008cdffb If to when: do not add label to outer loop if not necessary
So #KT-24767 Fixed
2018-06-05 17:02:35 +03:00
Toshiaki Kameyama
b4962a1880 Add getter: don't suggest when property has no type or initializer
So #KT-24632 Fixed
2018-06-05 16:31:28 +03:00
Toshiaki Kameyama
8969e7a6e1 "Remove redundant toString": fix false positive for nested nullable
So #KT-24557 Fixed
2018-06-05 16:03:54 +03:00
Toshiaki Kameyama
4038d4d507 Explicit this inspection: suggest also for synthetic Java property
So #KT-22089 Fixed
2018-06-05 15:52:16 +03:00
Toshiaki Kameyama
6b37e40f99 Add quick-fix for type variance conflict #KT-23082 Fixed 2018-06-05 15:45:53 +03:00
Toshiaki Kameyama
ddf647ae96 Remove redundant receiver in "Change function signature" quick fix
So #KT-12298 Fixed
2018-06-05 15:20:18 +03:00
Toshiaki Kameyama
0cb907d637 Reformat: ChangeMemberFunctionSignatureFix 2018-06-05 15:19:34 +03:00
Toshiaki Kameyama
2c59f96ca4 Introduce "Add remaining when branches" intention #KT-23306 Fixed 2018-06-05 15:19:09 +03:00
Toshiaki Kameyama
bde9a57c9e Don't suggest map{}.filterNotNull() -> mapNotNull{} on primitive array
So #KT-21556 Fixed
2018-06-05 15:18:28 +03:00
Toshiaki Kameyama
e770aed084 Don't suggest "Remove variable" for property with function initializer
So #KT-23752 Fixed
2018-06-05 15:17:14 +03:00
Dmitry Savvinov
b8f8802cff Parse compiler arguments and configure LV properly in Platform.kt 2018-06-05 14:51:35 +03:00
Dmitry Savvinov
5f819b589c Minor: refactor Platform.kt 2018-06-05 14:51:35 +03:00
Mikhail Zarechenskiy
04c13aeae8 [NI] Fix exception on capturing type with inner typealiased typed 2018-06-05 14:05:50 +03:00
Alexander Podkhalyuzin
4883fbfd23 Fixed link to error icon in IDEA 2018.2
#KT-24736 Fixed
2018-06-05 11:00:55 +03:00
Alexander Podkhalyuzin
73ec82e544 Better description of Kotlin plugin
#KT-13948 Fixed
2018-06-05 11:00:09 +03:00
Mikhail Zarechenskiy
4893e466ac Skip test for javac diagnostics
There are problems with sharing the same `txt` file when using custom
 declarations from `kotlin` package
2018-06-05 10:41:44 +03:00
Natalia Selezneva
62929ba6f5 Fix AE in scratch for long lines
^KT-24638 Fixed
2018-06-05 08:41:17 +03:00
Natalia Selezneva
ccacf1bd23 Replace SLRUMap with ConcurrentHashMap
^KT-24645 Fixed
2018-06-05 08:41:17 +03:00
Natalia Selezneva
4767757991 Change the message in the 'new script dependencies' notification 2018-06-05 08:41:17 +03:00
Mikhail Zarechenskiy
ce7f010673 Fix wrong test data 2018-06-04 21:59:03 +03:00
Alexey Sedunov
0f80dd4ecf Navigation: Use local search scope for top-level properties in script
#KT-20465 Fixed
2018-06-04 20:17:44 +03:00
Alexey Sedunov
0110f66529 Project View: Show script declarations in "Show members" mode 2018-06-04 20:17:44 +03:00
Alexey Sedunov
3c267b206b Move: Fix exception on moving top-level declaration from/to script file
#KT-20260 Fixed
2018-06-04 20:17:43 +03:00
Alexey Sedunov
c63854948b Configuration: Fix Kotlin SDK existence check on facet configuration
AS3.1/AS3.2
2018-06-04 20:17:43 +03:00
Alexey Sedunov
24687b18cd Test Support: Support Gradle tests classes with spaces in name
#KT-18319 Fixed
2018-06-04 20:17:43 +03:00
Roman Artemev
90c7d8f485 [JS IR BE] Update test data 2018-06-04 19:31:49 +03:00
Roman Artemev
601f29b781 [JS IR BE] Minor fixes
* Global scope
* Top-level properties
* Refactoring
2018-06-04 19:31:49 +03:00
Roman Artemev
d6d0a7d804 Fix nashorn test runner 2018-06-04 19:31:49 +03:00
Roman Artemev
06a170b05d [JS IR BE] Update test data 2018-06-04 18:59:40 +03:00
Roman Artemev
eeb16a38e8 [JS IR BE] Fix callable reference to make it possible to be bound 2018-06-04 18:59:40 +03:00
Roman Artemev
11c330effd [JS IR BE] Move builder into appropriate package 2018-06-04 18:59:40 +03:00
Roman Artemev
261edd5f4c [JS IR BE] Implement property reference
Add cache for direct (which has no closured parameters) KCallable references
Refactor FunctionReferenceLowering
 * Rename FunctionReferenceLowering -> CallableReferenceLowering
 * Add util method to create value parameters
2018-06-04 18:59:40 +03:00
Mikhail Zarechenskiy
fb1fbf1473 Temporary mute tests on unsigned types for JS backend 2018-06-04 18:37:47 +03:00
Mikhail Zarechenskiy
57ffbd5941 Refactoring: Rename isUnsigned -> isUnsignedNumberLiteral 2018-06-04 18:37:46 +03:00
Mikhail Zarechenskiy
cc19e4cd73 Refactoring: Move blackbox tests about unsigned types to new directory 2018-06-04 18:37:44 +03:00
Mikhail Zarechenskiy
b30b00eedb Configure overload resolution on unsigned types same as for primitives 2018-06-04 18:37:42 +03:00
Mikhail Zarechenskiy
5b5d9dd5a0 Allow unsigned integers overflow values of corresponding signed numbers 2018-06-04 18:37:40 +03:00
Mikhail Zarechenskiy
0da3ae328e Handle case when u-literals are using without unsigned declarations 2018-06-04 18:37:39 +03:00
Mikhail Zarechenskiy
8cd2d2e44c Support WITH_UNSIGNED kind in diagnostics tests, add tests 2018-06-04 18:37:37 +03:00
Mikhail Zarechenskiy
7d5fdb660d Treat number with unsigned literal as UByte & UShort & UInt & ULong 2018-06-04 18:37:36 +03:00
Mikhail Zarechenskiy
656f6cbded Support constant evaluation of unsigned type constructors
#KT-23816 In Progress
2018-06-04 18:37:34 +03:00
Mikhail Zarechenskiy
bf5f710f39 Parse integers with unsigned ('u') suffix 2018-06-04 18:19:34 +03:00
Mikhail Zarechenskiy
e5958d228a Introduce WITH_UNSIGNED directive to use unsigned types in tests 2018-06-04 18:19:30 +03:00
Stanislav Erokhin
8f0b073c08 [NI] Prototype for SAM-conversion.
Supported:
- conversion in resolution parts. Also sam-with-receiver is supported automatically
- separate flag for kotlin function with java SAM as parameters

TODO:
- fix overload conflict error when function type is the same byte origin types is ordered
- consider case when parameter type is T, T <:> Runnable
- support vararg of Runnable

[NI] Turn off synthetic scope with SAM adapter functions if NI enabled
2018-06-04 12:21:56 +03:00
Stanislav Erokhin
4b8e95c243 Minor. Extract preparation for expected type to separate function 2018-06-04 12:21:52 +03:00
Stanislav Erokhin
232d069493 Minor. Use getExpectedType as util function for parameter type calculation
For almost all cases this change do nothing, because if parameter isn't
vararg, then both methods (FlatSignature.argumentValueType &
getExpectedType) return same value. Moreover if it is vararg parameter
and spread operator is not used, then results will be the same.
We can observe difference only when spread operator used
and when we compare two candidates corresponding parameters
for both spread arguments should be vararg parameters.
I.e. old way compares: Int vs String
new way compares: Array<out Int> vs Array<out String>.
2018-06-04 12:21:51 +03:00
Stanislav Erokhin
99e7823352 [NI] Disable test with disabled RefinedSamAdaptersPriority in NI
Such test has no ense in NI because NI it is LV = 1.4 and we cannot
repeat behaviour in 1.3 anyway, so I propose not even support old cases.
Also priority of LANGUAGE directive should be more then key enabled on
all tests -- also fixed.
2018-06-04 12:21:50 +03:00
Stanislav Erokhin
b31d027aed [NI] Report deprecation for function from companion in NI. 2018-06-04 12:21:48 +03:00
Stanislav Erokhin
18b65e7bcf [NI] Update test data 2018-06-04 12:21:47 +03:00
Mikhael Bogdanov
a4c4f048de Support compare for small primitives 2018-06-04 10:50:00 +02:00
Mikhael Bogdanov
340160de65 Don't generate setter accessors for vals 2018-06-04 10:49:59 +02:00
Mikhael Bogdanov
aa8d71f6b9 Support synthetic flag 2018-06-04 10:49:59 +02:00
Mikhael Bogdanov
8767e0924b Support extensions in bridge lowering 2018-06-04 10:49:58 +02:00
Mikhael Bogdanov
5fa54dc854 Fix array constructors coercion type 2018-06-04 10:49:57 +02:00
Mikhael Bogdanov
e58e05f9be Minor. Reformat 2018-06-04 10:49:57 +02:00
Mikhael Bogdanov
50d7e49211 Skip unmapped receiver in inner class lowering 2018-06-04 10:49:56 +02:00
Mikhael Bogdanov
5753f93a57 Support java synthetic properties in DependencyCollector 2018-06-04 10:49:56 +02:00
Alexey Sedunov
8198599ef5 Misc: Eliminate instances of IdeModifiableModelsProviderImpl or dispose them after use 2018-06-04 02:57:54 +03:00
Alexander Podkhalyuzin
e3223ab6d8 Fixed grammar and words in pull request template 2018-06-03 17:01:08 +03:00
Valeriy Zhirnov
e024a7c563 Provide template for pull requests
Signed-off-by: Valeriy Zhirnov <neonailol@gmail.com>
2018-06-03 16:50:01 +03:00
Alexey Tsvetkov
f7b32bdfa7 Refactor managing Gradle daemons for tests
Encapsulate daemon run count within DaemonRegistry to simplify reasoning
about the state.

Never count test process Gradle version as active Gradle process.

Fix the bug when daemon version hit max run count threshold
would be restarted every time after that.
2018-06-01 23:14:34 +03:00
Alexey Tsvetkov
0fd0eb9a18 Do not build release variant for Android Gradle test
This speeds up the test case significally. On my machine the time spent
in test case dropped from 1+ minute to 15 seconds.
2018-06-01 23:13:37 +03:00
Alexey Tsvetkov
87b053958b Make lint not fail on error in Android tests
It fails with meaningless (for us) errors, such as "target version 23
won't be accepted to play store soon".
2018-06-01 23:13:37 +03:00
Alexey Tsvetkov
3ccaae249a Move Android test from foo to com.example package
Otherwise the test `KotlinAndroid32GradleIT.testIncrementalCompile`
failed with Android resource linking failed error:
"attribute 'package' in <manifest> tag is not a valid Android package name: 'foo'."
2018-06-01 23:13:37 +03:00
Alexey Tsvetkov
44a845eca9 Avoid using bound class reference
Bound references require kotlin-reflect 1.1.x on runtime.
However old Gradle versions (e.g. 3.4) can leak 1.0.x reflect
into Gradle classloader, so getting bound reference fails on runtime
(in this case the plugin couldn't connect to the daemon).
2018-06-01 23:13:37 +03:00
Alexey Tsvetkov
42350ffb1a Fix applying subplugin from script
#KT-24497 fixed
2018-06-01 23:13:36 +03:00
Alexey Tsvetkov
6eebcf7f18 Add test for subplugin in nested buildscript
KT-24653
2018-06-01 23:13:36 +03:00
Alexey Tsvetkov
f720501612 Implement fallback compiler search 2018-06-01 23:13:36 +03:00
Alexey Tsvetkov
15a372b0eb Create compiler and plugin classpath configurations in Android plugin too 2018-06-01 23:13:36 +03:00
Alexey Tsvetkov
af8b0ffa6d Resolve compiler classpath using 'kotlinCompilerClasspath' configuration
#KT-24675 fixed
2018-06-01 23:13:36 +03:00
Alexey Tsvetkov
6fe0829cf8 Remove scripting plugin from JVM compiler classpath
#KT-24559 fixed
2018-06-01 23:13:36 +03:00
Alexey Tsvetkov
db66bfd726 Pack scripting plugin into kotlin-scripting-embeddable for use in Gradle 2018-06-01 23:13:36 +03:00
Alexey Tsvetkov
dd731da6d1 Make 'kotlinCompilerPluginClasspath' non-transitive
Previous plugin resolution mechanism was only searching
for exact artifact without transitive dependencies.

The configuration allows resolving transitive dependencies,
but it resolves stdlib which fails because the compiler
loads plugins using parent last classloader.

Non-transitivity can be removed after parent last classloader is
removed.
2018-06-01 23:13:36 +03:00
Alexey Tsvetkov
873de17056 Resolve compiler plugin classpath using 'kotlinCompilerPluginClasspath' configuration
#KT-24653 fixed
        #KT-24676 fixed
2018-06-01 23:13:36 +03:00
Alexey Tsvetkov
0c21b21a88 Move subplugin tests to separate class 2018-06-01 23:13:36 +03:00
Alexey Tsvetkov
1085abedcd Test scripting with Gradle 2018-06-01 23:13:36 +03:00
Alexey Tsvetkov
0b22a3c67b Prevent starting multiple daemons from Gradle
#KT-24560 fixed
2018-06-01 23:13:36 +03:00
Alexey Sedunov
48b55edb03 Configuration: Add non-release repository to main Gradle buildfile
#KT-24725 Fixed
2018-06-01 21:36:39 +03:00
Alexey Sedunov
b826e850fd Configuration: Enable dumb-mode alternative resolve when updating settings.gradle
#KT-24667 Fixed
2018-06-01 21:36:39 +03:00
Alexander Udalov
5478dabb38 Add Maven/Gradle usage examples to kotlinx-metadata-jvm ReadMe 2018-06-01 19:14:42 +02:00
Alexander Udalov
adb129d244 Add ChangeLog for kotlinx-metadata-jvm 2018-06-01 19:14:42 +02:00
Ilya Chernikov
3171968efc Fix native-platform repo after it was suddenly moved in the gradle repo 2018-06-01 17:01:35 +02:00
Pavel V. Talanov
dae8b12872 Mpp: fix production internals not visible from tests in platform modules
Caused by change in mpp resolve
Happened in platform modules that have expectedBy dependencies

#KT-24729 Fixed
2018-06-01 14:15:04 +02:00
Pavel V. Talanov
4279dc9c05 Minor: better name for generated test 2018-06-01 14:15:04 +02:00
Nikolay Krasko
91b86d7fba Remove explicit locks for accessing and creating cached values
Working with user data in cached value manager is already thread safe.
2018-06-01 12:08:48 +03:00
Nikolay Krasko
cc04b72dfd Protect access to SLRUCache for scripts with a lock 2018-06-01 12:08:46 +03:00
Nikolay Krasko
6d7510a6f4 Minor: code cleanup in KotlinCacheServiceImpl.kt 2018-06-01 12:08:44 +03:00
Nikolay Krasko
1e5192bcff Fail with FileComparisonFailure in hierarchy tests 2018-06-01 12:08:43 +03:00
Nikolay Krasko
a5593f1f31 Render entries with outer classifiers in call hierarchy (KT-22698)
#KT-22698 Fixed
2018-06-01 12:08:41 +03:00
Nikolay Krasko
496243c3ce Remove difference in nullable state for loadState() 2018-06-01 12:08:37 +03:00
Ilya Gorbunov
f8217ef28f Extract subclasses of JvmMemberSignature sealed class to top-level
Use more specific subtypes of sealed class in visitors.
2018-06-01 06:43:48 +03:00
Ilya Gorbunov
1a290d0c73 Refactor: make JvmMemberSignature a sealed class
Use JvmMemberSignature.asString instead of toString
2018-06-01 06:43:48 +03:00
Ilya Gorbunov
2f58539200 Refactor: allow to distinguish whether JvmMemberSignature is for field or for method
Introduce a method to create org.jetbrains.kotlin.load.kotlin.MemberSignature directly from JvmMemberSignature.
Create JvmFunctionSignature from JvmMemberSignature.
2018-06-01 06:43:48 +03:00
Ilya Gorbunov
36c658fd8b Introduce JvmMemberSignature to represent name and desc of jvm methods and fields
Return member name and desc in a class in order not to parse that information
from concatenated string when required.
2018-06-01 06:43:48 +03:00
Ilya Gorbunov
eee9f8ab3f Include kotlinp tests into distTest and kotlinx-metadata-jvm tests into coreLibsTest
kotlinp tests: do not fail due to different directory separators on Windows
2018-06-01 06:43:48 +03:00
Ilya Gorbunov
d86947207c Change group of kotlinx.metadata to org.jetbrains.kotlinx
Allow to override version of the resulting artifact with a property.
Setup publishing of the library when its deployment version is specified.
2018-06-01 06:43:48 +03:00
Alexey Sedunov
fbb4914bfb Intentions: Fix insertion of necessary lambda parameter for run/let and apply/also conversions
#KT-22931 Fixed
2018-05-31 15:22:32 +03:00
Alexey Sedunov
f17053f970 Configuration: Create absent Kotlin SDK when configuring Kotlin/JS module
#KT-24412 Fixed
2018-05-31 15:22:31 +03:00
Alexey Sedunov
924db3f23e Configuration: Fix Kotlin SDK existence check on facet configuration
#KT-24072 Fixed
2018-05-31 15:22:31 +03:00
Dmitry Petrov
7b1b557250 psi2ir: Java annotations have no primary constructor 2018-05-31 10:09:31 +03:00
Dmitry Petrov
8094cb7dc5 psi2ir: Generate external dependencies in a loop
There are some cases (superclasses, overridden methods, and so on) where
external dependencies generation can require additional external
dependencies.
2018-05-31 10:09:31 +03:00
Alexey Tsvetkov
cb549cba00 Create kapt configurations before gradle script is evaluated
We cannot create kapt configurations in `KotlinGradleSubplugin.apply`,
because `apply` is invoked after a script is evaluated, so user cannot
refer to kapt configurations in script.

We cannot call `apply` before script's evaluation, because
then we might not be able to determine
if a Gradle plugin corresponding to a subplugin is appled.
For example in case of the following script:
```
apply plugin: "kotlin"
apply plugin: "kotlin-kapt"
```
subplugin's apply will exit early because Gradle plugin "kotlin-kapt"
is not applied yet, when "kotlin"'s apply is evaluated.
2018-05-30 20:24:11 +03:00
Mikhael Bogdanov
4383335168 Update @JvmDefault documentation 2018-05-30 15:24:50 +02:00
Alexander Udalov
b5007c417d Minor, restructure reflection tests a little
To allow their usage in https://github.com/udalov/kotlin-obfuscation-test-app
2018-05-30 13:03:10 +02:00
Dmitry Petrov
7a2bb79777 psi2ir: Use substituted 'hashCopy' for generated data class 'hashCopy' 2018-05-30 12:02:34 +03:00
Dmitry Petrov
cb301763f3 psi2ir: Fix implicit casts generation
Implicit cast from T to S is not required if
  T <: S.makeNullable()
2018-05-30 12:02:34 +03:00
Nikolay Krasko
dac9036969 Remove reload(PsiFile?) usage from KotlinFieldBreakpoint 2018-05-29 21:40:32 +03:00
Nikolay Krasko
439e079c94 Minor: reformat KotlinFindUsagesProvider.kt 2018-05-29 21:40:32 +03:00
Nikolay Krasko
9c305e2431 Fix getting names representation for constructor parameters (KT-23090)
#KT-23090 Fixed
2018-05-29 21:40:32 +03:00
Nikolay Krasko
c5b3092c64 Use same amount of memory for all builds and remove tasks.kt.173 2018-05-29 21:40:31 +03:00
Nikolay Krasko
e6905c9b3d Refactoring: extract function for getting project 2018-05-29 21:40:31 +03:00
Alexey Sedunov
6f8e25eae7 Configuration: Restore dependency on gradle plugin in buildscript block
#KT-24671 Fixed
2018-05-29 18:07:09 +03:00
Nicolay Mitropolsky
cbcc3d2e2e Test for java-keywords in light-annotations (KT-22883)
working with new source-based light annotations
2018-05-29 16:34:10 +03:00
Mikhael Bogdanov
ad717d5335 Support properties in compatibility mode 2018-05-29 15:08:07 +02:00
Mikhael Bogdanov
0498c3b765 Don't copy descriptor for delegation generation
Actually source element for DEFAULT_IMPL_DELEGATION_TO_SUPERINTERFACE_DEFAULT_IMPL
  was always null cause descriptor was copies with new kind=DECLARATION.
  That causes element recalculation in DiagnosticFactory:
  element = data.classOrigin.element
  So DEFAULT_IMPL_DELEGATION_TO_SUPERINTERFACE_DEFAULT_IMPL is added to EXTERNAL_SOURCES_KINDS
2018-05-29 15:08:07 +02:00
Roman Artemev
9d2092e86d Fix visibility of @JsName-annotated symbols in stdlib-js 2018-05-29 13:57:34 +03:00
Roman Artemev
06009a532b Add test case to detect name clash in stdlib-js 2018-05-29 13:57:34 +03:00
Mikhael Bogdanov
689a492b9a Minor. Fix test data 2018-05-29 12:47:07 +02:00
Mikhael Bogdanov
23a713d46b Rollback 'Don't copy interface member on DefaultImpl delegation generation, keep kind' 2018-05-29 12:47:06 +02:00
Nicolay Mitropolsky
8e2c9358bc Uast: updates for consistency tests and fixes for missed things
we should use `sourcePsi` instead of `psi` for parents matching, because light `psi` will not be tested, and it is not enough to store only PSI as map key to match parent consistency, because some different UElements could have same sourcePsi.
2018-05-29 13:30:52 +03:00
Mikhael Bogdanov
0a26f527f2 Minor. Fix test data 2018-05-29 11:26:36 +02:00
Mikhael Bogdanov
419218b9cf Rename 'jvm-default-mode' to 'jvm-default'. Add description 2018-05-29 11:26:36 +02:00
Mikhael Bogdanov
020573ef3c Don't generate compatibility suffix twice for properties 2018-05-29 09:29:48 +02:00
Mikhael Bogdanov
60f2dbeb8a Support property accessor in compatibility mode 2018-05-29 09:29:48 +02:00
Mikhael Bogdanov
7f4bd549aa Minor. Fix rebase 2018-05-29 09:28:46 +02:00
Mikhael Bogdanov
1d6665d355 Minor. Remove hack 2018-05-28 22:15:54 +02:00
Mikhael Bogdanov
b7bad2bd72 Pass accessorKind into AccessorForCallableDescriptor 2018-05-28 22:15:53 +02:00
Mikhael Bogdanov
7a649e0e74 Convert AccessorForPropertyDescriptor to Kotlin 2018-05-28 22:15:52 +02:00
Mikhael Bogdanov
6d321e7997 Rename AccessorForPropertyDescriptor.java to AccessorForPropertyDescriptor.kt 2018-05-28 22:15:51 +02:00
Mikhael Bogdanov
df13d332b3 Minor. Code clean 2018-05-28 22:15:50 +02:00
Mikhael Bogdanov
15cbb68d47 Convert AccessorForCallableDescriptor to Kotlin 2018-05-28 22:15:50 +02:00
Mikhael Bogdanov
2fa521b62a Convert AccessorForFunctionDescriptor to Kotlin 2018-05-28 22:15:49 +02:00
Mikhael Bogdanov
25af7c14e3 Rename AccessorForFunctionDescriptor.java -> AccessorForFunctionDescriptor.kt 2018-05-28 22:15:48 +02:00
Mikhael Bogdanov
8f19dea4a2 Rename FieldAccessorKind to AccessorKind 2018-05-28 22:15:47 +02:00
Mikhael Bogdanov
ad57ca7d2c Minor. Code clean 2018-05-28 22:15:46 +02:00
Mikhael Bogdanov
340920fe38 Support compatibility mode for @JvmDefault 2018-05-28 22:15:45 +02:00
Mikhael Bogdanov
9b718e83a9 Don't copy interface member on DefaultImpl delegation generation, keep kind
Old logic is redundant and obsolete
2018-05-28 22:15:44 +02:00
Mikhael Bogdanov
4421b41790 Skip annotation classes in $DefaultImpls method delegation logic
Annotation could be safely skipped (as already interfaces) cause
  compiler generates delegation to DefaultImpls only for classes
2018-05-28 22:15:43 +02:00
Mikhael Bogdanov
065780de4c Switch enableJvmDefault to jvmDefaultMode 2018-05-28 22:15:42 +02:00
Ilya Chernikov
bacc2079ed Fix/workaround lazy lcript definition test and related scenarios 2018-05-28 22:10:56 +02:00
Ilya Chernikov
6fdb8746de Fixes after review 2018-05-28 22:10:56 +02:00
Ilya Chernikov
6218b2bcf6 Fix custom script codegen test: add missing classpath entries 2018-05-28 22:10:56 +02:00
Ilya Chernikov
a46dd5b30e Avoid using reflected types in the scripting API
since it causes numerous classloading issues. Using the wrapping types
and reload them in the proper context when needed.
Note: this version supports only classes, but the wrapping type could
be extended to support other types in the future.
+ numerous fixes related to proper loading and handling of the templates.
2018-05-28 22:10:56 +02:00
Ilya Chernikov
4d65f0478b Move scripting codegen code from tests-common to compiler tests
getting rid of dependencies on scripting in the tests-common
2018-05-28 22:10:56 +02:00
Pavel V. Talanov
c54967b1b4 IdeaModuleInfos: cache Module.findImplementedModules
Calling ModuleSourceInfo.expectedBy can be quite costly otherwise
    because creating IdeModifiableModuleProvider is not cheap
2018-05-28 20:02:02 +02:00
Pavel V. Talanov
607fab994c Cache result of collectModulesFromIdeaModel
Cache base module infos from idea model until next root modification
Calculate platform specific module infos (see PlatformModuleInfo)
    on demand based on cached module infos from idea model

 #KT-24144 Fixed
2018-05-28 20:02:02 +02:00
Pavel V. Talanov
406a3888c7 Minor: split getModuleInfo into separate files 2018-05-28 20:02:01 +02:00
Alexey Sedunov
4053278119 Misc: Do not set icon via GUI Designer
Since Designer references icon by filename it fails
due to recent update in IDEA icon files

 #KT-24580 Fixed
2018-05-28 17:36:09 +03:00
Nicolay Mitropolsky
aed63d49ce WrongAnnotations.kt - disabled LAZINESS:Consistency -check
because source-based LightAnnotations produces annotation values from arguments in sources even when they are invalid as parameters. Thus they could be inconsistenct with "compiled" ones and it is not an error.
2018-05-28 17:06:35 +03:00
Nicolay Mitropolsky
da5ef06abf KtLightNullabilityAnnotation evaluated from sources 2018-05-28 17:06:35 +03:00
Nicolay Mitropolsky
eea66bea73 Making LightAnnotation work without clsDelegate (KT-20924, KT-22883) 2018-05-28 17:06:35 +03:00
Anton Bannykh
03e46ce0ca JS: more default arguments fixes (KT-24413, KT-21968 fixed)
MPP-related:
* inherited from interfaces
* inherited body from interface
* default arguments in an interface, implemented by a class delegate
* super call of a method with default argument

Also:
* inheritance from an interface and another interface descendant (KT-21968)
* inheritance through an intermediate interface
2018-05-28 15:27:21 +03:00
Dmitry Savvinov
da7b59984f Move importsDumper to compiler plugin 2018-05-28 13:02:48 +03:00
Dmitry Savvinov
16ee2df585 Fix tests for imports dumper
Remove local absolute paths from testdata, introduce new testrunner to
support relativization of imports dump.
2018-05-28 13:02:47 +03:00
Nicolay Mitropolsky
c97f4539d3 181: ideaCompatibleBuildNumber = "181.3" 2018-05-28 12:05:02 +03:00
Alexander Udalov
06d97cce51 Fix multiple issues when expanding argfiles
- treat a contiguous whitespace sequence as a single argument separator,
  not as several empty-string arguments separated by whitespaces
- fix infinite loop when reading unfinished quoted argument
- do not attempt to perform escape if the backslash is the last
  character in the file
2018-05-28 11:23:32 +03:00
Alexander Udalov
61902e1fd5 Support -Xargfile in all scenarios; refactor & prettify code
Perform command line argument preprocessing in the beginning of
parseCommandLineArguments, so that argfiles are expanded in all
scenarios, not just when the compiler is invoked via
K2{JVM,JS}Compiler.exec
2018-05-28 11:23:32 +03:00
Dmitry Savvinov
43467516ef Support argfiles in kotlin compiler
Using '-Xargfile=path/to/argfile' will substitute
that argument with the content of argfile.

See KT-24472
2018-05-28 11:23:32 +03:00
Neonailol
ede2e227c2 KT-23356 Cross-platform function to convert CharArray slice to String
Signed-off-by: Valeriy Zhirnov <neonailol@gmail.com>
2018-05-26 06:06:53 +03:00
Max Medvedev
16ebcc6e77 Extract function: make name editor focused
#KT-22333 Fixed
2018-05-25 23:30:09 +03:00
Alexey Sedunov
610cc3867b Create Class from Usage: Filter out usages in super type entry list
#KT-22918 Fixed
2018-05-25 23:03:26 +03:00
Alexey Sedunov
35517a8253 Quick Fixes: Fix adding parameter to Java constructor
#KT-24574 In Progress
2018-05-25 23:03:26 +03:00
Alexey Sedunov
6e25db990d Change Signature: Use target declaration as a context for types
#KT-22387 Fixed
2018-05-25 23:03:25 +03:00
Ilya Gorbunov
3245148206 Docs: clarify default element value of CharArray and BooleanArray 2018-05-25 21:53:52 +03:00
Ilya Gorbunov
418db53ba4 Array.copyOf docs: do not use 'primitive default' term, rewrite description
#KT-22298
2018-05-25 21:52:36 +03:00
Valeriy Zhirnov
9239de9a02 KT-22298 Improve docs for Array.copyOf(newSize: Int)
Signed-off-by: Valeriy Zhirnov <neonailol@gmail.com>
2018-05-25 21:52:36 +03:00
Ilmir Usmanov
df4dcc0f8e Ignore data flow info from assert calls
if assertions mode is not LEGACY.

This is done since assertions can be disabled (in both compile time and
runtime) and thus, the data flow info is not reliable anymore.
 #KT-24529: Fixed
2018-05-25 18:58:49 +03:00
Ilmir Usmanov
0cb73e55d0 Split kotlin-stdlib-coroutines into common and java jars
#KT-24532: Fixed
2018-05-25 18:19:19 +03:00
Alexander Udalov
9c5256434c Check function name in isGenericToArray/isNonGenericToArray
#KT-24427 Fixed
2018-05-25 14:55:26 +02:00
Ilya Chernikov
92d848b6e6 Fix scripting plugin commandline processing 2018-05-25 09:51:04 +02:00
Ilya Chernikov
705faa4792 Add lazy discovery test 2018-05-25 09:51:04 +02:00
Dmitry Petrov
ab455d6572 IR: IrSimpleFunction.correspondingProperty: IrProperty?
Non-null for a property accessor, points to a corresponding property.
2018-05-25 09:40:51 +03:00
Dmitry Petrov
216dbf9637 Drop IrDeclarationKind 2018-05-25 09:40:51 +03:00
Dmitry Petrov
2a0e7eb412 IR: split IrUtils.kt into common and backend-specific part 2018-05-25 09:40:51 +03:00
Alexey Sedunov
6a21991009 Configuration: Drop Java -> Kotlin/JS configurator
#KT-24504 Fixed
2018-05-24 22:24:24 +03:00
Alexey Sedunov
6fd060b166 Configuration: Support TeamCity repository for dev-versions 2018-05-24 22:24:23 +03:00
Alexey Sedunov
c64f93b052 Configuration: Add 'mavenCentral() to generated script 'repositories' block
#KT-24586 Fixed
2018-05-24 22:24:23 +03:00
Roman Artemev
6d29aab5e2 [JS IR BE] Implement vararg in JS BE 2018-05-24 21:36:12 +03:00
Roman Artemev
84447d59e1 [JS IR BE] Update test data 2018-05-24 21:07:25 +03:00
Roman Artemev
3ec722eaa1 [JS IR BE] Implement labeled loops 2018-05-24 21:07:09 +03:00
Roman Artemev
6811c87fc7 [JS IR BE] Implement block decomposition lowering 2018-05-24 21:06:49 +03:00
Nikolay Krasko
1eeb202a1a Use background task for Kotlin decompiler (KT-23981)
#KT-23981 Fixed
2018-05-24 20:03:23 +03:00
Nikolay Krasko
6c56a7949c Don't call an additional update check when selecting channel with enter 2018-05-24 20:03:22 +03:00
Nikolay Krasko
468f7f234f Don't show default companion name in inlay type hints (KT-22432)
#KT-22432 Fixed
2018-05-24 20:03:22 +03:00
Nikolay Krasko
918f47e832 Refactoring: extract common code to functions 2018-05-24 20:03:22 +03:00
Nikolay Krasko
0a2bb74187 Refactoring: move compatibility issue fix in decompiler to separate file 2018-05-24 20:03:22 +03:00
Nikolay Krasko
c8654a0033 Minor: reformat and fix warnings in internal package 2018-05-24 20:03:21 +03:00
Nikolay Krasko
39694835ce Do not report lambda return hint twice for postfix and prefix (KT-22653)
#KT-22653 Fixed
2018-05-24 20:03:21 +03:00
Toshiaki Kameyama
5e4d571693 Reformat RemoveModifierFix 2018-05-24 17:29:16 +03:00
Toshiaki Kameyama
0100dfb2fd Add "Remove 'lateinit'" quickfix for INAPPLICABLE_LATEINIT_MODIFIER
So #KT-24295 Fixed
2018-05-24 17:26:54 +03:00
Mikhail Glukhikh
f8f3b1c6f1 Provide language version settings correctly for platform modules
So #KT-24546 Fixed
2018-05-24 16:40:52 +03:00
Ilmir Usmanov
6c3d69f74c Minor: Add KotlinTypeMapper constructor overload 2018-05-24 15:42:53 +03:00
Alexander Udalov
d122406dca Map Kotlin TYPE target to Java TYPE_USE in bytecode
And TYPE_PARAMETER -> TYPE_PARAMETER similarly

 #KT-23857 Fixed
2018-05-24 14:41:22 +02:00
Mikhail Glukhikh
fbb0a3e06c Convert async {}.await() to withContext(DefaultDispatcher) {}
This fixes incorrect transformation related to KT-24235
2018-05-24 15:15:25 +03:00
Mikhail Glukhikh
4ed4754d80 Additional tests for KT-21131 2018-05-24 15:15:23 +03:00
Mikhail Glukhikh
f3c2dd0526 Code inliner: keep main property if it can have side effects
So #KT-24165 Fixed
2018-05-24 15:15:22 +03:00
Mikhail Glukhikh
93a510c05b Code inliner: move lambda outside parentheses always when possible
So #KT-24215 Fixed
2018-05-24 15:15:21 +03:00
Mikhail Glukhikh
bb8c3495b8 Reformat & cleanup: CodeInliner 2018-05-24 15:15:19 +03:00
Mikhail Glukhikh
2d7e274860 Fix importing scope order in ReplaceWithAnnotationAnalyzer
So #KT-22615 Fixed
2018-05-24 15:15:13 +03:00
Mikhail Glukhikh
394a547084 Reformat: ReplaceWithAnnotationAnalyzer 2018-05-24 15:15:10 +03:00
Mikhail Glukhikh
75724c0240 Reformat: CodeToInline 2018-05-24 15:15:09 +03:00
Mikhail Glukhikh
251491757d Reformat: CallableUsageReplacementStrategy 2018-05-24 15:15:08 +03:00
Mikhail Glukhikh
0655e153c3 Reformat: DeprecatedSymbolUsageFixBase 2018-05-24 15:15:07 +03:00
Mikhail Glukhikh
7cb4c91277 Reformat: DeprecatedSymbolUsageFix 2018-05-24 15:15:06 +03:00
Mikhail Glukhikh
8d74ff4799 Fix Java inspection performance tests 2018-05-24 15:13:19 +03:00
Mikhail Glukhikh
18c59578be Light class performance test: rename test file 2018-05-24 15:13:18 +03:00
Mikhail Glukhikh
3b6d610e29 Light class performance test: access field & method types
So #KT-24085 Fixed
2018-05-24 15:13:18 +03:00
Mikhail Glukhikh
75eeb32970 Light class performance test: build also light nested classes
So #KT-24085 In Progress
2018-05-24 15:13:18 +03:00
Mikhail Glukhikh
bb4cf08d0b Light class performance test: evaluate all supertypes / methods / fields
So #KT-24085 In Progress
2018-05-24 15:13:18 +03:00
Mikhail Glukhikh
1861e0a21d Introduce performance test for light classes building (top-level)
So #KT-24085 In Progress
2018-05-24 15:13:18 +03:00
Natalia Selezneva
98fe8eaa42 Minor: add test that output at scratch line with spaces at the beginning is aligned properly 2018-05-24 15:07:37 +03:00
Natalia Selezneva
db63877690 Scratch: take into account only lines with expressions calculating inlay insert offset 2018-05-24 15:07:37 +03:00
Natalia Selezneva
aa7c13e30b Run scratch if there are some compilation error during make 2018-05-24 15:07:37 +03:00
Natalia Selezneva
5a7b58c615 Substring long scratch output with new lines
^KT-24016 Fixed
2018-05-24 15:07:37 +03:00
Natalia Selezneva
94bb19c765 Provide line info for scratch output in scratch toolwindow
^KT-24016
2018-05-24 15:07:37 +03:00
Natalia Selezneva
a505a948d2 Scratch tests: add check for toolwindow output 2018-05-24 15:07:37 +03:00
Natalia Selezneva
bce0a77a94 Scratch: fix duplicating of errors in scratch output toolwindow 2018-05-24 15:07:37 +03:00
Natalia Selezneva
e3b6fad2cd Scratch: test alignment of inlays 2018-05-24 15:07:37 +03:00
Natalia Selezneva
5da0252651 Minor: rename file and rearrange classes 2018-05-24 15:07:37 +03:00
Natalia Selezneva
420da0d213 Introduce ToolWindowScratchOutputHandler 2018-05-24 15:07:37 +03:00
Natalia Selezneva
aa1e604923 Refactoring: move ScratchToolWindowFactory to scratch.output package 2018-05-24 15:07:37 +03:00
Natalia Selezneva
614fa9d0c7 Refactoring: move ScratchFileRenderer to separate file 2018-05-24 15:07:37 +03:00
Natalia Selezneva
afa6110e6a Minor: replace assert with user-friendly error 2018-05-24 15:07:37 +03:00
Natalia Selezneva
75ad78460f Setting for auto-reloading script dependencies isn't loaded from xml on project reopening 2018-05-24 15:07:37 +03:00
Natalia Selezneva
54f9359195 Minor: fixes after review 2018-05-24 15:07:37 +03:00
Sergey Rostov
098e51d104 jps: support dev kit module types (and all other ModuleBasedBuildTargetType). fix brunch 172 2018-05-24 14:59:46 +03:00
Alexander Udalov
bf3419c3bd Introduce OptionalExpectation for annotations missing on some platforms
This commits adds a new annotation OptionalExpectation to the standard
library, which is experimental. To enable its usage, either pass
'-Xuse-experimental=kotlin.ExperimentalMultiplatform' as a compiler
argument, or '-Xuse-experimental=kotlin.Experimental' and also annotate
each usage with `@UseExperimental(ExperimentalMultiplatform::class)`

 #KT-18882 Fixed
2018-05-24 13:14:51 +02:00
Sergey Rostov
ec5110e1f4 jps: support dev kit module types (and all other ModuleBasedBuildTargetType)
#KT-24500 fixed
2018-05-24 11:12:01 +03:00
Mikhail Glukhikh
865f94eb18 Disable "make module experimental" fix on non-JPS modules
Related to KT-24243
2018-05-24 10:50:28 +03:00
Mikhail Glukhikh
d7bb8a7a21 Do not suggest -Xuse...=kotlin.Experimental in experimental world 2018-05-24 10:50:28 +03:00
Mikhail Glukhikh
f2989ee3a6 Experimental fixes: introduce experimental enabling #KT-24243 Fixed 2018-05-24 10:50:28 +03:00
Mikhail Glukhikh
c77c8d872c Experimental fixes: introduce "add -Xuse-experimental" (KT-22760) 2018-05-24 10:50:27 +03:00
Natalia Selezneva
30c62bccb2 Refactoring: do not store scriptModuleInfo inside ScriptDependenciesInfo
Cache for ScriptDependenciesInfo.ForFile is dropped because there is a cache for ScriptModuleInfo, so the facade for dependencies shouldn't be created too often
Cache for ScriptDependenciesInfo.ForProject is stored in a field
2018-05-24 08:47:32 +03:00
Natalia Selezneva
2b322ecf9c Do not store external dependencies in ScriptModuleInfo
There is a cache from ScriptModuleInfo to ScriptDependenciesInfo.
In case when only script dependencies are changed we won't recreate the facade for them and will obtain external dependencies for ScriptModuleInfo stored in ScriptDependenciesInfo. So we cannot store external dependencies inside ScriptModuleInfo. The same problem is with relatedModuleSourceInfo.
2018-05-24 08:47:32 +03:00
Natalia Selezneva
ab743ef759 Scripts: fix NPE during script dependencies update
^KT-24527 Fixed
2018-05-24 08:47:32 +03:00
Natalia Selezneva
f0a7642e1d Optimize ScriptDependenciesUpdater to find scriptDefinition only for files with KotlinFileType 2018-05-24 08:47:32 +03:00
Natalia Selezneva
bb04998159 Scripts: remove loaders when any result was received
^KT-24470 Fixed
2018-05-24 08:47:32 +03:00
Alexey Sedunov
44e7070118 Configuration: Use 'plugins' block in generated/modified Gradle scripts
Follow-up for 172/173/AS3.1/AS3.2 bunches
2018-05-24 02:54:01 +03:00
Alexey Sedunov
efc369dbe4 Misc: KtParsingTestCase fixes for 172/173/AS3.1 bunches 2018-05-24 02:54:00 +03:00
Yan Zhulanow
ece6141891 Pill: Fix module-related path rendering 2018-05-24 01:06:30 +03:00
Yan Zhulanow
0b0089711a Android Extensions: Avoid duplicating variants in compiler plugin options 2018-05-24 01:01:52 +03:00
Yan Zhulanow
015d7f3300 Kapt: Do not retain references to Kotlin compiler classes in customized Javac components
This should fix potential memory leakages.
2018-05-24 01:01:52 +03:00
Yan Zhulanow
99ecedc32e Kapt: Ensure there isn't duplicating entries in the processor loading classpath
(cherry picked from commit 1354a0d)
2018-05-24 01:01:52 +03:00
Yan Zhulanow
aa8c266940 Pill: Add kotlin-scripting-gradle and kotlin-gradle-plugin-integration-tests to JPS model (in 'full' variant) 2018-05-24 01:01:52 +03:00
Yan Zhulanow
b6d59da8a8 Kapt3: Avoid normal compilation in case if no apClasspath entries are passed (#KT-24538) 2018-05-24 01:01:52 +03:00
Yan Zhulanow
dd40b3a15c Kapt: Remove obsolete kapt1-related tests 2018-05-24 01:01:51 +03:00
Yan Zhulanow
6e362f6734 Kapt: Remove kapt1 from Kotlin compiler 2018-05-24 01:01:51 +03:00
Yan Zhulanow
662b79780d Kapt: Remove kapt1 support from Gradle and incremental compilation 2018-05-24 01:01:51 +03:00
Yan Zhulanow
58643ea99d Kapt: Remove annotation processor wrappers for kapt1 (it's obsolete now) 2018-05-24 01:01:51 +03:00
Mikhail Glukhikh
a76bb80e4d Experimental fixes: additional tests, handle local declarations 2018-05-23 19:06:55 +03:00
Mikhail Glukhikh
51fba03253 Experimental fixes: introduce "Add @UseExperimental" #KT-22760 Fixed 2018-05-23 19:00:51 +03:00
Mikhail Glukhikh
f404d6c97a Experimental fixes: introduce "add annotation" (KT-22760) 2018-05-23 18:59:22 +03:00
Sergey Igushkin
721d9df4e0 (minor) Fix testApplyWithFeaturePlugin 2018-05-23 18:41:10 +03:00
Sergey Igushkin
571905824d Add AP option providers of Android Gradle plugin as @Nested to Kapt
Also remove these option providers from the javac task compiler argument
providers so as to avoid output intersections of javac vs kapt.

The options generated by the providers are added to the Kapt subplugin
options as well in order to be passed to Kapt. Since these options
are a list, not a map, pass them without name (Kapt should decode them
into plain arguments). Remove the '-A' prefix as it is there for
command line annotation processor options, but we don't need it, it
is added by Kapt internally.

Issue #KT-23964 Fixed
Issue #KT-24420 Fixed
2018-05-23 18:41:10 +03:00
Simon Ogorodnik
77429b1ca5 Revert: Partial: Add grouping suite and improve whole kotlin tests (fea2559)
Revert occasional change in misc.xml
2018-05-23 17:08:36 +03:00
Alexey Sedunov
1650e69980 Configuration: Use 'plugins' block in generated/modified Gradle scripts
#KT-20665 Fixed
2018-05-23 16:39:20 +03:00
Alexey Sedunov
909ff3a7ec Misc: Migrate to IDEA 181.3 2018-05-23 16:39:20 +03:00
Simon Ogorodnik
78fb775e04 Cleanup duplication 2018-05-23 16:14:39 +03:00
Simon Ogorodnik
ce71e0822c Fix nsToMs 2018-05-23 16:14:38 +03:00
Simon Ogorodnik
391c516ed0 Java inspections test 2018-05-23 16:14:37 +03:00
Simon Ogorodnik
16adf383a5 Use single test project for all tests, instead of copying current 2018-05-23 16:14:36 +03:00
Simon Ogorodnik
fea2559a28 Add grouping suite and improve whole kotlin tests 2018-05-23 16:14:34 +03:00
Mikhail Glukhikh
3e2563ad73 Extract AllKotlinTest from AllKotlinInspectionTest
(cherry picked from commit 7cb31ee)
2018-05-23 16:14:33 +03:00
Simon Ogorodnik
a57a40b5a9 Fix totals 2018-05-23 16:14:33 +03:00
Simon Ogorodnik
9287d2cd24 Fix testFailed reporting 2018-05-23 16:14:31 +03:00
Simon Ogorodnik
750cb38f8c Don't include stacktrace to failure 2018-05-23 16:13:22 +03:00
Simon Ogorodnik
1a015402c8 Fail per file check on first exception 2018-05-23 16:13:21 +03:00
Simon Ogorodnik
c8fbf2d3ac Post-review fixes, add errors reporting to test 2018-05-23 16:13:20 +03:00
Simon Ogorodnik
3221900f69 Change soft refs policy 2018-05-23 16:13:19 +03:00
Simon Ogorodnik
94c8a18f10 Remove dependency from test to performanceTest 2018-05-23 16:13:18 +03:00
Simon Ogorodnik
d2a60164c6 Handle exceptions 2018-05-23 16:13:17 +03:00
Simon Ogorodnik
7b155fc9d4 Increase heap size for test 2018-05-23 16:12:57 +03:00
Simon Ogorodnik
7d9310acf4 Refactor inspection test output 2018-05-23 16:12:55 +03:00
Simon Ogorodnik
740e6fde35 Create performance test for all inspections 2018-05-23 16:12:54 +03:00
Roman Artemev
de9aea6e98 [JS BE] Fix delegation of suspend method member (KT-23094) 2018-05-23 14:59:59 +03:00
Roman Artemev
8862b26bbd Add test case to check delegation of suspend method 2018-05-23 14:59:59 +03:00
Mikhael Bogdanov
f826a253e3 Generate @JvmDefault for property accessors in LIGHT_CLASS MODE 2018-05-23 13:55:38 +02:00
Alexander Udalov
402ceefe60 Regenerate tests 2018-05-23 12:26:10 +02:00
Ilya Gorbunov
3d2a641057 Minor: explicit public visibility 2018-05-23 05:44:34 +03:00
Ilya Gorbunov
d9656a939b Do not produce libraries json declarations dump
It's no longer needed for checking binary compatibility.
Clean build of these libraries is no longer required too.

Cleanup build.gradle of binary-compatibility-validator.
2018-05-23 05:00:57 +03:00
Ilya Gorbunov
ad8c64e127 bcv: refactor: do not convert flags to string representation 2018-05-23 05:00:57 +03:00
Ilya Gorbunov
66a9a90455 bcv: cleanup the old way of reading kotlin visibilities 2018-05-23 05:00:57 +03:00
Ilya Gorbunov
84d96d9537 Use asm:6.0 in kotlinp
Some class files can't be read with asm:4.0.

Make shadowJar when assembling the project.
2018-05-23 05:00:57 +03:00
Ilya Gorbunov
fcf323851e bcv: use kotlinx-metadata-jvm to read kotlin visibilities
It's no longer required to dump kotlin-to-java declaration mapping to json
before using binary-compatibility-validator.

@JvmOverloads are not supported yet, so remove them from test.

Use asm:6.0 in bcv
2018-05-23 05:00:56 +03:00
Ilya Gorbunov
1872550f25 binary-compatibility-validator: add test case for parameters with default values
Move JvmOverloads test there.
2018-05-23 05:00:56 +03:00
Nikolay Krasko
fdc6372776 Remove runtime usage from unused receiver parameter tests 2018-05-23 01:41:02 +03:00
Toshiaki Kameyama
e7a9614fb5 "Unused receiver parameter" inspection: Fix false negative in same class (KT-23897)
#KT-23897 Fixed
2018-05-23 01:41:01 +03:00
Ilya Gorbunov
793d34b913 Suppress errors about non-public primary constructor and forbidden varargs 2018-05-22 22:27:00 +03:00
Ilya Gorbunov
0eee258fce Generate toString implementation for unsigned types 2018-05-22 22:26:56 +03:00
Ilya Gorbunov
e988ea5a1c Implement unsigned arithmetic operations including ulong division and remainder 2018-05-22 22:26:52 +03:00
Ilya Gorbunov
e01895fb0a Implement unsigned/signed conversions 2018-05-22 22:26:47 +03:00
Ilya Gorbunov
89e4fdfa9c Implement unsigned comparisons 2018-05-22 22:26:43 +03:00
Ilya Gorbunov
e4216099b3 Simplify differenceModulo for unsigned operands 2018-05-22 22:26:39 +03:00
Ilya Gorbunov
f2c01a9d9b Generate ranges, progressions and progressioniterators for UInt and ULong 2018-05-22 22:26:36 +03:00
Ilya Gorbunov
5c6719b1e6 Generate arrays of unsigned types 2018-05-22 22:26:32 +03:00
Ilya Gorbunov
4fbc48f83f Generate specialized abstract iterators for unsigned types 2018-05-22 22:26:28 +03:00
Ilya Gorbunov
188d8ab8dd Generate unsigned integers declarations, mostly without implementations
Generate and/or/xor/inv for UByte/UShort using experimental signed counterparts
2018-05-22 22:26:24 +03:00
Ilya Gorbunov
e57e3971b6 Setup separate sourceset for unsigned integer types
Build jar with unsigned types and put it to dist
2018-05-22 22:26:20 +03:00
Ilya Gorbunov
e886460130 Advance bootstrap
Need to use -XXLanguage feature switch
2018-05-22 22:26:14 +03:00
Toshiaki Kameyama
1d0a11cecd "Remove parameter" quick fix makes generic function call incompilable when type could be inferred from removed parameter only
#KT-23511 Fixed
2018-05-22 17:33:26 +03:00
Toshiaki Kameyama
8271e85dbb ReplaceArrayOfWithLiteralInspection: Remove unnecessary parentheses
#KT-21878 Fixed
2018-05-22 17:33:25 +03:00
Mikhail Glukhikh
c95ed9fd20 Result unused: a few enhancements for PSI checks
Related to KT-15063, KT-24433
2018-05-22 17:13:48 +03:00
Mikhail Glukhikh
b8375d4864 Extend "async result unused" to "Deferred result unused" #KT-15063 Fixed 2018-05-22 17:07:05 +03:00
Mikhail Glukhikh
ffcfa51fbf Introduce inspection "async result unused" #KT-24433 Fixed 2018-05-22 16:39:14 +03:00
Mikhail Glukhikh
d0c045e4ba Style fix: AbstractInspectionTest 2018-05-22 16:39:14 +03:00
Mikhail Glukhikh
feaaf5df84 Reformat: AbstractKotlinInspection 2018-05-22 16:39:14 +03:00
Mikhail Glukhikh
2a9108bcd3 Fix "Too long character literal -> string" in ILLEGAL_ESCAPE
Related to #KT-23788
2018-05-22 16:38:29 +03:00
Toshiaki Kameyama
85cd1e938e Add "Too long character literal -> string" fix to ILLEGAL_ESCAPE error
So #KT-23788 Fixed
2018-05-22 16:19:41 +03:00
Mikhail Glukhikh
6d39eb9239 Unnecessary parentheses in function call with lambda: simplify
Related to KT-23452
2018-05-22 16:18:42 +03:00
Toshiaki Kameyama
b8f3d588b7 Unnecessary parentheses in function call with lambda: fix false positive
So #KT-23452 Fixed
2018-05-22 15:45:02 +03:00
Dmitry Petrov
8dbfd85d26 psi2ir: Support class literals in annotations 2018-05-22 15:29:01 +03:00
Alexander Udalov
e7f6ac1e50 Fix data class equals codegen for type parameters with interface bounds
#KT-24474 Fixed
2018-05-22 13:45:21 +02:00
Mikhail Zarechenskiy
542b2abafa Fix migration change for new inference about coroutines
Now it's possible after 9209222

 #KT-23553 Fixed
2018-05-22 10:11:14 +03:00
Dmitry Petrov
c22dfeaf82 KT-24156 Do not optimize for-loops over Strings with custom iterator
'fun CharSequence.iterator()' is an extension function, so one can
overload it with custom implementation.
Other "predefined" containers such as arrays and ranges have member
'fun iterator()', so these containers are not affected.

Check that 'iterator' call corresponds to an extension function
'iterator' defined in package 'kotlin.text' with a receiver of type
'kotlin.CharSequence'.

 #KT-24156 Fixed
2018-05-22 10:02:52 +03:00
Ilmir Usmanov
f568149863 Implement new assert semantics in back-end
Previously, assert was just a regular function and its argument used to
be computed on each call (even if assertions are disabled on JVM).
This change adds support for 3 new behaviours of assert:
* always-enable (independently from -ea on JVM)
* always-disable (independently from -ea JVM)
* runtime/jvm (compile the calls like javac generates assert-operator)
* legacy (leave current eager semantics) - this already existed

Default behaviour is legacy for now.

The behavior is changed based on -Xassertions flag.
 #KT-7540: Fixed
2018-05-21 20:43:37 +03:00
Derek Schaller
3f5a2c6427 Link license files 2018-05-21 18:19:49 +03:00
Mikhail Zarechenskiy
1b809413d2 [NI] Fix updated type for lambda, use original type for substitution
#KT-24367 Fixed
2018-05-21 17:56:11 +03:00
Alexey Tsvetkov
005bdc46eb Update bootstrap compiler 2018-05-20 18:23:10 +03:00
Alexey Tsvetkov
7f865565a6 Improve JPS progress messages
#KT-9218 fixed
2018-05-18 23:50:08 +03:00
Alexey Tsvetkov
6210df977b Fix NPE during lookup map GC
The cause of the issue is unknown, I was not able to reproduce it as
well

    #KT-24337 fixed
2018-05-18 23:50:08 +03:00
Nicolay Mitropolsky
eeab271eff 182: IDEA-SDK fixed to 182.2371.4 2018-05-18 21:24:59 +03:00
Toshiaki Kameyama
5564102a3e Add "Create secondary constructor" quick fix on NONE_APPLICABLE error #KT-22371 Fixed 2018-05-18 18:11:13 +03:00
Toshiaki Kameyama
d32b53362d Reformat UnusedReceiverParameterInspection 2018-05-18 18:11:13 +03:00
Dmitry Savvinov
68dbeeac7a Introduce LanguageFeature.Kind
Mainly, Kind affects 'forcesPreReleaseBinaries' and
'enabledInProgressiveMode' flags, and allows to cover common
combinations of those flags.
2018-05-18 16:16:23 +03:00
Dmitry Savvinov
c33b7377da Add support of internal arguments for language feature settings
Arguments are passed in form '-XXLanguage:+LanguageFeatureName' for enabling
LanguageFeature.LanguageFeatureName, and '-XXLanguage:-LanguageFeatureName'
for disabling.

Note that they do override other settings, including 'language-version'
or extra ('-X') args.
2018-05-18 16:16:23 +03:00
Dmitry Savvinov
ae119a09eb Minor: reformat CommonToolArguments 2018-05-18 16:16:23 +03:00
Dmitry Savvinov
9ba450ffc5 Minor: reformat parseCommandLineArguments, apply intentions 2018-05-18 16:16:23 +03:00
Dmitry Savvinov
9876ecd6df Minor: reformat CommonCompilerArguments 2018-05-18 16:16:23 +03:00
Dmitry Savvinov
e8181c0473 Introduce -Xprogressive 2018-05-18 16:16:23 +03:00
Mikhael Bogdanov
2e9bf49921 Don't skip coercion to nullable Unit in codegen 2018-05-18 12:58:01 +02:00
Mikhael Bogdanov
73bd97a134 Write deprecation flag 2018-05-18 12:58:01 +02:00
Mikhael Bogdanov
61f444f846 Avoid empty clinit generation 2018-05-18 12:58:00 +02:00
Mikhael Bogdanov
aece29a95b Properly generate annotation classes 2018-05-18 12:57:59 +02:00
Mikhael Bogdanov
893e843648 Code clean 2018-05-18 12:57:59 +02:00
Mikhael Bogdanov
083bcade5f Minor. Reformat 2018-05-18 12:57:58 +02:00
Alexander Udalov
11653c6800 Move checkTypePosition to VarianceChecker in frontend
This is a partial revert of 279ff0b, which is no longer needed because
of the previous commit
2018-05-18 11:56:14 +02:00
Alexander Udalov
0e190e885a Remove UnsafeVarianceTypeSubstitution
Looks like it's not really used for anything
2018-05-18 11:56:14 +02:00
Alexey Sedunov
d2bfb8caec Configuration: Add migration of JPS project to new non-jvm source roots 2018-05-18 12:09:40 +03:00
Alexey Sedunov
9fa26c83b6 Configuration: Introduce special source roots for non-JVM Kotlin modules
#KT-5948 Fixed
 #KT-23672 Fixed
2018-05-18 12:09:40 +03:00
Alexey Sedunov
1fb1431257 Configuration: Setup project settings even if library is not detected
#KT-22305 Fixed
2018-05-18 12:09:39 +03:00
Alexey Sedunov
eb14625851 Configuration: Detect platform of libraries added via maven artifact ids
#KT-20511 Fixed
2018-05-18 12:09:39 +03:00
Alexey Sedunov
06f9be1899 Configuration: Unify presentable names of Kotlin configurators
#KT-23658 Fixed
2018-05-18 12:09:39 +03:00
Alexey Sedunov
4a98f1dccc Misc: Follow-up fixes for 172/182 bunches 2018-05-18 12:09:38 +03:00
Alexey Tsvetkov
55b61bdc53 Turn off inter-project IC when unknown task writes to java output dir 2018-05-17 20:55:27 +03:00
Alexey Tsvetkov
ea255ac854 Rebuild when dependency was built non-incrementally 2018-05-17 20:55:27 +03:00
Alexey Tsvetkov
53266300d4 Implement module detection for Gradle IC with Android
#KT-22431 fixed
2018-05-17 20:55:26 +03:00
Alexey Tsvetkov
e5cdc64f4f Track changes for jar files for non-Android Gradle projects 2018-05-17 20:55:26 +03:00
Alexey Tsvetkov
61e330fa57 Track inter-project IC changes for Java 2018-05-17 20:46:52 +03:00
Alexey Tsvetkov
6a45310830 Remove global artifact history cache in Gradle
Each Kotlin task now writes build history to separate file.
A map of output directories to history files is used to get changes for
modified files.

    #KT-22623 fixed
2018-05-17 20:46:52 +03:00
Alexander Udalov
598e89c03d Update bunch files for KotlinTestUtils after 9dbeb79340 2018-05-17 12:43:30 +02:00
Alexander Udalov
d7c77e522c Do not render UnsafeVariance in tests on built-ins
This fixes LoadBuiltInsTest which failed because UnsafeVariance was
rendered in the lazy resolve result, but was not in the deserialized
result (because it has SOURCE retention)
2018-05-17 12:38:57 +02:00
Nikolay Krasko
2754429573 Minor: fix in comment 2018-05-17 12:27:30 +03:00
Nikolay Krasko
580e2972db Initial settings for incompatible API inspection 2018-05-17 12:27:30 +03:00
Nikolay Krasko
3ef67e1d9d Inspection for highlighting problem API usage
It's planned to use this inspection for show patchset branches problems
during development process.
2018-05-17 12:27:29 +03:00
Nikolay Krasko
a95ec598f2 Refactoring: move accessor name generators to companion object for reuse 2018-05-17 12:27:28 +03:00
Nikolay Krasko
0acb7d8200 Minor: reformat files 2018-05-17 12:27:28 +03:00
Alexey Tsvetkov
f9af48c19e Test Java is up-to-date when Kotlin ABI is unchanged 2018-05-16 21:36:48 +03:00
Alexey Tsvetkov
b2d13ac89b Fix Kapt incremental test with Gradle >= 4.3 2018-05-16 21:36:48 +03:00
Alexander Udalov
ed2439c905 Minor, move version declaration to the correct place 2018-05-16 19:16:08 +02:00
Alexander Udalov
e1a4bd01f5 Add anonymousObjectOriginName/lambdaClassOriginName to kotlinx-metadata
#KT-21320
 #KT-23198
2018-05-16 17:16:22 +02:00
Alexander Udalov
b97379b39b Provide stable JVM names for kotlinx-metadata file facades
#KT-23198
2018-05-16 17:16:22 +02:00
Alexander Udalov
c87218ac6c Use JvmMetadataVersion/JvmBytecodeBinaryVersion in kotlinx-metadata
#KT-23198
2018-05-16 17:16:22 +02:00
Alexander Udalov
ffa6b6233b Minor, make BinaryVersion.numbers private
Use BinaryVersion.toArray instead, as in all other usages
2018-05-16 17:16:22 +02:00
Alexander Udalov
1b15619457 Move BinaryVersion to metadata, JVM versions to metadata.jvm
To be used in kotlinx-metadata
2018-05-16 17:16:22 +02:00
Alexander Udalov
e5a5d834ab Add "-verbose" to kotlinp tool, change type parameter name rendering
Only render the actual name of the type parameter in the verbose mode

 #KT-23198
2018-05-16 17:16:22 +02:00
Alexander Udalov
23d107c11d Support multiple MetadataExtensions instances in kotlinx-metadata
#KT-23198
2018-05-16 17:16:22 +02:00
Alexander Udalov
c42001f550 Refactor flags in kotlinx-metadata
- rename object Flags to Flag and merge it with MetadataFlag
- use typealias Flags instead of Int
- use top level function "flagsOf" instead of "Flags.invoke" to
  construct a bitmask

 #KT-23198
2018-05-16 17:16:22 +02:00
Alexander Udalov
002310ff6e Add ReadMe for kotlinx-metadata and kotlinx-metadata-jvm
#KT-23198
2018-05-16 17:16:22 +02:00
Alexander Udalov
9dbeb79340 Test kotlinx-metadata and kotlinp on compiler test data
#KT-23198
2018-05-16 17:16:21 +02:00
Alexander Udalov
bef759161f Support .kotlin_module files in kotlinx-metadata
#KT-23198
2018-05-16 17:16:21 +02:00
Alexander Udalov
a751d02306 Implement writing visitors for kotlinx-metadata
#KT-23198
2018-05-16 17:16:21 +02:00
Alexander Udalov
4b284a4890 Add kotlinp, a tool to print Kotlin metadata in class/module files
At the moment, it's not published anywhere, but that may change soon

 #KT-23198
2018-05-16 17:16:21 +02:00
Alexander Udalov
e4062f6447 Add kotlinx-metadata library for handling Kotlin metadata
#KT-23198
2018-05-16 17:16:21 +02:00
Ilya Gorbunov
8ab49a70e9 Make dexMethodCount task incremental unless teamcity output is required
Declare details file as output, circumvent task up-to-date check if teamcity statistics output is required.
2018-05-16 17:48:05 +03:00
Ilya Gorbunov
e7b445e4b5 Fix incorrect @returns tag usage and improve padStart/End docs
#KT-24371 Fixed
2018-05-16 17:43:12 +03:00
Ilya Gorbunov
15d21a0532 Remove UnsafeVariance from expected testdata for serialized builtins tests
UnsafeVariance source annotation is no longer serialized as a result of KT-23360
2018-05-16 17:37:02 +03:00
Ilya Gorbunov
a69694a5d5 Advance bootstrap to build 1.2.60-dev-58 2018-05-16 17:37:02 +03:00
Yan Zhulanow
20cb4e91b3 Do not retain proxy-based components for compiler plugin settings in project model 2018-05-16 17:04:03 +03:00
Nicolay Mitropolsky
29ef8650f7 182: gson set to 2.8.4 2018-05-16 13:16:26 +03:00
Mikhail Glukhikh
6a1ddd6c70 Lambda to anonymous: report only from left brace to arrow 2018-05-16 13:01:38 +03:00
Mikhail Glukhikh
f4acaae364 Lambda to anonymous: use type renderer & shorten references 2018-05-16 13:01:38 +03:00
Mikhail Glukhikh
0f2879aa32 Rename: SOURCE_CODE_SHORT_NAMES_IN_TYPES -> *_SHORT_NAMES_NO_ANNOTATIONS 2018-05-16 13:01:37 +03:00
Mikhail Glukhikh
06f7e77006 Introduce new type renderers (no parameters & built-in annotations) 2018-05-16 13:01:37 +03:00
Mikhail Glukhikh
1ba99fde56 "lambda to anonymous": add tests for qualified types (KT-7710) 2018-05-16 13:01:37 +03:00
Mikhail Glukhikh
257664cf1b Make "lambda to anonymous" low-priority (KT-7710) 2018-05-16 13:01:36 +03:00
Mikhail Glukhikh
bd6fdb743c Lambda to anonymous function: use callable builder (KT-7710) 2018-05-16 13:01:36 +03:00
Toshiaki Kameyama
8a20d1bf01 Add intention to convert lambda to anonymous function #KT-7710 Fixed 2018-05-16 13:01:36 +03:00
Nikolay Krasko
8ef4b9a8e1 Don't show type hierarchy for elements without name 2018-05-16 12:55:09 +03:00
Nikolay Krasko
062a212b61 Don't build light classes for local classes with parse errors (KT-24323, EA-107235)
Also use checks for building light classes in `getLightClassDataHolder`.
2018-05-16 12:55:09 +03:00
Nikolay Krasko
15a704fe36 Use comment directive for not generated case to be valid Java file 2018-05-16 12:55:08 +03:00
Nikolay Krasko
f2c642eefb Fight with valid absent, corrupted and missing files in archives (EA-119686)
Inspired by ClassFileViewProvider.
2018-05-16 12:55:08 +03:00
Nikolay Krasko
c35f8d621a Use separate dirs in pill for running IDE to avoid test misbehaviour 2018-05-16 12:55:08 +03:00
Ilya Chernikov
612de2e342 Fix the invalid code after "Fix order of jars" commit 2018-05-16 07:24:21 +02:00
Vyacheslav Gerasimov
a1c551faaf as32: Make use of createIfNecessaryParameter of AndroidModuleInfoProviderImpl.getApplicationResourceDirectories 2018-05-15 22:32:20 +03:00
Vyacheslav Gerasimov
995352c20f Restore j2k.jar in cidr plugin
Excluding it requires more complex refactoring, wip
2018-05-15 22:11:01 +03:00
Ilya Chernikov
b2bda5c017 Enumerate roots for script definitions only if project is initialized
fixes #KT-23805
2018-05-15 19:27:09 +02:00
Ilya Chernikov
4b949ef303 Fix order of jars for the scripting plugin:
if gradle project is being built with JPS, the gradle scripting plugin
is passed in the plugin classpath. Since it is rebased on the embeddable
compiler, it hides expected plugin registrar signature, which leads to
the AbstractMethodError on attempt to load the plugin. Putting incoming
classpath at the end of the resulting one fixes the issue.
Fixes #KT-24448
2018-05-15 19:26:42 +02:00
Alexey Tsvetkov
ea1a4f75ba Fix incremental android extensions test
Weirdly merge resource task was failing when run incrementally
if support library is present
2018-05-15 18:40:54 +03:00
Alexey Tsvetkov
6edba56adb Fix Android IC test
Previously some Kotlin files were recompiled, because Java files
were regenerated.
However this is no longer true for some time since
precise Java tracking was implemented.
2018-05-15 18:40:54 +03:00
Mike
a038a88bfa More correct NOTHING_TO_INLINE description
Strictly speaking, they are not 'lambda parameters', they are 'functional parameters' or 'parameters of functional types'.
Sorry for my pedantry.
2018-05-15 16:27:45 +02:00
Mikhael Bogdanov
f4f01efd1f Avoid descriptors usage in IrFunction flag calculation 2018-05-15 16:07:07 +02:00
Mikhael Bogdanov
e9216625f0 Update logic to $default function lowering (don't skip interface members) 2018-05-15 16:06:31 +02:00
Mikhael Bogdanov
9d36367fbd Minor. Code clean: use class kind utils 2018-05-15 16:06:30 +02:00
Mikhael Bogdanov
678b1101cb Add class kind utils 2018-05-15 16:06:28 +02:00
Mikhael Bogdanov
6590666983 Run ir test in parallel 2018-05-15 16:06:00 +02:00
Mikhael Bogdanov
9546c36c3c Get rid of 'descriptor.isInner()' call 2018-05-15 16:06:00 +02:00
Mikhael Bogdanov
b9da331dcd Migrate DescriptorsFactory.getInnerClassConstructorWithOuterThisParameter() API to symbols 2018-05-15 16:05:59 +02:00
Mikhael Bogdanov
9103b6a51b Migrate DescriptorsFactory.getOuterThisFieldSymbol() API to symbols 2018-05-15 16:05:59 +02:00
Mikhael Bogdanov
ee98556669 Migrate DescriptorsFactory caching to symbols 2018-05-15 16:05:58 +02:00
Mikhael Bogdanov
d4d8fe4995 Migrate DescriptorsFactory.getSymbolForObjectInstance() API to symbols 2018-05-15 16:05:57 +02:00
Mikhael Bogdanov
2631d149b2 Migrate DescriptorsFactory.getFieldDescriptorForEnumEntry() API to symbols 2018-05-15 16:05:55 +02:00
Mikhael Bogdanov
9fad3f25f3 Minor. Reformat 2018-05-15 16:04:47 +02:00
Yan Zhulanow
9277d6a160 Pill: Import Kotlin facets 2018-05-15 16:29:52 +03:00
Yan Zhulanow
215053efc9 Pill: Fetch kotlin compilation arguments 2018-05-15 16:29:51 +03:00
Yan Zhulanow
923fbaaca6 Pill: Fix launching debuggable Android Studio on 'as' bunches 2018-05-15 16:29:50 +03:00
Yan Zhulanow
614033d64c Pill: Import all defined source sets, not only "src" and "test" 2018-05-15 16:29:49 +03:00
Yan Zhulanow
2bf439d3fb Pill: Attach gradle-api dependency 2018-05-15 16:29:48 +03:00
Yan Zhulanow
c439b6d38b Pill: Import common modules as libraries 2018-05-15 16:29:47 +03:00
Yan Zhulanow
33a8843d34 Pill: Download Android jars only if pill.android.tests option is set 2018-05-15 16:29:46 +03:00
Yan Zhulanow
5fc18755ca Pill: Exclude 'build' dirs from excluded projects 2018-05-15 16:29:46 +03:00
Yan Zhulanow
ba5836d666 Pill: Introduce pill{} extension to set extended Pill configuration
Also introduce the flavor concept which allows to specify what part of Kotlin project should be imported.
2018-05-15 16:29:45 +03:00
Dmitry Petrov
a57869993d Fix asserted cast in IrBuilderWithScope.irReturn 2018-05-15 15:43:56 +03:00
Dmitry Petrov
21dfee4565 psi2ir: inferred type for 'when' is Nothing only if it's exhaustive
TODO: fix inference bug
2018-05-15 15:43:56 +03:00
Dmitry Savvinov
70622ff668 Introduce -Xoutput-imports mode of JVM compiler
In this mode, instead of analyzing files and generating bytecode for
them, compiler just saves imports of each file in JSON map of form

'<path to file> -> [<import1>, <import2>, ...]'

It is needed for some external tools, notably for Google3 toolchain.
2018-05-15 15:36:14 +03:00
Mikhail Glukhikh
bec1ae3d94 Reformat: replace with operator assignment 2018-05-15 13:28:08 +03:00
Mon_chi
c49eaf2604 Fix hint text for replace with operator assignment #KT-23559 Fixed 2018-05-15 13:26:23 +03:00
Mikhail Glukhikh
8c3e787584 Convert KFunction to Function in type mismatch fixes #KT-16770 Fixed 2018-05-15 13:22:48 +03:00
Mikhail Glukhikh
25609f1159 Create kotlin file: create abstract class if its name contains Abstract
So #KT-21844 Fixed
2018-05-15 11:30:32 +03:00
Mikhail Glukhikh
1f8e24fa82 Reformat: NewKotlinFileAction 2018-05-15 11:30:30 +03:00
Mikhail Glukhikh
c61b5671c9 Fix testSuspend (protect it from flaky error about disabled coroutines) 2018-05-15 11:30:29 +03:00
Ilya Chernikov
0026a138d3 Add changelog from 1.2.40 - 1.2.41 2018-05-14 21:48:40 +02:00
Ilya Gorbunov
1d0d801744 Minor merge cleanup: remove unused variable 2018-05-14 18:24:31 +03:00
Ilya Gorbunov
864f0fecf6 KT-24353 Include kotlin-test-junit5 into coreLibraries, use JDK_18 to build and test it 2018-05-14 17:37:06 +03:00
evgzakharov
634279621d KT-24353 change junit5 version to minimal possible (5.2.0 -> 5.0.0)
However use the latest version of junit engine for running tests.
2018-05-14 17:36:34 +03:00
evgzakharov
84ee97cae9 KT-24353 add support for junit 5 in kotlin.test 2018-05-14 17:36:34 +03:00
Simon Ogorodnik
6967028fdb KT-24146: Fix inserts imports automatically
Even if "add unambiguous imports on the fly" is off

 #KT-24146 fixed
2018-05-14 17:28:16 +03:00
Denis Zharkov
9de174959e Support androidx under-migration-like nullability annotations
They are hardcoded to avoid having dependency from android.jar on
our annotations' jar with UnderMigration.

Even while it could be a compile-only dependency we need to make sure
that annotated types are read properly without RecentlyNonNull/RecentlyNullable
in the classpath

 #KT-24278 Fixed
2018-05-14 17:16:15 +03:00
Denis Zharkov
e0f09e5571 Minor. Reformat signature enhancement parts 2018-05-14 17:16:15 +03:00
Igor Chevdar
6daabca90b Fixed forgotten receivers during copying 2018-05-14 16:01:13 +03:00
Natalia Selezneva
4ee41d502a Scratch: report errors at the correct line
^KT-24364 Fixed
2018-05-14 15:55:44 +03:00
Natalia Selezneva
6427c79110 Trim last newline in scratch output with REPL
^KT-24362 Fixed
2018-05-14 15:55:39 +03:00
Natalia Selezneva
02fa8b5bab Check for dumb mode before compiling scratch file
^KT-23560
2018-05-14 15:55:35 +03:00
Natalia Selezneva
57b24007ac Log exceptions thrown during Run Scratch Action 2018-05-14 15:55:30 +03:00
Natalia Selezneva
5148a51ea2 Minor: reformat 2018-05-14 15:55:26 +03:00
Nicolay Mitropolsky
31b21a7bc8 182: compilation fix due to quickFixActionMarkers made nullble 2018-05-14 15:05:03 +03:00
Ilya Chernikov
b3219cb762 Implement lazy script definition and light discovery in cli plugin, ...
update appropriate parts of the scripting infrastructure
2018-05-14 11:13:44 +02:00
Dmitry Petrov
0feb50021c IrClass.isInner 2018-05-14 10:37:27 +03:00
Natalia Selezneva
1e92dbf806 Fix tests: attach script reports in cli 2018-05-14 09:21:09 +03:00
Ilya Chernikov
f89d5e94c5 Fix build in 182 branch 2018-05-13 10:59:47 +02:00
Ilya Chernikov
c74924fb8c Fix lz4 dependency...
after snappy was replaced by lz4 in the platform (see the previous commit
with related test for the more info)
2018-05-12 19:02:04 +02:00
Alexey Tsvetkov
38ffd6f85e Add test for missing lz4 dependency
Adds Gradle test for the exception:
`java.lang.ClassNotFoundException: net.jpountz.lz4.LZ4Factory`

The exception breaks IC in Gradle. Gradle compiles non-incrementally as
a fallback strategy, so the build succeeds, but IC is not working.

IC uses persistent hash tables from Intellij as caches.
These tables's buffers are compressed when full.
Previously snappy was used for compression, but 181 platform switched to
LZ4, which was cut out by proguard.

The problem could only be reproduced with Gradle,
since in JPS plugin all caches are managed by JPS process,
which contains the necessary library.

To reproduce the compiler needs to be processed by proguard
(which always happens on TeamCity).
Many classes are needed to trigger the compression.
2018-05-12 19:02:04 +02:00
Vyacheslav Karpukhin
e329af0932 Excluded declarations for classes in CIDR plugin.xml 2018-05-11 19:43:21 +02:00
Zalim Bashorov
0ca6dbcb82 [JS IR BE] remove no longer needed descriptor based utils 2018-05-11 20:27:54 +03:00
Roman Artemev
c9b8aadfff Update test data 2018-05-11 18:50:41 +03:00
Natalia Selezneva
4ee0f401c6 Fix master_172
Remove GradleScriptDefaultDependenciesProvider as unused
2018-05-11 18:46:54 +03:00
Mikhail Glukhikh
1012bdb577 Convert to primary constructor: minor enhancement (KT-19629) 2018-05-11 18:17:42 +03:00
Mikhail Glukhikh
67d2abbe5e Reformat: Convert to primary constructor 2018-05-11 17:36:41 +03:00
Toshiaki Kameyama
a41064295b "Convert to primary constructor": do not move init section down
So #KT-19629 Fixed
2018-05-11 17:36:40 +03:00
Mikhail Glukhikh
9a1253c5c7 Specify type explicitly: suggest also types from overridden
So #KT-22092 Fixed
2018-05-11 17:36:38 +03:00
Mikhail Glukhikh
bf15d22ef1 Reformat: SpecifyTypeExplicitlyIntention 2018-05-11 17:36:37 +03:00
Mikhail Glukhikh
13be7803bb Introduce "redundant async" inspection #KT-24235 Fixed 2018-05-11 17:36:35 +03:00
Mikhail Glukhikh
365c13c38e Extract AbstractCallChainChecker from SimplifiableCallChainInspection 2018-05-11 17:36:29 +03:00
Mikhail Glukhikh
9fa352e5c0 Reformat: simplifiable call chain inspection 2018-05-11 17:36:26 +03:00
Pavel V. Talanov
a584de8a7e Prefer platform specific declarations when searching for library sources
Untested: test infrastructure needed

 #KT-23223 Fixed
2018-05-11 16:25:16 +02:00
Pavel V. Talanov
f6b094781f Mpp resolve: ignore module dependencies on libraries of other platforms
These are not read by the compiler

Untested: test infrastructure needed

 #KT-20406 Fixed
2018-05-11 16:25:14 +02:00
Roman Artemev
24e477c378 Update test data 2018-05-11 17:14:30 +03:00
Roman Artemev
131fb642aa Fix initializer lowering crash during deep copy 2018-05-11 17:14:30 +03:00
Toshiaki Kameyama
449943da01 "Merge with next when": made applicable when delimited by ';' or comment
So #KT-12042 Fixed
2018-05-11 16:37:36 +03:00
Toshiaki Kameyama
cdbd7a7c5a Reformat MergeWhenIntention 2018-05-11 16:36:57 +03:00
Toshiaki Kameyama
4ee9db7a6c Use property access: suppress for reserved words #KT-23775 Fixed 2018-05-11 16:32:44 +03:00
Toshiaki Kameyama
240b9fd97a Reformat: UsePropertyAccessSyntaxIntention 2018-05-11 16:32:06 +03:00
Derek
c12bd9b506 fix gradle license path (#1658) 2018-05-11 16:08:40 +03:00
Alexey Sedunov
805010e75c Misc: Permit refactorings/intentions/quick fixes inside script files
#KT-20123 Fixed
2018-05-11 16:05:20 +03:00
Alexey Sedunov
a5a13b74f5 Create from Usage: Support smart casts on explicit receivers
#KT-24069 Fixed
2018-05-11 16:05:20 +03:00
Alexey Sedunov
a92a4a2a6d Add Parameter Fix: Support smart casts
#KT-24207 Fixed
2018-05-11 16:05:19 +03:00
Alexey Sedunov
a4a10c7ba4 Create from Usage: Fix generation of extensions with nullable receiver
#KT-23796 Fixed
2018-05-11 16:05:19 +03:00
Alexey Sedunov
4e3c1e9f56 Rename: Do not search text occurrences of local declarations
#KT-23838 Fixed
2018-05-11 16:05:19 +03:00
Derek
f8111c9f23 fix bullet point indentation in license readme (#1659) 2018-05-11 16:04:45 +03:00
Sergey Igushkin
2a46648e3e In Android MPP target, add common module dependency to api configuration
Since Android considers the `compile` configuration as deprecated and
reports a warning when a dependency is added to it, use the `api`
configuration when dealing with an Android platform module.

Issue #KT-23719 Fixed
2018-05-11 16:03:33 +03:00
Natalia Selezneva
37d7c36b11 Fix missing internal template declaration in plugin.xml 2018-05-11 15:51:52 +03:00
Natalia Selezneva
9535c82149 Backport ScriptSeverity.FATAL to old script API
(cherry picked from commit dceb063)
2018-05-11 15:51:47 +03:00
Natalia Selezneva
41653e9a50 Introduce separate cache for scripts
^KT-22588 Fixed
2018-05-11 15:51:42 +03:00
Natalia Selezneva
71703636bc Optimization: do not load dependencies for scripts not under expected location 2018-05-11 15:51:37 +03:00
Natalia Selezneva
61c31ce030 Refactoring: move logic that script shouldn't be highlighted if there are any FATAL error to KotlinHighlightingUtil 2018-05-11 15:51:33 +03:00
Natalia Selezneva
3cc3ca97ac Show notification in the editor when new script dependencies available
^KT-23616 Fixed
2018-05-11 15:51:28 +03:00
Natalia Selezneva
d422eb6833 Add a delay to reload script dependencies
^KT-23616
2018-05-11 15:51:24 +03:00
Natalia Selezneva
3eac391793 Add setting to reload script dependencies on file change
^KT-23616
2018-05-11 15:51:19 +03:00
Natalia Selezneva
082916be70 Refactoring of ScriptDependenciesUpdater
Extract classes for sync and async dependencies loading
2018-05-11 15:51:14 +03:00
Natalia Selezneva
97848f2812 Minor: reformat 2018-05-11 15:51:09 +03:00
Natalia Selezneva
3f8245988e Remove GradleScriptDefaultDependenciesProvider as unused 2018-05-11 15:51:04 +03:00
Florian Steitz
8453ed1803 [KT-10456] Move tests from StringNumberConversionJVMTest to StringNumberConversionTest 2018-05-11 15:42:11 +03:00
Florian Steitz
d7bada0c29 [KT-10456] Added JS implementation for Int.toString(radix) and similar overloads 2018-05-11 15:42:11 +03:00
Sergey Igushkin
284b5b9860 (minor fix) Remove extra underscore from module names 2018-05-11 15:37:17 +03:00
Vyacheslav Karpukhin
d56ba1e7a4 Excluded declarations for classes in CIDR plugin.xml 2018-05-11 13:28:22 +02:00
Nicolay Mitropolsky
05be8f7536 UastKotlinPsiVariable: hashCode nullability fix (EA-119715) 2018-05-11 12:57:23 +03:00
Nikolay Krasko
bea77900ff Fix NPE in KotlinCompletionCharFilter (EA-120148) 2018-05-11 12:00:43 +03:00
Nikolay Krasko
c469a4d9b9 Bad condition for cast in KotlinStatementsSurrounder (EA-119701) 2018-05-11 12:00:43 +03:00
Nikolay Krasko
9e2412b887 Create dummy method for light class without reformat (EA-115803) 2018-05-11 12:00:43 +03:00
Nikolay Krasko
c9f31099f2 Fix binary compatibility issue after moving ModuleTestSourceInfo
Compatibility check revealed problem in truth-postfix-plugin.

b06adbf4e6/plugin/src/main/kotlin/com/github/droibit/plugin/truth/postfix/utils/TemplateUtils.kt
2018-05-11 12:00:43 +03:00
Roman Artemev
d71ff1818d Add test 2018-05-11 11:33:23 +03:00
Roman Artemev
455edae7de Fix name clashing between constructors in function reference lowering 2018-05-11 11:33:23 +03:00
Roman Artemev
4f2d5baa5d [KT-24335]
Fix inheritance from interface which is also inherited from an external interface
Add test case
2018-05-11 11:26:34 +03:00
Dmitry Petrov
93f5fe2451 IrField is 'final' if corresponding property is 'val' 2018-05-11 11:24:46 +03:00
Dmitry Petrov
d83849eec5 IR: IrValueSymbol.owner: IrValueDeclaration 2018-05-11 11:24:46 +03:00
Dmitry Petrov
1592aa499f IR: IrFunctionSymbol.owner: IrFunction
This requires some class hierarchy juggling around
IrFunction and IrReturnableBlock.
2018-05-11 11:24:46 +03:00
Dmitry Petrov
f500329dac IR: IrFunction.name 2018-05-11 11:24:46 +03:00
Dmitry Petrov
729efaf912 IR: IrConstructor.isPrimary
NB this is required for Kotlin/JS.
2018-05-11 11:24:46 +03:00
Dmitry Petrov
a6057fb499 IR: {IrClass, IrFunction, IrProperty, IrField}.isExternal 2018-05-11 11:24:46 +03:00
Dmitry Petrov
9717345e3b IR: IrField.isFinal 2018-05-11 11:24:46 +03:00
Vyacheslav Gerasimov
9721ca8d09 as32: Update compiler.pro for AS 3.2 C14 2018-05-10 23:28:42 +03:00
Nikolay Krasko
6f6237aedb Unneeded bunch file for autowiredConstructor.test in 172 2018-05-10 23:28:41 +03:00
Nikolay Krasko
4e26b04bb2 Remove unneeded files after move to 181 from 173 2018-05-10 23:28:41 +03:00
Vyacheslav Gerasimov
c1f5ebb28e as32: Fix usages of AppResourceRepository in AS 3.2 C14 plugin 2018-05-10 23:28:41 +03:00
Vyacheslav Gerasimov
4adc0a94ab as32: Update to 181 platform api 2018-05-10 23:28:41 +03:00
Vyacheslav Gerasimov
ab25145458 as32: Restore uast to 181 platform state 2018-05-10 23:28:41 +03:00
Vyacheslav Gerasimov
daa860651f as32: Update AS 3.2 version to 3.2.0.13 2018-05-10 23:28:41 +03:00
Alexey Tsvetkov
c026c7f24b Filter out non-Java files from kapt inputs
#KT-23878 fixed
2018-05-10 22:01:06 +03:00
Alexey Tsvetkov
5f3c57e69a Filter out generated Java files from stubs generation inputs 2018-05-10 21:58:35 +03:00
Anton Bannykh
23fb5107c7 JS: fix Long inlining (private, companion) (KT-24189 fixed). 2018-05-10 21:06:50 +03:00
Toshiaki Kameyama
da92c844a6 Might be 'const': fix false positive in object literal #KT-23756 Fixed 2018-05-10 20:42:32 +03:00
Mikhail Glukhikh
84d71e5a8c "Wrap with let": minor enhancement (related to KT-6364) 2018-05-10 20:41:53 +03:00
Toshiaki Kameyama
b6564ed19a "Wrap with let": fix for nullable extension function call #KT-6364 Fixed 2018-05-10 20:28:14 +03:00
Sergey Igushkin
093842932f Filter some characters out of module names passed to Kotlin from Gradle
This addresses the cases when a module name contains a slash
 (e.g. when the Gradle project name was set this way to point
Gradle to the directory), which led to Kotlin module file being placed
under a subdirectory of META-INF and thus undiscoverable for the
compiler and reflect.

Additionally, this fix removes characters \n, \r, \t whose
presence in a module name caused compilation failures.

Issue #KT-20608 Fixed
2018-05-10 19:17:03 +03:00
Mikhail Glukhikh
a8ad980910 If to when: label break / continue if necessary #KT-11427 Fixed 2018-05-10 18:46:24 +03:00
Mikhail Glukhikh
2812601e2d Reformat: add loop label 2018-05-10 18:46:18 +03:00
Mikhail Glukhikh
73a756084e Reformat: if to when 2018-05-10 18:46:17 +03:00
Ilya Gorbunov
d9d7b87fd9 Reformat kotlin.test library 2018-05-10 16:27:15 +03:00
Vyacheslav Gerasimov
06aaa990be Build: Exclude maven from CIDR plugin artifact 2018-05-08 21:49:08 +03:00
Vyacheslav Gerasimov
3d7f2f663f Build: Extract maven ide module from kotlin-plugin.jar to standalone jar 2018-05-08 21:49:08 +03:00
Vyacheslav Gerasimov
f666db74f9 Build: Exclude standalone kotlin compiler and jps from CIDR artifact 2018-05-08 21:49:08 +03:00
Vyacheslav Gerasimov
f2b323fbe3 Build: Extract jps-common ide module from kotlin-plugin.jar to standalone jar 2018-05-08 21:49:08 +03:00
Vyacheslav Gerasimov
4d4ff636d2 Build: Extract jvm ide module from kotlin-plugin.jar to standalone jar 2018-05-08 21:49:07 +03:00
Vyacheslav Gerasimov
80f5a1d44d Build: Exclude j2k from CIDR plugin artifact 2018-05-08 21:49:07 +03:00
Vyacheslav Gerasimov
282f2a46b1 Build: Exclude kapt from CIDR plugin artifact 2018-05-08 21:49:07 +03:00
Vyacheslav Gerasimov
42cfacdf0c Build: Extract j2k to standalone jar 2018-05-08 21:49:07 +03:00
Vyacheslav Gerasimov
8773e2d6f3 Build: Fix zipCidrPlugin destination file name, missed zip extension 2018-05-08 21:49:07 +03:00
Toshiaki Kameyama
3aab68d635 Add "Make variable immutable" quickfix for const #KT-24263 Fixed 2018-05-08 18:37:10 +03:00
Toshiaki Kameyama
d1c2ea4095 Reformat: QuickFixRegistrar 2018-05-08 18:37:10 +03:00
Toshiaki Kameyama
e26ab28d45 Reformat: ChangeVariableMutabilityFix 2018-05-08 18:37:10 +03:00
Mikhail Glukhikh
e141f4f407 Convert array to vararg: extract text variants to constants 2018-05-08 18:37:09 +03:00
Toshiaki Kameyama
da92eb63a0 Add intention replacing vararg with array and vice versa #KT-23419 Fixed 2018-05-08 18:37:09 +03:00
Mikhail Glukhikh
e933bb8220 Unused symbol suppression: get annotation descriptors via entries
Otherwise we miss use-site targeted annotations,
and getUseSiteTargetedAnnotations does not help
So #KT-20332 Fixed
2018-05-08 18:37:09 +03:00
Mikhail Glukhikh
59c019cb00 Reformat: unused symbol inspection 2018-05-08 18:37:08 +03:00
Mikhail Glukhikh
78ed39856e UnnecessaryVariableInspection: do not show dialogs #KT-22989 Fixed 2018-05-08 18:37:08 +03:00
Mikhail Glukhikh
39c0b57724 Reformat: UnnecessaryVariableInspection 2018-05-08 18:37:08 +03:00
Mikhail Glukhikh
de85235bd7 Reformat: KotlinInlineValHandler 2018-05-08 18:37:07 +03:00
Mikhail Glukhikh
5246c54dad Do not suggest removing empty parentheses if lambda is on the next line
So #KT-15195 Fixed
2018-05-08 18:37:07 +03:00
Mikhail Glukhikh
6968540889 Reformat: RemoveEmptyParenthesesFromLambdaCallIntention 2018-05-08 18:37:07 +03:00
Nicolay Mitropolsky
24b8d12eca 182: fixing SlicePanel compilation after isToShowCloseButton method removal 2018-05-08 18:35:04 +03:00
Ilya Chernikov
e727e20973 [minor] Improve daemon exceptions logging 2018-05-08 15:59:45 +02:00
Alexey Tsvetkov
89da660186 Replace assertContains with assertTasksExecuted/assertTasksUpToDate 2018-05-08 15:24:45 +03:00
Alexey Tsvetkov
f00e243822 Reformat :kotlin-gradle-plugin-integration-tests 2018-05-08 15:24:45 +03:00
Alexey Tsvetkov
39c000bb4d Add vararg overloads for Gradle test utils 2018-05-08 15:24:45 +03:00
Nicolay Mitropolsky
cf43be9fa3 UAST: replacing deprecated JvmDeclarationUElement with JvmDeclarationUElementPlaceholder (#KT-23887)
To make it possible to delete `JvmDeclarationUElement` in IDEA-182
2018-05-08 15:21:13 +03:00
Nikolay Krasko
7b80fb0431 Mark actions as internal to prevent "Other" group creation (KT-24268)
#KT-24268 Fixed
2018-05-08 13:04:27 +03:00
Nikolay Krasko
b19ad7e94c Reformat: idea.highlighter package 2018-05-08 13:04:27 +03:00
Nicolay Mitropolsky
732e25a3f0 KotlinElementActionsFactory: fix for getting names from dead pointers (EA-116215) 2018-05-08 12:57:29 +03:00
Mikhail Zarechenskiy
37a8844050 Update bunch files for kotlinInternalUastUtils
After 5815e790ba and d6405c8147
2018-05-08 12:03:17 +03:00
Mikhail Zarechenskiy
eee59cb23c Fix deserialization of inline functions from inline classes
This fixes:
 CompileKotlinAgainstInlineKotlinTestGenerated$InlineClasses.testInlineFunctionInsideInlineClassesBox 

 Consider the following binary dependency:

 inline class UInt(val u: Int) {
    inline fun foo() {}
 }

 Now, if we want to inline function `foo`, we have to load it from bytes
 as ASM method and to do this we should know the container of this function.

 Note that because of inline class, actual signature of this function
 would be `foo(I)` and it will be stored in UInt$Erased class, not `UInt`
2018-05-08 11:54:24 +03:00
Natalia Selezneva
7fe21f3035 Do not throw exception when script template doesn't have required annotation
^KT-23746 Fixed
2018-05-08 11:40:51 +03:00
Natalia Selezneva
522587dc5d Align checkbox labels in scratch panel
^KT-24315 Fixed
2018-05-08 11:40:51 +03:00
Natalia Selezneva
e5a40c8c7f Scratch: substring output and print it to separate tool window if it is too long
^KT-24016 In Progress
2018-05-08 11:40:51 +03:00
Natalia Selezneva
613ea94376 Allow reference search in scratches
^KT-23563 Fixed
^KT-23587 Fixed
2018-05-08 11:40:51 +03:00
Natalia Selezneva
db2bcff390 Restore scratch options after IDE restart
^KT-23441 Fixed
2018-05-08 11:40:51 +03:00
Natalia Selezneva
178dad3b4e Refactoring: introduce file attribute utils 2018-05-08 11:40:51 +03:00
Natalia Selezneva
bed5a3c8f3 Scratch: find correct line to report error at
^KT-23480 Fixed
EA-117936 Fixed
2018-05-08 11:40:51 +03:00
Natalia Selezneva
62fadd9086 Scripts: GradleScriptTemplateProvider should be the first in the contributors list.
This is needed to avoid broking .gradle.kts support by external plugins
2018-05-08 11:40:51 +03:00
Dmitry Savvinov
58eb117ae1 Improve message of exception thrown from codegen
Don't lose information about which file caused crash.
2018-05-08 11:28:40 +03:00
Natalia Selezneva
47bafb8c75 Regenerate IntentionTestGenerated 2018-05-08 09:10:51 +03:00
Natalia Selezneva
1aecd2058c Fix testdata after 534cbae4ef
^KT-14391
2018-05-08 09:02:35 +03:00
Vyacheslav Gerasimov
838f1f91fc Build: Extract android ide modules from kotlin-plugin.jar to standalone jars
So we could exclude them in IDEs which don't have android plugin (AppCode, CLion)
2018-05-08 00:26:04 +03:00
Vyacheslav Gerasimov
ec1a9d9907 Move uast service registration to jvm.xml 2018-05-08 00:25:22 +03:00
Vyacheslav Gerasimov
da9175febd Build: Exclude uast and lint artifacts from CIDR plugin
There is no java in CIDR platform and java dependent modules should be excluded
2018-05-08 00:25:07 +03:00
Vyacheslav Gerasimov
e6f64519e4 Build: Copy uast to idea plugin as separate artifacts 2018-05-08 00:24:22 +03:00
Sergey Igushkin
8fda174fb0 Add the compiler classpath of the KotlinCompile task as KaptTask's input
KaptTask was not declaring the compiler classpath (which it takes from
compileKotlin task for calling the compiler) as input. This commit fixes
that and adds a test that checks compiler classpath input checks for the
kapt tasks.

Issue #KT-23879 Fixed
2018-05-07 15:55:55 +03:00
Sergey Igushkin
352fb4a1c8 Add a user-friendly report that the JDK tools are missing
Issue #KT-20214 Fixed
2018-05-07 15:47:11 +03:00
Mikhail Zarechenskiy
50116fd8fc Fix coercion result for inline classes, add comment 2018-05-07 15:25:48 +03:00
Mikhail Zarechenskiy
b25a1d9522 Support inline functions inside inline classes 2018-05-07 15:25:46 +03:00
Mikhail Zarechenskiy
5c57c799fc Fix generation of elvis with null constant for inline classes 2018-05-07 15:25:45 +03:00
Mikhail Zarechenskiy
043c3d9a97 Prohibit properties with backing fields inside inline classes 2018-05-07 15:25:43 +03:00
Mikhail Zarechenskiy
29d15b9990 Prohibit varargs on parameters of inline class types 2018-05-07 15:25:42 +03:00
Mikhail Zarechenskiy
d3c1c11dc5 Prohibit initializer blocks inside inline classes 2018-05-07 15:25:40 +03:00
Mikhail Zarechenskiy
6a120d2f85 Require presence of public primary constructor for inline class 2018-05-07 15:25:38 +03:00
Mikhail Zarechenskiy
096fe1c411 Don't report diagnostics on the whole declaration, use main keyword 2018-05-07 15:25:37 +03:00
Mikhail Zarechenskiy
ed4fd2bb2f Mark inline classes feature as experimental 2018-05-07 15:25:35 +03:00
Mikhail Zarechenskiy
71de2e3265 Report diagnostics for inline classes even if the feature is unsupported
This would help for those who use inline classes by suppressing error
 about unsupported feature
2018-05-07 15:25:34 +03:00
Mikhael Bogdanov
8834ea74f2 Revert "Don't generate reified inline function as privates"
This reverts commit 56859f7
2018-05-07 14:14:07 +02:00
Mikhael Bogdanov
56859f7b87 Don't generate reified inline function as privates
#KT-18563 Fixed
2018-05-07 12:49:31 +02:00
Mikhael Bogdanov
99284316d6 Don't shrink psi utils class
Shrinker removes all unused private methods
 that could be reified inline functions

 #KT-23402 Fixed
2018-05-07 12:19:09 +02:00
Toshiaki Kameyama
534cbae4ef KT-14391 RemoveUnnecessaryParenthesesIntention lost comment
on closing parenthesis

 ^KT-14391 Fixed
2018-05-07 12:40:57 +03:00
Alexander Udalov
143c3ccb95 Disallow usages of experimental markers as qualifiers
Only allow explicit imports of markers, but not of nested classes
declared in them
2018-05-07 11:37:31 +02:00
Alexander Udalov
d27657e8f6 Minor, move loadWasExperimentalMarkerClasses closer to usage 2018-05-07 11:37:31 +02:00
Alexander Udalov
2fea2135f8 Add TYPEALIAS target to UseExperimental 2018-05-07 11:37:31 +02:00
Alexander Udalov
7d74508529 Report experimental diagnostics on inaccessible (wrt SinceKotlin) API
If a declaration is annotated both with SinceKotlin and WasExperimental
and the SinceKotlin version makes it inaccessible, the experimental
checker must regard it as experimental, with markers specified in the
WasExperimental annotation arguments. So only errors/warnings about the
experimentality are going to be reported in this case, and no error that
the declaration is unavailable because of a low API version
2018-05-07 11:37:31 +02:00
Alexander Udalov
1f0d3d9c7c Load WasExperimental values correctly for associated declarations
For example, if a class is `@SinceKotlin("X")
@WasExperimental(M::class)`, then its constructor should also be
accessible if API < X, provided that the opt-in to M is given
2018-05-07 11:37:31 +02:00
Alexander Udalov
9995438b37 Forbid non-intended usages of Experimental and markers
Experimental and UseExperimental can only be used as annotations or
qualifiers (to allow "Experimental.Level.*"); experimental markers can
only be used as annotations or qualifiers, or as left-hand side of a
::class literal in arguments to UseExperimental/WasExperimental.

This is needed because we're not yet sure of the design of this feature
and would like to retain the possibility to drop these declarations
(Experimental, UseExperimental) altogether. If they were going to be
used as types, it would be problematic because we can't simply delete
something from stdlib, should deprecate it first. With this change,
these declarations can only be used if the user has opted into using the
experimental API somehow (for example, with
`-Xuse-experimental=kotlin.Experimental`), so we won't stop conforming
to our deprecation policy if we decide to remove these declarations in
the future
2018-05-07 11:37:31 +02:00
Alexander Udalov
ed6f044fb0 Add internal WasExperimental for stdlib
Usages of declarations annotated with WasExperimental are allowed even
if the API version requirement is not satisfied, provided that the
opt-in to all mentioned markers is given. This is needed for smooth
graduation of API in kotlin-stdlib
2018-05-07 11:37:31 +02:00
Alexander Udalov
fdc4313860 Minor, fix bodyUsagesAndInline.kt test data 2018-05-07 11:37:31 +02:00
Ilmir Usmanov
fad5596ef9 Minor: remove builtins from kotlin-stdlib-coroutines.jar 2018-05-07 10:34:50 +03:00
Ilmir Usmanov
5e4ce4f880 Remove coroutineContext from kotlin.coroutines.experimental.intrinsics package
#KT-22400: Fixed
2018-05-07 10:28:54 +03:00
Mikhail Zarechenskiy
54ca2cbbe0 Introduce original for ReceiverValue and use it inside coroutine checker 2018-05-04 19:54:14 +03:00
Mikhail Zarechenskiy
b23e9f771b [NI] Fix checking for the same instance inside for suspend functions 2018-05-04 19:53:54 +03:00
Mikhail Zarechenskiy
64b10d827d [NI] Refactoring: rename NonFixedType -> StubType 2018-05-04 19:08:22 +03:00
Mikhail Zarechenskiy
5187f6b060 [NI] Improve performance of resolution part for postoned variables 2018-05-04 19:08:21 +03:00
Mikhail Zarechenskiy
a30a1f2a96 [NI] Update calls after inference for coroutines 2018-05-04 19:08:21 +03:00
Mikhail Zarechenskiy
99a95f31d3 [NI] There is no need in copying constraint storage as it read-only 2018-05-04 19:08:20 +03:00
Mikhail Zarechenskiy
e0ca3421ca [NI] Use only receiver from coroutine call to mark postponed variable 2018-05-04 19:08:20 +03:00
Mikhail Zarechenskiy
59c4b9ad2f [NI] Make it possible to use nullable non-fixed type 2018-05-04 19:08:20 +03:00
Mikhail Zarechenskiy
9209222112 [NI] Introduce inference for coroutines and builder-like constructions 2018-05-04 19:08:19 +03:00
Mikhail Glukhikh
54fc846dea Minor: fix parcel test (related to KT-21129) 2018-05-04 18:16:57 +03:00
Mikhail Glukhikh
e76debb12b Report UNUSED_PARAMETER in setter #KT-21129 Fixed 2018-05-04 18:04:57 +03:00
Mikhail Glukhikh
bcc1c02e73 Cleanup: constructor consistency checker 2018-05-04 17:53:00 +03:00
Mikhael Bogdanov
643e4f5c5a Get rid of descriptors in TailrecLowering 2018-05-04 16:35:44 +02:00
Mikhael Bogdanov
dc68936e69 Get rid of descriptors in StaticDefaultFunctionLowering 2018-05-04 16:35:44 +02:00
Mikhael Bogdanov
489808ec38 Get rid of descriptors in PropertiesLowering 2018-05-04 16:35:43 +02:00
Mikhael Bogdanov
17e2f1a61e Get rid of descriptors in LateinitLowering 2018-05-04 16:35:42 +02:00
Mikhael Bogdanov
74fa7ee676 Minor. Code clean 2018-05-04 16:35:42 +02:00
Mikhael Bogdanov
fdbc863e60 Minor. Reformat 2018-05-04 16:28:12 +02:00
Sergey Igushkin
e82170a04e Tracks and match source sets for MPP after the plugins are applied
Since the custom source sets may be added after the plugins are applied in both common and platform module, we need to handle `.all { ... }` source sets in both modules and add common sources to the platform module once a match is found.

Issue #KT-22510 Fixed
2018-05-04 15:37:08 +03:00
Dmitry Savvinov
97d455729b Add -Xdump-perf 2018-05-04 15:00:43 +03:00
Dmitry Savvinov
9996a1bc7e Rewrite performance statistics collection
This commit introduces notion of 'PerformanceManager' in CLI, suitable
for collecting performance metrics of the compiler. It:

- provides `notifyX{Started/Finished}` API, where 'X' is some
measurable event (previously there were just ad hoc manual time
measurements using System.nanoTime() and stuff)

- collects measurements, so that later they can be reported in an
appropriate way (previously measurements were reported immediately to
MessageCollector as plain strings)

- allows overriding to collect metrics, specific for just one target
platform compilation

Also, common logic of compiler performance statistics collection was
extracted from platform-compilers (K2JVMCompiler) to common classes
(CLICompiler), to allow other platform-compilers (e.g. K2JSCompiler)
re-use it.
2018-05-04 15:00:43 +03:00
Dmitry Savvinov
c3745c9040 Drop -Xrepeat flag
This flag hadn't been maintained for a long time and isn't working
properly at the moment.
2018-05-04 15:00:43 +03:00
Dmitry Savvinov
e3073be726 Minor: reformat KotlinToJvmBytecodeCompiler 2018-05-04 15:00:43 +03:00
Alexander Udalov
c57864e46c Require "-Xuse-experimental=kotlin.Experimental" on usages of Experimental
Since we're not yet sure of the design of Experimental/UseExperimental,
we're making them "experimental" themselves in some sense, in that the
user is required to provide the magic argument
"-Xuse-experimental=kotlin.Experimental" to be allowed to use either
Experimental or UseExperimental. This is more convenient than the
previous approach of "-language-version 1.3
-Xskip-metadata-version-check" because it's simpler and does not cause
pre-release binaries to be produced
2018-05-04 13:48:24 +02:00
Alexander Udalov
2a61d42fc1 Refactor and simplify ExperimentalUsageChecker 2018-05-04 13:48:24 +02:00
Alexander Udalov
4f53a54115 Drop Experimental.Impact, simplify related code and tests
See https://github.com/Kotlin/KEEP/issues/95#issuecomment-383889404

Drop Experimental.changesMayBreak, Experimental.Impact, the concept of
signature/body usage, same module exemption. Make the majority of tests
single-module because there is now no difference in the checker between
usages from the same module or from another module
2018-05-04 13:48:24 +02:00
Alexander Udalov
1719eecb67 Minor, init slice debug names for FilesByFacadeFqNameIndexer 2018-05-04 13:48:24 +02:00
Mikhael Bogdanov
12ba1b002c Refactor SharedVariablesManager: get rid of descriptors in API 2018-05-04 12:33:44 +02:00
Mikhael Bogdanov
f1c0db346a Code clean 2018-05-04 12:33:35 +02:00
Sergey Rostov
9fafe0473c jps (refactor): reimplement KotlinModuleBuildTarget data binding using CompileContext 2018-05-04 11:14:45 +03:00
Sergey Rostov
91b703d529 jps: common modules metadata compiler
(cherry picked from commit cde333d)
2018-05-04 11:05:13 +03:00
Sergey Rostov
41dcc9ad4d jps: minor: refine kotlin.jps.model package
(cherry picked from commit 2a31e78)
2018-05-04 11:05:12 +03:00
Sergey Rostov
a390fc36e2 jps: Refactor module/project settings getters/setters
(cherry picked from commit d29ffa0)
2018-05-04 11:05:12 +03:00
Sergey Rostov
75e6be7802 jps(refactor): Extract platform related code
#KT-23656 Fixed

(cherry picked from commit 18a751d)
2018-05-04 11:05:12 +03:00
Ilya Chernikov
22439250e2 Use kts file extension instead of kt in tests...
since all "kt" files are now considered - definitely non-scripts
2018-05-03 22:15:10 +02:00
Ilya Chernikov
24e8e7c40d Eliminate script dependencies queries for non-scripts 2018-05-03 22:15:10 +02:00
Ilya Chernikov
d4070cc4d7 Return null on directories in script definition wrappers for files 2018-05-03 22:15:10 +02:00
Ilya Chernikov
9eab7a627d Add script API libs sources to the IDEA plugin 2018-05-03 22:15:10 +02:00
Alexander Udalov
64f5c2c9a3 Refactor and simplify AbstractCustomScriptCodegenTest
Remove copy-paste, use CodegenTestCase's infrastructure as much as
possible, use InTextDirectiveUtils instead of regexps
2018-05-03 22:15:10 +02:00
Alexander Udalov
c48bb9c981 Minor, drop unused parameter in CodegenTestCase, add testJdkKind 2018-05-03 22:15:10 +02:00
Ilya Chernikov
48cf0bd949 Fixes and refactorings after review 2018-05-03 22:15:10 +02:00
Ilya Chernikov
dff4be9e04 Implement script environment variables in backend, add simple test 2018-05-03 22:15:09 +02:00
Ilya Chernikov
a9600e34bf Add test infrastructure for custom scripts testing, add receiver test 2018-05-03 22:15:09 +02:00
Ilya Chernikov
57db77a295 Refactor script infrastructure for easier usage and testability:
- add script annotation for specifying default configuration for a script
- add support for this annotation in the default configurator
- rename configurator accordingly
- add default implementation of the refineConfiguration method
- make property bag class open
2018-05-03 22:15:09 +02:00
Ilya Chernikov
516924cda1 Add support for script environment variables to the frontend 2018-05-03 22:15:09 +02:00
Ilya Chernikov
15f9ad9531 Implement quick non-script detection and lazy script discovery..
so ".kt" and ".java" files are not considered as scripts and quickly
filtered out, and for the other files the the checks are implemented
using sequences, mechanisms provided to supply script definitions
lazily, and script discovery is implemented using this mechanisms.
2018-05-03 22:15:09 +02:00
Ilya Chernikov
969340167f Apply scripting plugin in gradle plugin by default 2018-05-03 22:15:09 +02:00
Ilya Chernikov
a29411a211 Process script templates everywhere properly:
- add options to disable scripting plugin and standard script definition
- move standard definition adding logic into appropriate place
- fix logic of scripting plugin loading
- add standard script definition on the environment creation to
  ensure compatibility with all usages
- fix testdata
- some minor fixes
2018-05-03 22:15:09 +02:00
Toshiaki Kameyama
b5da48c566 Don't report suspicious callable reference on invoke with parameters
So #KT-23465 Fixed
2018-05-03 18:47:12 +03:00
Toshiaki Kameyama
13356d32fd Redundant SAM-constructor: highlight nested class name with outer class
So #KT-11156 Fixed
2018-05-03 18:32:44 +03:00
Toshiaki Kameyama
204c68070a Reformat RedundantSamConstructorInspection 2018-05-03 18:31:34 +03:00
Toshiaki Kameyama
c43311ba9a Move to constructor: change default use-site target: property -> field
So #KT-23801 Fixed
2018-05-03 18:12:11 +03:00
Toshiaki Kameyama
012227dd73 Reformat MovePropertyToConstructorIntention 2018-05-03 18:11:23 +03:00
Toshiaki Kameyama
633679ac16 Preserve comments in "Remove variable" quick fix #KT-23753 Fixed 2018-05-03 18:09:22 +03:00
Alexey Tsvetkov
61edfaced5 Speed up pill
Pill runs 10x faster on my machine after the change
2018-05-03 18:03:18 +03:00
Toshiaki Kameyama
66d738848b Convert foreach to for loop: place caret on the variable declaration
So #KT-7822 Fixed
2018-05-03 17:54:56 +03:00
Toshiaki Kameyama
3221fbdca9 Don't "Remove explicit type" for callable with function initializer
So #KT-12168 Fixed
2018-05-03 17:46:47 +03:00
Toshiaki Kameyama
5204c73bec Quick-fix "use spread operator": make working with mapOf #KT-14556 Fixed 2018-05-03 17:11:33 +03:00
Toshiaki Kameyama
a7110a1517 Add intention to indent a raw string #KT-9943 Fixed 2018-05-03 17:05:14 +03:00
Alexander Udalov
a2d45062c2 Fix another non-determinism in CommonSupertypes 2018-05-03 16:02:49 +02:00
Mikhail Glukhikh
e07f83ddbc "Redundant Unit" inspection: new tests, simplification & fixes
Related to KT-23977 and KT-24066
2018-05-03 16:12:20 +03:00
Toshiaki Kameyama
6e150d27f1 "Redundant Unit" inspection: fix for Unit returned as Any
So #KT-24066 Fixed
2018-05-03 16:12:19 +03:00
Toshiaki Kameyama
c44cab4565 "Redundant Unit" inspection: Fix for labeled return #KT-23977 Fixed 2018-05-03 16:12:19 +03:00
Mikhael Bogdanov
b4853d9293 Minor. Reformat 2018-05-03 12:04:47 +02:00
Mikhael Bogdanov
eefc49a617 Use symbols to find local declarations in codegen 2018-05-03 12:04:45 +02:00
Mikhael Bogdanov
f0e4420259 Don't recreate ir declarations to set body 2018-05-03 12:04:45 +02:00
Mikhael Bogdanov
35df7966cf Use symbols in IrGet/SetValue in JvmSharedVariablesManager 2018-05-03 12:04:32 +02:00
Mikhael Bogdanov
bb6c837f6b Use symbols in IrGet/SetValue in EnumClassLowering 2018-05-03 11:38:52 +02:00
Mikhael Bogdanov
5a2e62dd4f Use symbols in IrGet/SetValue 2018-05-03 11:38:50 +02:00
Mikhael Bogdanov
077f3a4ed2 Minor. Reformat 2018-05-03 11:27:57 +02:00
Mikhael Bogdanov
ed44327569 Properly set parents in JvmLower 2018-05-03 11:23:57 +02:00
Mikhael Bogdanov
e793a7eea7 Use symbols in synthetic accessor to access accessor parameters 2018-05-03 11:23:56 +02:00
Mikhael Bogdanov
92e02e35fc Convert FrameMap to Kotlin and extract base logic 2018-05-03 11:23:56 +02:00
Mikhael Bogdanov
76bab8f3b0 Rename FrameMap.java to FrameMap.kt 2018-05-03 11:23:55 +02:00
Natalia Selezneva
49a1788728 Update testData after switching on kotlin internal mode in tests 2018-05-03 11:32:52 +03:00
Mikhail Zarechenskiy
5815e790ba Minor, use utility to get default type for number type constructor 2018-05-03 11:04:55 +03:00
Mikhail Zarechenskiy
d6405c8147 Fix exception on mapping internal types to UAST types with NI
#EA-119071 Fixed
2018-05-03 11:04:54 +03:00
Ilmir Usmanov
f507a26a12 Generate decomposed lambda params in suspend lambda's local variables
Unlike ordinary lambdas, suspend lambdas do the computation in
doResume(Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object;
method. As you can see, there are no decomposed parameters. As a result,
they used not to be generated.
To fix the issue, I add decomposed parameters to value parameters while
generating local variables table.

In addition, when generating suspend lambda for inline, the codegen
does not take this kind of parameters into account. This is also fixed.

 #KT-18576: Fixed
2018-05-03 10:35:13 +03:00
Alexander Udalov
712a796637 Fix MultiModuleHighlightingTestGenerated.testUseCorrectBuiltInsForCommonModule
Add dependency from a_jvm8 on stdlib. Otherwise, `getEmptyList` from
a_common was resolved to have an error return type
2018-05-02 16:56:54 +02:00
Alexander Udalov
ac4edbba5b Regenerate tests 2018-05-02 16:17:14 +02:00
Alexander Udalov
f59963ef73 Simplify test case on deterministic null-checks 2018-05-02 14:40:15 +02:00
Denis Vnukov
c5373c9029 Ensure deterministic insertion of checkExpressionValueIsNotNull.
Kotlinc source’s file DescriptorUtils.kt demonstarted non-deterministic
insertion of checkExpressionValueIsNotNull for value returned by
CallableDescriptor::getOriginal(). It was difficult to reproduce
this behavior on ф smaller example, but I added a test which was
failing once in 5-10 times while I was testing manually.

I believe this bug is close to KT-23704.

This PR addresses non-determinism to a degree when I can run 120
Compilations with './gradlew dist' and get same classes in all
jars in 'dist'.

NOTE that thew fact that insertion of checkExpressionValueIsNotNull may
depend on order of the types seems suspicios. This CL only addresses
non-determinism part, but I believe it’s worth looking into this more
from semantics point of view.
2018-05-02 14:36:04 +02:00
Alexander Udalov
10da41b136 Regenerate tests 2018-04-30 18:51:28 +02:00
Alexander Udalov
c63cd430d1 Fix no-arg constructor generation for actual class 2018-04-30 15:26:50 +02:00
Alexander Udalov
adb15d2d1a Do not report JvmOverloads warning on actual function with expected defaults
#KT-23910
2018-04-30 15:26:50 +02:00
Alexander Udalov
056c41bc00 Minor, improve kdoc of default args utilities in ArgumentsUtils.kt 2018-04-30 15:26:50 +02:00
Alexander Udalov
a8488cf298 Fix JvmOverloads generation for actual methods
`countDefaultParameters` uses `hasDefaultValue` to compute the number of
parameters which have default values, which handles actual parameters
(who have default values in the expected declaration) correctly. Thus,
`getRemainingParameters` should use it as well to determine the list of
parameters to be skipped in each generated overload

 #KT-23910 Fixed
2018-04-30 15:26:50 +02:00
Alexander Udalov
516e7df4b7 Reformat DefaultParameterValueSubstitutor, fix inspections 2018-04-30 15:26:49 +02:00
Nicolay Mitropolsky
efd743284e CommonIntentionActionsTest.testRemoveConstructorParameters test fix for 181, 182, as32 2018-04-29 11:48:28 +03:00
Nikolay Krasko
398795b832 Fix AddRequireModuleTest in 181
- Application is null before setUp call in individual run
- Inline "module.info.add.requires.family.name" as 181 has other constant
- isScriptDependenciesUpdaterDisabled call seems to be useless
2018-04-28 22:27:35 +03:00
Nikolay Krasko
af930b8364 Review and fix raw string quotes inserting and remove (KT-2582)
- Add more tests
 - Fix inserting close quotes after multiline string in file end
 - Use parent instead of parentOfType where possible
 - Add bunch files

 #KT-2582 Fixed
2018-04-28 22:27:34 +03:00
Steven Spungin
8252b35ed5 Add support for closing and deleting raw strings (KT-2582)
#KT-2582 Fixed
2018-04-28 22:27:34 +03:00
Nikolay Krasko
5216dfcc59 Add internal errors to test data in multi module tests
Tests started to fail after 82a21b3955.
2018-04-28 22:24:39 +03:00
Ilya Gorbunov
2c9c6eb746 Reformat stdlib: new coroutines 2018-04-28 18:58:56 +03:00
Mikhail Glukhikh
2854e6b7a1 Reformat: BranchedFoldingUtils 2018-04-28 18:44:29 +03:00
Toshiaki Kameyama
89981ecbbb Lift Assignment: process lambda assignments in when correctly
So #KT-23346 Fixed
2018-04-28 18:44:29 +03:00
Ilya Gorbunov
7438d12ad7 Move builtins generators to their own source set
Make them depend on bootstrap stdlib.
This is to prevent recompiling the entire project when we need just to
generate builtins sources.
2018-04-28 17:38:13 +03:00
Ilya Gorbunov
a704a1b6d0 Allow to create new sourcesets with our helper
New sourceSet is created if it doesn't exist, instead of being silently ignored.
Fix receiver of `none()`: it was applied on sourceSetName rather than on the sourceSet,
therefore it was a no-operation.
2018-04-28 17:35:30 +03:00
Denis Zharkov
8e1b0c5ab7 Optimize memory footprint for PartialBodyResolveFilter
There is a single PartialBodyResolveFilter instance per module
and each of them were containing just the same sets of available
in project Nothing-typed functions (including duplicating String instances),
in case of Kotlin project it might sum up to 27M of heap.

The solution is to share the global sets between all modules in a project
2018-04-28 17:12:52 +03:00
Denis Zharkov
26714d56d8 Use WeakKeySoftValueMap in ResolveElementCache
Otherwise results are effectively retained in the maps until we're close
to OutOfMemory.
While we mostly need them for a short time (especially in the case we
run resolution during usages search).

The possible problem is that the values may become too short-living,
but now using these maps is a conventional solution for similar tasks in
Java resolve
2018-04-28 17:12:52 +03:00
Denis Zharkov
96ab705de1 Use PsiField::computeConstantValue to avoid building AST 2018-04-28 17:12:52 +03:00
Denis Zharkov
bb45959470 Avoid switching to AST in CodegenAnnotatingVisitor for light classes 2018-04-28 17:12:52 +03:00
Denis Zharkov
2a713a972d Postpone computing AST when it's used only for reporting 2018-04-28 17:12:52 +03:00
Denis Zharkov
0788afe92c Avoid computing AST for IdentifierChecker
Basically, it's unnecessary to check anything when analysing stubs,
but it's complicated now to avoid that, so we just postpone
computing AST until reporting happens
2018-04-28 17:12:52 +03:00
Mikhail Glukhikh
6e8247f7cf Fix leaking this test in 181 branch 2018-04-28 15:46:37 +03:00
Roman Artemev
d9fdddceb9 Update test data 2018-04-27 20:02:59 +03:00
Roman Artemev
8bc80a9829 Fix secondary constructor lowering 2018-04-27 20:02:57 +03:00
Roman Artemev
8721990a7f Implement access to members of super class 2018-04-27 20:02:56 +03:00
Roman Artemev
cf31e544eb Implement default interface members 2018-04-27 20:01:45 +03:00
Roman Artemev
d861fb498f Implement string plus operator 2018-04-27 20:00:41 +03:00
Roman Artemev
01fea13467 Fix name clashing between local variables 2018-04-27 20:00:41 +03:00
Roman Artemev
997328f584 Refactoring and fixes 2018-04-27 20:00:40 +03:00
Roman Artemev
deab0a017b Add support for inner clases 2018-04-27 20:00:40 +03:00
Roman Artemev
746eb4b93e Implement object class in JS BE 2018-04-27 20:00:39 +03:00
Roman Artemev
17ee38a0b7 Refactor secondary constructor lowering using new builders 2018-04-27 20:00:38 +03:00
Roman Artemev
752cbf2714 Implemented KFunction interface 2018-04-27 20:00:32 +03:00
Roman Artemev
09c54f1da3 Add symbol & IR builders to JS backend 2018-04-27 19:53:47 +03:00
Roman Artemev
c1a4aeb67f Lift InnerClassesLowering from JVM to common since it is used by every backend in the same way 2018-04-27 19:53:47 +03:00
Roman Artemev
ed0c26ef07 Implement function literals in JS BE 2018-04-27 19:53:47 +03:00
Nikolay Krasko
c83ff5e75f Remove files introduced in 181 from 173 branch 2018-04-27 19:45:23 +03:00
Nikolay Krasko
6683e07112 181: [Tests] Revert "Allow different diagnostics in Javac tests - workaround for IDEA-184289"
It is fixed in 181
2018-04-27 18:29:57 +03:00
Vyacheslav Gerasimov
c16a5c2538 Switch .bunch file to 181 2018-04-27 18:25:23 +03:00
Vyacheslav Gerasimov
8c88ac69df Cleanup .181 bunch files 2018-04-27 18:25:21 +03:00
Vyacheslav Gerasimov
bc403ce744 Switch to 181 platform 2018-04-27 18:25:17 +03:00
Mikhail Glukhikh
df59af8ee8 Move sort modifiers test to inspection local group
This should fix test in 181 branch
2018-04-27 17:26:56 +03:00
Mikhail Glukhikh
8f0c53d0de If then to elvis: handle nullability even with implicit receiver
So #KT-22741 Fixed
2018-04-27 17:26:50 +03:00
Mikhail Glukhikh
49165bdbef Cleanup: better visibility 2018-04-27 17:26:37 +03:00
Mikhail Glukhikh
7601aaf89f Reformat IfThenToElvisIntention 2018-04-27 17:26:36 +03:00
Denis Zharkov
b75024e3e0 Fix memory leak related to diagnostics computation within light classes
Before this change, when somebody has requested the exact light class
we also store LazyJvmDiagnostic for it in a map inside DiagnosticHolder.

The problem is that LazyJvmDiagnostic retains a lot of memory:
GenerationState, bindingContext, etc.

At the same time, it commonly happens that light classes are being computed from Java resolve and diagnostics are obviously
unnecessary there.

The solution has two parts:
1. We don't retain diagnostics until somebody explicitly requested them
2. We force computation of LazyJvmDiagnostic to avoid retaining
backend's parts

The solution has a kind of drawback: for an opened in editor Kotlin file,
we'll run back-end twice for contained classes (analysis parts should be reused, though)

 #KT-24048 Fixed
2018-04-27 16:13:59 +03:00
Natalia Selezneva
26f1d6ae7c Update Icon for .kts and .gradle.kts files
^KT-23431 Fixed
2018-04-27 13:52:31 +03:00
Natalia Selezneva
9107ef6490 New Script File Action
^KT-10935 Fixed
2018-04-27 13:52:26 +03:00
Natalia Selezneva
1d8d1e847a Minor: add debug name for ErrorGradleScriptDefinition 2018-04-27 13:52:22 +03:00
Natalia Selezneva
ec63efec3c Debugger: refactor list of breakpoints for the line with lambdas.
^KT-24136 Fixed

Rename main line breakpoint to "Line"
Change icon for lambda-breakpoint
Move "all breakpoint" to the end of the breakpoints list
2018-04-27 13:52:06 +03:00
Nikolay Krasko
8bce29df3a Show plugin installation status in Kotlin Updates settings (KT-23980)
#KT-23980 Fixed
2018-04-27 13:08:28 +03:00
Nikolay Krasko
bf82da7584 Perform auto-check initial and checks after switching channels (KT-23980)
#KT-23980 Fixed
2018-04-27 12:16:37 +03:00
Nikolay Krasko
64845ac3b7 Better UI for configure plugin updates (KT-23980)
- Control with Alt + Letter
 - Don't stretch channel combobox
 - Focus on label selection

 #KT-23980 Fixed
2018-04-27 12:16:37 +03:00
Nikolay Krasko
748e213598 Move Kotlin update channel setting to settings dialog (KT-23980)
#KT-23980 Fixed
2018-04-27 12:16:37 +03:00
Nikolay Krasko
144c41576e Refactoring: inline KotlinInternalMode.enabled 2018-04-27 12:16:37 +03:00
Nikolay Krasko
82a21b3955 Move Kotlin internal actions to Internal menu and unify modes (KT-23975)
#KT-23975 Fixed
2018-04-27 12:16:36 +03:00
Ilya Chernikov
5af490f5e5 Remove script discovery files from example projects to avoid discovery problems:
- exception during loading of the definition with maven dependencies
- shading of the gradle script definition (if not fixed by the previous commit)

The discovery files should be restored after fixing/rewriting the discovery
and implementing definition prioritization in IDEA plugin
2018-04-27 09:03:15 +02:00
Ilya Chernikov
51888154e1 Change custom script examples file extensions:
fixes shadowing of the gradle script definitions after these example
script defs are loaded via discovery mechanisms
2018-04-27 09:03:15 +02:00
Ilya Gorbunov
ecf0d7ec0d Reformat stdlib tests and samples
#KT-5558
2018-04-27 05:28:57 +03:00
Ilya Gorbunov
add09e0f2e Reformat stdlib: js part
#KT-5558
2018-04-27 05:28:48 +03:00
Ilya Gorbunov
e3883d8d6d Reformat stdlib: jvm part
#KT-5558
2018-04-27 05:28:38 +03:00
Ilya Gorbunov
c53a2d57c3 Reformat stdlib: common code
#KT-5558
2018-04-27 00:50:16 +03:00
Ilya Gorbunov
ad43c0f4cb Reformat stdlib: collections
#KT-5558
2018-04-27 00:49:06 +03:00
Ilya Gorbunov
bea94d1d59 Update line numbers of inlined stdlib functions after updating copyright
This should not be needed, see KT-23862
2018-04-26 21:57:50 +03:00
Ilya Gorbunov
3354d44fce Fix false positives in CodeConformanceTest on identifiers like readCopyright 2018-04-26 21:57:50 +03:00
Ilya Gorbunov
ffc975550f Add/update copyrights in kotlin-stdlib-gen 2018-04-26 21:57:50 +03:00
Ilya Gorbunov
2e12834b6a Update copyrights in kotlin.test library
Change line number in StackTraceJVMTest due to the added copyright
2018-04-26 21:57:50 +03:00
Ilya Gorbunov
d3156c33be Update copyrights in builtin sources
Read copyright template from .idea/copyright/apache.xml profile
2018-04-26 21:57:50 +03:00
Ilya Gorbunov
502418e690 Put copyrights to the generated standard library sources
Read copyright template from .idea/copyright/apache.xml profile
2018-04-26 21:57:50 +03:00
Ilya Gorbunov
e21c235bbb Add or update copyrights in the standard library sources 2018-04-26 21:57:50 +03:00
Ilya Gorbunov
40cd02bba6 idl2k: read copyright from profile and put it in the generated files
Also reword autogenerated warning a bit.
2018-04-26 21:57:50 +03:00
Nicolay Mitropolsky
8e91f31182 UnimplementedKotlinInterfaceMemberAnnotator: use modifier list to be compatible with 172 2018-04-26 20:40:26 +03:00
Vyacheslav Gerasimov
72c9dc7d35 Build: Remove buildSrc/intellij-sdk/build.gradle.kts.182 2018-04-26 19:33:01 +03:00
Nicolay Mitropolsky
e8af8edf87 AnnotationUtil.kt.172 removed (should be equal to master) 2018-04-26 19:29:18 +03:00
Simon Ogorodnik
9e6cf5708e Fix J2K plain-text copy conversion test in 181 2018-04-26 17:37:29 +03:00
Mikhael Bogdanov
ec0b9aa343 Skip @JvmDefault in UnimplementedKotlinInterfaceMemberAnnotator
#KT-23967 Fixed
2018-04-26 15:36:42 +02:00
Mikhael Bogdanov
5efc9f2257 Revert "Get rid of 'BRIDGE' flag on $default functions"
Removed bridge flag triggers problem with Spring Boot: KT-23973
 This reverts commit cdcb651

 #KT-23973 Fixed
2018-04-26 15:36:42 +02:00
Pavel V. Talanov
a4e327c137 Mpp: KT-23457, fix importing common classes into common modules
Add test for KT-23457
NOTE: fixes 'importClassInCommon' test
Other test cases added to increase coverage

 #KT-23457 Fixed
2018-04-26 15:33:51 +02:00
Pavel V. Talanov
64a28dd542 QuickFixMultiModuleTest: fix test code
Adjust test data
2018-04-26 15:33:48 +02:00
Vyacheslav Gerasimov
c10c5a44d1 Remove exclusions from kotlin-stdlib dependency of published artifacts
Log warning about it, this is probably a project configuration bug and should be checked.
2018-04-26 16:11:56 +03:00
Denis Zharkov
003f381fcd Replace default-type dependencies to :kotlin-stdlib with distJar
Use distJar configuration instead.
It's necessary because currently when using default-type, subproject
starts having a transitive dependency to :kotlin-stdlib-common
and that leads to exception from KT-20897 when building light classes

This change might be reverted once KT-23942 is fixed

 #KT-23942 Submitted
2018-04-26 16:11:27 +03:00
Mikhael Bogdanov
655b737a1e Don't use descriptors for static check 2018-04-26 14:28:14 +02:00
Mikhael Bogdanov
096c9e440b Initialize parameters in irFunctions 2018-04-26 14:28:13 +02:00
Mikhael Bogdanov
ec4ff2f2b5 Minor. Reformat 2018-04-26 14:28:13 +02:00
Mikhael Bogdanov
6ca55bafdf Properly inline default methods 2018-04-26 14:28:12 +02:00
Mikhael Bogdanov
97ad3f9ddd Generate $default functions for inline ones in JVM-backend 2018-04-26 14:28:11 +02:00
Mikhael Bogdanov
e6c88755e9 Minor. Code clean 2018-04-26 14:28:10 +02:00
Mikhael Bogdanov
a8dacccdd3 Minor. Reformat 2018-04-26 14:28:09 +02:00
Ilya Gorbunov
579822c114 Regenerate w3c declarations to get new MDN references 2018-04-26 14:09:05 +03:00
Zalim Bashorov
5c40892c57 [JS IR BE] Right support for inc and dec on primitive numbers 2018-04-26 13:46:50 +03:00
Zalim Bashorov
6725f085c7 [JS IR BE] Deprecate Name.toJsName and remove dummyScope 2018-04-25 22:21:25 +03:00
Zalim Bashorov
27988cd2f4 Remove the version of fail.kt that was "hacked" for JS IR BE tests 2018-04-25 22:21:22 +03:00
Zalim Bashorov
34587d9192 [JS IR BE] unmute tests 2018-04-25 22:20:43 +03:00
Zalim Bashorov
a6f4594679 [JS IR BE] Intrinsicify kotlin.js.js 2018-04-25 22:20:41 +03:00
Zalim Bashorov
8d89a93c44 [IR JS BE] Add core.kt to list of compiling files for JS IR BE tests 2018-04-25 22:18:58 +03:00
Zalim Bashorov
9c25b21510 Minor: remove useless comments from JsIrBackendContext 2018-04-25 22:18:57 +03:00
Zalim Bashorov
8871cf660c [stdlib-js] Split core.kt in stdlib-js into few files to simplify using part of it in JS IR BE related tests 2018-04-25 22:18:57 +03:00
Jim S
cebee7b5e1 Add context to generateSynthetic* in SyntheticResolveExtension 2018-04-25 20:18:10 +03:00
Jim S
d63a2462ef Eliminate duplicate call to genSyntheticClassOrObject
As far as I can tell (and admittedly I'm not an expert in the Kotlin compiler code), it looks like the new logic iterates over all contributed descriptors, which renders the old logic (which explicitly invokes getCompanionObjectDescriptor) obsolete.  We ran into this last year when rebasing on top of 527ccaff16 and - after a quick conversation with @sandwwraith (email chain dated December 12, 2017) - we unblocked ourselves by deleting the old code from our local repository.  Now we're looking to upstream our changes, thus this PR.

Old code:
```
         // Generate synthetic (non-declared) companion if needed
         ClassDescriptor companionObjectDescriptor = descriptor.getCompanionObjectDescriptor();
         if (companionObjectDescriptor instanceof SyntheticClassOrObjectDescriptor) {
             genSyntheticClassOrObject((SyntheticClassOrObjectDescriptor) companionObjectDescriptor);
         }
```

New code:
```
        // Generate synthetic nested classes
        Collection<DeclarationDescriptor> classifiers = descriptor
                .getUnsubstitutedMemberScope()
                .getContributedDescriptors(DescriptorKindFilter.CLASSIFIERS, MemberScope.Companion.getALL_NAME_FILTER());
        for (DeclarationDescriptor memberDescriptor : classifiers) {
            if (memberDescriptor instanceof SyntheticClassOrObjectDescriptor) {
                genSyntheticClassOrObject((SyntheticClassOrObjectDescriptor) memberDescriptor);
            }
        }
```

Change-Id: Icb51ee6e56b9928108cc121c78fa50c6354a4b31
2018-04-25 20:18:08 +03:00
Sergey Igushkin
1596d7b636 Stop removing JavaCompile tasks from project.tasks in common modules
When the JavaCompile tasks were removed from a common project, some of
the dependencies on them remained. This could lead to an error during
dependencies resolution, such as the one in KT-23092. To an even greater
confusion, the remaining dependencies anyway led to the task being
added to the task graph.

Issue #KT-23092 Fixed
2018-04-25 19:49:19 +03:00
Sergey Igushkin
2b41a0d30e Use archivesBaseName for module names in MPP common modules as well.
Issue #KT-23574 Fixed
2018-04-25 19:43:58 +03:00
Ilmir Usmanov
4396b4259e Minor: Fix compilation of android tests 2018-04-25 19:15:16 +03:00
Alexey Tsvetkov
1778cc6a39 Fix incremental compilation with Java 9+
#KT-23901 fixed
2018-04-25 16:05:48 +03:00
Ilmir Usmanov
31a8f1ce9d Minor: Add missing method in 172 patchset 2018-04-24 21:48:57 +03:00
Nikolay Krasko
ac97075020 Check only one class in JS decompiler tests to reuse test data
JVM tests check only single class result, in order to reuse test data
JS tests should do the same. CHECK_PACKAGE is introduced to override
this behaviour explicitly.
2018-04-24 18:51:27 +03:00
Ilmir Usmanov
ce40c3fb21 Take coroutinesPackage into account in bunch files
#KT-23362
2018-04-24 18:14:04 +03:00
Raluca Sauciuc
258cba2cf8 More fixes for Android Studio 3.2 compatibility 2018-04-24 16:46:33 +03:00
Mikaël Peltier
76cd20c574 KT-23721 Emit an error when 'tools.jar' is not into plugin classpath
- Since warnings are discarded when there are others errors, replace the
current warning by an error to always display the message and inform the
user that its annotation processor is badly configured.

Fix of https://youtrack.jetbrains.com/issue/KT-23721
2018-04-24 16:10:03 +03:00
Mikhail Zarechenskiy
d2d92a2153 [NI] Fix exception, don't try to get parent on root fqName
#EA-119579 Fixed
2018-04-24 15:22:29 +03:00
Roman Artemev
61e051cafa Update test data 2018-04-24 14:04:16 +03:00
Roman Artemev
ec57a335f7 Temporally hacked js assert to make depending tests work 2018-04-24 13:52:16 +03:00
Nicolay Mitropolsky
efdc5701d9 Uast: removing SimpleKotlinRenderLogTest.kt.181 2018-04-24 12:35:26 +03:00
Toshiaki Kameyama
e58d9c5507 Add intention for converting to block comment and vise versa
So #KT-23137 Fixed
2018-04-24 11:57:56 +03:00
Mikhail Glukhikh
3351b00870 SimpleKotlinRenderLogTest: delete identical branch file (AS32) 2018-04-24 10:31:59 +03:00
Mikhail Glukhikh
f9858bf597 SimpleKotlinRenderLogTest: add (forgotten) changes into branches 2018-04-24 10:30:10 +03:00
Ilmir Usmanov
39f4a449ad Remove JvmVersion from kotlin-stdlib-coroutines 2018-04-23 22:20:41 +03:00
Ilmir Usmanov
9cad474f5a Update bootstrap compiler to latest green 2018-04-23 21:52:01 +03:00
Ilmir Usmanov
3cceb13d04 Update inliner test after changing bootstrap compiler 2018-04-23 21:52:00 +03:00
Ilmir Usmanov
f60787d57c Move coroutines to kotlin.coroutines package: tests
Introduce COMMON_COROUTINES_TEST directive.
Every test with this directive is run twice: one time with
language version 1.2 and kotlin.coroutines.experimental package
and the other time with language version 1.3 and kotlin.coroutines
package. Each run is a separate method: with suffixes _1_2 and _1_3
respectively.
However, since codegen of release coroutines is not supported in JS
backend, we generate only one method: with suffix _1_2.
 #KT-23362
2018-04-23 21:51:59 +03:00
Ilmir Usmanov
30ab1e2b35 Move coroutines to kotlin.coroutines package: stdlib
Copy everything from kotlin.coroutines.experimental to
kotlin.coroutines. The latter is separate source set to be packed into
separate kotlin-stdlib-coroutines.jar
 #KT-23362
2018-04-23 21:51:58 +03:00
Nicolay Mitropolsky
ebdee1f24c 182: JvmDeclarationSearcher-implementation for Kotlin based on light-classes
#KT-23764
2018-04-23 21:37:58 +03:00
Mikaël Peltier
b1ef670818 KT-23931 Avoid infinite loop into RedundantGotoMethodTransformer
- Follow-up of 9fb0f59813 to avoid
infinite loop during redundant goto otpimization.

Fix of https://youtrack.jetbrains.com/issue/KT-23931
2018-04-23 20:25:43 +03:00
Pavel V. Talanov
7daf44a806 Fix bunch files after mpp changes 2018-04-23 18:56:36 +02:00
Alexander Udalov
3ce9c03249 Minor, ignore build directories when checking copyrights 2018-04-23 18:42:33 +02:00
Alexander Udalov
dfd76502ab Minor, move serializeToByteArray to module 'metadata.jvm' 2018-04-23 18:42:33 +02:00
Alexander Udalov
52a9cc06e0 Remove StringTable.serializeTo, add JvmProtoBufUtil.writeData
StringTable.serializeTo was effectively only used for JvmStringTable,
but was declared in StringTable because of the usage in
DescriptorSerializer.serialize (which, in turn, was only used from JVM
codegen)
2018-04-23 18:42:33 +02:00
Alexander Udalov
58b7643065 Render .kjsm files in incremental tests
Otherwise they, being binary files, are displayed as text, which is
unreadable
2018-04-23 18:42:33 +02:00
Alexander Udalov
965e3ebab2 Do not serialize SOURCE-retained annotations
Also, fix the value of "hasAnnotations" flag to reflect if there are any
_non-source_ annotations on a declaration.

Unfortunately, after this change
IncrementalJsCompilerRunnerTestGenerated$PureKotlin.testAnnotations
starts to fail because of the following problem. The problem is that
annotations on property accessors are not serialized yet on JS (see
KT-14529), yet property proto message has setterFlags field which has
the hasAnnotations flag. Upon the full rebuild of the code in that test,
we correctly write hasAnnotations = true, but annotations themselves are
not serialized. After an incremental build, we deserialize property
setter descriptor, observe its Annotations object which happens to be an
instance of NonEmptyDeserializedAnnotationsWithPossibleTargets. Now,
because annotations itself are not serialized, that Annotations object
has no annotations, yet its isEmpty always returns false (see the code).
Everything worked correctly before the change because in
DescriptorSerializer.hasAnnotations, we used Annotations.isEmpty and the
result was the same in the full rebuild and in the incremental scenario.
But now we're actually loading annotations, to determine their
retention, and that's why the setterFlags are becoming different here
and the test fails

 #KT-23360 Fixed
2018-04-23 18:42:33 +02:00
Alexander Udalov
7bac9b62c7 Reformat VersionRequirement and move to 'metadata' 2018-04-23 18:42:33 +02:00
Alexander Udalov
361f686124 Move ModuleMapping and BinaryModuleData to metadata.jvm 2018-04-23 18:42:32 +02:00
Alexander Udalov
d0544a148a Minimize dependencies of ModuleMapping
Prepare it to be moved to metadata.jvm
2018-04-23 18:42:32 +02:00
Ilya Gorbunov
6b800c4230 Remove conditional-preprocessor compiler module 2018-04-23 19:05:13 +03:00
Ilya Gorbunov
2c74b91de4 Remove JvmVersion annotation and its usages 2018-04-23 19:05:13 +03:00
Dmitry Petrov
1eca402332 Use correctElementType to determine array element type for withIndex
Rather unkind "gotcha" in ASM API.

 #KT-23900 Fixed Target versions 1.2.50
2018-04-23 18:00:12 +03:00
Nikolay Krasko
5817a7fdac Prevent endless processing of problem pending events
If some pending event processing caused exception in PerModulePackageCacheService,
log the problem and consider event processed. Otherwise it is going to
be stuck there forever.
2018-04-23 16:41:14 +03:00
Nikolay Krasko
00119c309c Don't call findChild on invalid file in ImplicitPackagePrefixCache 2018-04-23 16:41:14 +03:00
Nikolay Krasko
3f6022d74e Don't show several lambda return inlay hints for elvis (KT-22436)
Don't show inlay hints on binary expression operands

 #KT-22436
2018-04-23 16:41:14 +03:00
Nikolay Krasko
2a7f195bbc Fix FoldingAfterOptimizeImportsTest for case-sensitive file systems
Broken in b6699d7522
2018-04-23 16:41:13 +03:00
Nikolay Krasko
d085f3e474 Don't call elementAtCaret for file usage test (fix for 181)
Fix testPropertyFileUsages test in 181.

Starting from 181, call `elementAtCaret` with zero offset returns
null element, when file starts with comment. Test fails because
of that.

fdebc4084b
2018-04-23 16:41:13 +03:00
Nikolay Krasko
ffca06d8a8 Drop specific behaviour in AbstractFindUsagesTest.kt for 172
It's OK to run find usages test under progress manager.
2018-04-23 16:41:13 +03:00
Nikolay Krasko
c6f8c868ce Minor: remove unused FIND_FILE_USAGES directive 2018-04-23 16:41:13 +03:00
Alexey Tsvetkov
2b4aa74c0b Add test cases for FQ-name parsing in IC 2018-04-23 15:03:42 +03:00
Leonid Startsev
01b40d4d02 Review fixes:
Use `StorageManager.createLazyValue` instead of default lazy delegate
Introduce `initialize` method instead of exposing type parameters
2018-04-23 14:39:17 +03:00
Leonid Startsev
666553e413 Add correct type parameter information to synthetic declarations
Needed by kapt due to https://github.com/Kotlin/kotlinx.serialization/issues/76
2018-04-23 14:39:17 +03:00
Alexey Tsvetkov
adc3e61742 Make assertion message more readable in JPS test
The test was failing recently on CI, but assertion message
does not give enough info: arrays' sizes are not equal,
so there were extra warnings, but what they were?
2018-04-22 23:05:59 +03:00
Nicolay Mitropolsky
06e65e5f48 182: removing Spring from Kotlin-Ultimate
because all necessary functionality is already in IDEA-Ultimate
2018-04-21 11:25:49 +03:00
Mikhail Glukhikh
00a9dea7cb KotlinAbstractUElement+KotlinUElementWithComments(172): add imports 2018-04-21 11:04:13 +03:00
Ilya Gorbunov
c239d346f7 Correctly indent upper bound separator in the generated stdlib code 2018-04-20 23:14:57 +03:00
Ilya Gorbunov
5381d0ed58 Move sequence operation classification higher than sample
Otherwise it gets eaten by that @sample tag.
2018-04-20 22:40:35 +03:00
Ilya Gorbunov
908d2d6975 Introduce kotlin-stdlib-generator dsl block for specifying sample reference 2018-04-20 22:40:35 +03:00
Mikhail Glukhikh
5dd7ff4d7f Up KotlinAbstractUElement / UElementWithComments / UVariable in branches 2018-04-20 21:29:55 +03:00
Mikhail Glukhikh
3e1d05f146 Update KotlinUMethod for 172/181/as32 branches 2018-04-20 21:23:05 +03:00
Pavel V. Talanov
521357a22d Add tests for KT-20824, KT-23745, KT-23124, KT-20605, KT-23760
#KT-20824 Fixed
 #KT-23745 Fixed
 #KT-23124 Fixed
 #KT-20605 Fixed
 #KT-23760 Fixed
2018-04-20 20:00:12 +02:00
Pavel V. Talanov
94fe170b7b MPP: analyze platform sources with expectedBy common sources
This allows to emulate current compiler behaviour

Introduce CombinedModuleInfo which is a combination of several other modules intended to be analyzed together
2018-04-20 20:00:11 +02:00
Pavel V. Talanov
94dfcba5c5 Minor: adjust quick fix test data to avoid "conflicting overloads" 2018-04-20 20:00:07 +02:00
Pavel V. Talanov
3949fc70c9 Adjust test data for previously ignored tests 2018-04-20 20:00:05 +02:00
Pavel V. Talanov
5ddb7c71d1 Mpp resolve: fix actual/expect declaration lookup
Previously we would look fo expect declaration in common dependencies
    as opposed to looking inside the module exclusively
2018-04-20 20:00:04 +02:00
Pavel V. Talanov
cdb49511e6 Mpp highlighting test: make generated, adjust test data
Note: this spawns new test cases which were ignored previously
2018-04-20 20:00:02 +02:00
Pavel V. Talanov
5a85f2437d Mpp test utils: allow to setup dependencies on stdlib and fulljdk
Allow to specify jjvm8 as platform
2018-04-20 20:00:00 +02:00
Mikhail Glukhikh
c69dd98c86 Build fix: quick-fix tests (forgotten actions) 2018-04-20 20:55:27 +03:00
Mikhail Glukhikh
a25e971d19 UAST: property delegates consistency #KT-22527 Fixed 2018-04-20 20:39:56 +03:00
Mikhail Glukhikh
f179b2ba13 Test for KT-22527 2018-04-20 20:39:54 +03:00
Mikhail Glukhikh
29c16f9561 Improve KotlinUElementWithComments & use it in most KotlinUElements
Related to KT-22135
2018-04-20 20:39:45 +03:00
J.T. Gilkeson
7a538accff Fix problem with trimEnd wiping out spans in SpannableStringBuilder
If I pass in a CharSequence with different spans, the original trimEnd using substring incorrectly wiped out the spans.
changing to subSequence correctly preserves the span data

#KT-23920 Fixed
2018-04-20 18:04:13 +03:00
Alexey Sedunov
36975786e8 Gradle: Import project dependency with non-default configuration by its artifacts 2018-04-20 16:57:43 +03:00
Dmitry Jemerov
2a684684a5 Pass canChangeWhitespaceOnly flag in reformat inspection
Otherwise IDEA will run preformat and postformat processors, which don't
expect to run outside of EDT (IDEA-185991)
2018-04-20 15:38:35 +02:00
Alexey Sedunov
38808118b1 Misc: Update test data for MavenUpdateConfigurationQuickFixTest (181/182) 2018-04-20 16:19:25 +03:00
Dmitry Petrov
54cf11fd0a Skip empty string entries when generating string template expression
#KT-19738 Fixed Target versions 1.2.50
2018-04-20 14:52:14 +03:00
Dmitry Petrov
22c2d8b563 Introduce a separate StackValue class for lateinit local vars
Local lateinit var differs in behavior from a simple local var,
and logic that relies of 'instanceof Local' checks assuming that all
instances of Local are simple local vars can produce faulty code
(as in KT-23260, where a local lateinit var was not explicitly put on
stack when passed as an argument to an inline function, thus causing
null propagation).

 #KT-23260 Fixed Target versions 1.2.50
2018-04-20 14:51:34 +03:00
Dmitry Petrov
7be4f5d31f Minor: reformat code in InlineCodegen 2018-04-20 14:51:34 +03:00
Nikolay Krasko
c86e157a48 Fix KotlinFileStructureTestGenerated in 181
Use common code for 173 and 181.
2018-04-20 14:37:02 +03:00
Nikolay Krasko
846a1a0179 Remove deprecated marker for JVM debugging in Kotlin code (KT-23886)
#KT-23886 Fixed
2018-04-20 14:37:01 +03:00
Nikolay Krasko
b6699d7522 Postpone analyze and remove direct working with BindingContext in folding
#KT-5206 Fixed
2018-04-20 14:37:01 +03:00
Aaron Nwabuoku
3a83983bfc Support code folding for standard library collection factory functions (KT-5206)
#KT-5206 Fixed
2018-04-20 14:37:01 +03:00
Mikhail Glukhikh
c4cdc0543d KT-23266 (forgotten change): modify plugin.xml for all branches 2018-04-20 13:17:06 +03:00
Mikhail Zarechenskiy
4f3fde2334 Regenerate tests 2018-04-20 13:06:22 +03:00
Mikhail Zarechenskiy
4a1c63cbbd [NI] Rename: isVariableReceiverForInvoke -> isForImplicitInvoke 2018-04-20 13:06:21 +03:00
Mikhail Zarechenskiy
397cc4f772 [NI] Support implicit invoke calls on parenthesized receivers 2018-04-20 13:06:21 +03:00
Mikhail Zarechenskiy
1e7682afc0 Minor, rename property according to the style 2018-04-20 13:06:20 +03:00
Mikhail Zarechenskiy
f039ec3625 Refactoring: get rid KotlinCallKind inside ResolutionKind 2018-04-20 13:06:20 +03:00
Alexey Sedunov
898105a5fa [REVERT/172] Test Support: Implement proper detection of existing TestNG configurations 2018-04-20 12:57:36 +03:00
Vyacheslav Gerasimov
0c6fb77637 Build: Set dependency on :dist for js.tests project test tasks 2018-04-20 11:35:55 +03:00
Vyacheslav Gerasimov
09a347b2d4 Disable assertion in RecompilableScriptFunctionData for js tests
which fails due to a bug in nashorn

 #KT-23637 Fixed
2018-04-20 11:35:42 +03:00
Ilya Gorbunov
481620ba32 Suppress dokka warnings for external classes exposing JS API to Kotlin
Usually MDN link in the class description is enough.
2018-04-20 06:39:01 +03:00
Swapnil Sankla
b93e385181 Add sample for setOf method
Ilya Gorbunov: Improve sample to illustrate stable iteration order and set equality.
2018-04-20 06:03:05 +03:00
Ilya Gorbunov
c5aed06110 Clarify docs for downTo and until 2018-04-20 05:25:31 +03:00
Ilya Gorbunov
501d969a38 Improve docs wording of zip function 2018-04-20 02:44:48 +03:00
Ilya Gorbunov
0eae27e03f Add samples for zip on sequences and strings 2018-04-20 02:00:36 +03:00
TakuyaKodama
2d4e591b5d Add samples for zip on arrays and collections
Write the sample references in the template and run the generator
2018-04-20 02:00:36 +03:00
Alexey Tsvetkov
137698d967 Minor: move BuildTimeReporter from buildSrc to report.gradle.kts 2018-04-19 21:03:32 +03:00
Ilya Gorbunov
b1f6ba703d Remove obsolete ant build scripts 2018-04-19 20:46:15 +03:00
Alexey Sedunov
48984fb3bf Maven: Support "javaParameters" tag in Kotlin/JVM configurations (181) 2018-04-19 19:11:54 +03:00
Alexey Sedunov
4819fc337d Misc: Fix dialog text for CallableRefactoring implementations
#KT-23778 Fixed
2018-04-19 19:06:48 +03:00
Alexey Sedunov
f69a807ae6 Change Signature: Fix original method info for Java method used in Kotlin
#KT-23714 Fixed
2018-04-19 19:06:48 +03:00
Alexey Sedunov
53a4baac8b Safe Delete: Do not replace SafeDeleteOverrideAnnotation for Java methods
#KT-23613 Fixed
2018-04-19 19:06:48 +03:00
Alexey Sedunov
4938825e19 Test Support: Implement proper detection of existing TestNG configurations
#KT-8407 Fixed
2018-04-19 19:06:48 +03:00
Alexey Sedunov
3b5227d6ea Maven: Support "javaParameters" tag in Kotlin/JVM configurations
#KT-23845 Fixed
2018-04-19 19:06:47 +03:00
Alexey Tsvetkov
7606cfd84f Print short build time summary after build 2018-04-19 18:23:10 +03:00
Claus Holst
84f0b327b1 KT-17608 Kotlin plugin says missing apply() call for SharedPreferences.Editor in With expression (#1164) 2018-04-19 16:29:27 +03:00
Alexey Sedunov
0f588955a9 Misc: Fix test data after updating to IDEA 181.3870.7 2018-04-19 15:27:56 +03:00
Zalim Bashorov
9c5e3ac629 Regenerate tests after rebase to master 2018-04-19 14:27:20 +03:00
Zalim Bashorov
d40b0b556c Regenerate tests after fix usages of IGNORE_BACKEND_WITHOUT_CHECK 2018-04-19 13:18:31 +03:00
Zalim Bashorov
09d5a0cb89 Fix usages of IGNORE_BACKEND_WITHOUT_CHECK 2018-04-19 13:17:28 +03:00
Zalim Bashorov
ad2ea8f999 Remove IGNORE_BACKEND_WITHOUT_CHECK and introduce DONT_RUN_GENERATED_CODE
Support DONT_RUN_GENERATED_CODE in JS Box tests.

IGNORE_BACKEND_WITHOUT_CHECK is removed because of
it's often wrongly used and in most cases can be
replaced with IGNORE_BACKEND or DONT_RUN_GENERATED_CODE
or with combination of them.
2018-04-19 13:17:28 +03:00
Zalim Bashorov
d03a128aa5 [JS IR BE] mute failed tests 2018-04-19 13:17:28 +03:00
Zalim Bashorov
ab03ab84bb Regenerate tests 2018-04-19 13:17:27 +03:00
Zalim Bashorov
a63b2e1bbd Some changes in test generating infrastructure:
* add separate run function for each test class to simplify and deduplicate generated code
* move the code that process IGNORE_BACKEND directive to the separate function, outside of generated code.
** it reduces size and complexity of a generated code
** it allows to mute and unmute tests w/o regenerate tests
* add an ability to generate IGNORE_BACKEND directive automatically, it's disabled by default
* add an ability to remove IGNORE_BACKEND directive automatically, it's enabled by default
* remove whitelists
2018-04-19 13:17:22 +03:00
Zalim Bashorov
4227d8e73a Remove accidentally left test classes: BytecodeTextTestGenerated and JsTypedArraysBoxTestGenerated 2018-04-19 13:17:22 +03:00
Zalim Bashorov
86fe2cc404 Minor: reformat DeprecatedSymbolUsageFixSpecialTest.kt 2018-04-19 13:17:21 +03:00
Toshiaki Kameyama
fee74273aa Invert if condition intention: do not remove line breaks #KT-11740 Fixed 2018-04-19 10:00:46 +03:00
Toshiaki Kameyama
dce5cb3ce9 Reformat InvertIfConditionIntention 2018-04-19 10:00:12 +03:00
Ilya Gorbunov
20b2277951 Minor: fix docs of internal getProgressionLastElement 2018-04-19 05:40:55 +03:00
Alexey Tsvetkov
701f96998a Remove unused SourceInfo interface 2018-04-19 05:18:54 +03:00
Alexey Tsvetkov
87558873b5 Fix source element for JsSwitch generated from 'when'
Before this change we set JsSwitch source to subject's JsExpression.
We ignore these types of source elements during:
1. js ast serialization (see 'JsAstSerializer.extractLocation');
2. source map generation (see 'SourceMapBuilderConsumer.addMapping').

However we might add indent during source generation
(see 'JsToStringGenerationVisitor.pushSourceInfo').

That seemingly broken 'testEnumEntryRemoved' in
'IncrementalJsCompilerRunnerTestGenerated.ClassHierarchyAffected',
because deserialized ast during incremental build would not
have source element at all (JsExpression was ignored), but ast
during rebuild would have JsExpression source element.
2018-04-19 05:18:54 +03:00
Alexey Tsvetkov
b0e8c85e88 Compare JS source maps in readable way in IC tests 2018-04-19 05:18:54 +03:00
Alexey Tsvetkov
dee8b403e3 Turn sourcemap generation on 2018-04-19 05:18:54 +03:00
Ilya Gorbunov
4f80f6d715 Sort .js files before passing them to merger to ensure stable output
#KT-23705 Fixed
2018-04-19 01:22:13 +03:00
Vyacheslav Gerasimov
c4da0e572d Remove comment about TeamCityBuild.xml from build.gradle.kts.182 2018-04-18 22:39:21 +03:00
Nicolay Mitropolsky
46ff4f2bbf 182: KotlinElementActionsFactory: "value"-parameters in generated java-annotations is putted without explicit parameter name #KT-23644 2018-04-18 21:17:24 +03:00
Mikhail Glukhikh
de0cbf5844 Join parameter/argument list: use document to delete whitespaces
Otherwise fix has no effect in IDE. Related to KT-23266
2018-04-18 20:45:31 +03:00
Toshiaki Kameyama
03902030ed Add intentions to put arguments / parameters on one line #KT-23266 Fixed 2018-04-18 20:45:31 +03:00
Ilya Gorbunov
96581f1ecb Do not read manifest properties into build script, remove allProjectsRecursive
Neither this helper, nor manifest properties are used in the build.
2018-04-18 19:41:22 +03:00
Vyacheslav Gerasimov
1753ae8d57 Remove obsolete TeamCityBuild.xml 2018-04-18 19:17:16 +03:00
Toshiaki Kameyama
3992f0215c "map.put() to assignment": handle case with labeled return inside
So #KT-23194 Fixed
2018-04-18 18:50:15 +03:00
Mikhail Glukhikh
77f62f1666 Move to separate file: minor optimization, related to KT-23321 2018-04-18 18:41:24 +03:00
Toshiaki Kameyama
a8d0e8995d Don't suggest to move type to separate file for sealed classes
So #KT-23321 Fixed
2018-04-18 18:41:23 +03:00
Vyacheslav Gerasimov
02578bc378 Add dependency on com.intellij.modules.androidstudio to AS 3.1 & 3.2 plugin.xml 2018-04-18 18:31:39 +03:00
Vyacheslav Gerasimov
8f1defa267 Fix plugin.xml formatting 2018-04-18 18:25:42 +03:00
Vyacheslav Gerasimov
cec554ead2 182: Remove snappy-in-java from IntellijCoreDependencies 2018-04-18 18:00:05 +03:00
Vyacheslav Gerasimov
2a04d08d3e Build: Use fromEmbeddedComponents helper in :prepare:android-lint 2018-04-18 17:53:32 +03:00
Vyacheslav Gerasimov
3b472f4411 Build: Use lazy from with trailing lambda in fromEmbeddedComponents
configurations shouldn't be resolved at project configuration step
2018-04-18 17:53:32 +03:00
Vyacheslav Gerasimov
49bb722f70 Remove update_dependencies from .idea/ant.xml 2018-04-18 17:53:32 +03:00
Nicolay Mitropolsky
0aa236d1ac 182: KotlinElementActionsFactory.createAddFieldActions no more generates private @JvmField and lateinit @JvmField 2018-04-18 17:41:35 +03:00
Alexander Udalov
789a6f9c63 Add test for deterministic bridge order
The test didn't fail before fixin the issue (in the previous commit),
but may still be useful in the future

 #KT-23707 Fixed
2018-04-18 15:55:33 +02:00
Denis Vnukov
e3829a70b0 Stable order of synthesized bridges.
In some cases when several bridge methods are generated, their order
is undetermenistic. For example for class ClassLowerWithContext in the
following example

```
interface IrElement
class IrClassContext

interface IrElementVisitor<out R, in D> {
    fun visitElement(element: IrElement, data: D): R
}

interface IrElementTransformer<in D> : IrElementVisitor<IrElement, D> {
    override fun visitElement(element: IrElement, data: D): IrElement =
            element.also { throw RuntimeException() }
}

abstract class ClassLowerWithContext : IrElementTransformer<IrClassContext?>
```

kotlin compiler synthesizes two additional bridges:

  public IrElement visitElement(IrElement, IrClassContext);
  [bridge] public Object visitElement(IrElement, Object);
  [bridge] public IrElement visitElement(IrElement, Object);

Unfortunately the behavior is not deterministic and not easy to reproduce.
2018-04-18 15:36:33 +02:00
Mikhail Glukhikh
5212b97047 Remove reformatting in intentions isApplicable via createByPattern 2018-04-18 16:15:57 +03:00
Mikhail Glukhikh
ef3ba5f0b1 Test local inspections on the fly via highlighting
Fixes problem with INFORMATION highlight type in batch mode (IDEA 181).
It's no more required to report INFORMATIONs in unit tests in batch.
2018-04-18 16:14:43 +03:00
Mikhail Glukhikh
b6661710dd Use expression body: reformat 2018-04-18 16:14:08 +03:00
Mikhail Glukhikh
28fe30c70d Use expression body: extend range if default level is INFORMATION
So #KT-23167 Fixed
2018-04-18 16:13:54 +03:00
Nikolay Krasko
f62e0dc5f7 Use com.intellij.modules.idea as dependency to forbid install in AS
`com.intellij.modules.idea` was introduced in 182 to distinguish
AS and IDEA installation (IDEA-187502).

Dependency should be removed in CLion and AppCode installation.
2018-04-18 15:49:41 +03:00
Nikolay Krasko
78a5fa766f Remove com.intellij.modules.remoteServers dependency from AS 3.2
Otherwise plugin won't be compatible with AS.
2018-04-18 15:49:40 +03:00
Nikolay Krasko
1ad2ed6761 Add com.intellij.modules.cidr.lang module dependency for CLion and AppCode
Otherwise after removing java dependency it would be possible to
install plugin non only in CLion and AppCode, but also in WebStorm,
PHPStorm, etc.
2018-04-18 15:49:40 +03:00
Nikolay Krasko
c4917d6d1c Use only hard dependency to java module and use include for jvm.xml (KT-23638)
Trick with both optional/non-optional dependency doesn't work in IDEA,
as it doesn't do an additional check optional dependency is found.

See com.intellij.ide.plugins.PluginManagerCore#checkDependants(
  IdeaPluginDescriptor, Function<PluginId, IdeaPluginDescriptor>,
  Condition<PluginId>, Set<PluginId>)

 #KT-23638 Fixed
2018-04-18 15:49:40 +03:00
Alexey Sedunov
03cca448d3 Misc: Make test superclass abstract 2018-04-18 14:37:23 +03:00
Nikolay Krasko
349f16aa64 Fix AbstractScratchRunActionTest.kt and remove usages of projectDisposable 2018-04-18 13:59:36 +03:00
Toshiaki Kameyama
ff63ba4dc1 Add inspection: redundant internal in local anonymous object / class
So #KT-23617 Fixed
2018-04-18 11:17:52 +03:00
Mikhail Glukhikh
1d3ba5641d "Main should return Unit": report on identifier, delete block body type 2018-04-18 11:16:03 +03:00
Toshiaki Kameyama
1cd438c3f7 Add inspection "main should return Unit" #KT-16085 Fixed 2018-04-18 10:59:23 +03:00
Ilya Gorbunov
8784d89f38 Use kotlin-stdlib-sources.jar in tests
Instead of deprecated kotlin-runtime-sources
2018-04-18 05:22:40 +03:00
Alexey Sedunov
3f147aabb0 Misc: Extract AbstractConfigureKotlinInTempDirTest superclass (181/AS32) 2018-04-17 20:38:00 +03:00
Alexey Sedunov
183559dcfa Misc: Extract AbstractConfigureKotlinInTempDirTest superclass
This avoids duplicating runs of ConfigureKotlinInTempDirTest
2018-04-17 17:46:50 +03:00
Pavel V. Talanov
33a312c26d Do not throw when trying to resolve java outside project model
#KT-23444 Fixed
 #KT-22825 Fixed
2018-04-17 16:19:49 +02:00
Mikhail Zarechenskiy
4af8833f08 Render unwrapped suspend function in backend
Hierarchy of specially wrapped suspend function may have inconsistent
 overridden descriptors: some of them may be wrapped, some unwrapped.
 To mitigate this problem, currently it's proposed to render only
 unwrapped functions, which are always have stable overridden descriptors

 #KT-23809 Fixed
2018-04-17 16:24:13 +03:00
Mikhail Zarechenskiy
c216749eb6 [NI] Fix substitutor for anonymous types with captured type parameters 2018-04-17 16:06:55 +03:00
Juan Chen
b7fa06cca4 Add "Convert Java to Kotlin" to ProjectViewPopupMenu and
EditorTabPopupMenu.
2018-04-17 15:36:55 +03:00
Alexey Sedunov
01b0518a61 Gradle Support: Declare 'gradleFrameworkSupport' extension point
This fixes exception in the New Project wizard (IDEA 172)

 #KT-23835 Fixed
2018-04-17 13:37:52 +03:00
Dmitry Petrov
d3a1d93460 Type translation, initial import 2018-04-17 10:35:52 +03:00
Dmitry Petrov
d1fe32a486 IrType: basic interface & implementation 2018-04-17 10:35:52 +03:00
Yan Zhulanow
b665a1b2b6 Android Extensions: Create application resource directories if missing (181, as31) 2018-04-16 20:42:58 +03:00
Mikhail Zarechenskiy
3318549622 [NI] Fix smartcasts computation for dot-qualifier expressions 2018-04-16 18:13:12 +03:00
Mikhail Glukhikh
55da251ffc Resolve problem with too long command line path in Gradle Windows 2018-04-16 17:08:27 +03:00
Vyacheslav Gerasimov
8b5faca2d1 Delete obsolete update_dependencies.xml 2018-04-16 16:23:28 +03:00
Alexey Sedunov
e58f8763fe Minor: Fix NPE in tests which doesn't use facets 2018-04-16 16:14:01 +03:00
Nikolay Krasko
9bce8759bb Remove accidentally added *.173.as32 files 2018-04-16 15:55:53 +03:00
Nikolay Krasko
ecd2db3b48 Remove bunch files that are equal to base files 2018-04-16 15:55:53 +03:00
Vyacheslav Gerasimov
b06e644753 as32: Fix tests compilation for AS 3.2 C10 2018-04-16 15:48:12 +03:00
Zalim Bashorov
e1ba08e03d [JS IR BE] add new items to whitelist and regenerate tests 2018-04-16 14:34:44 +03:00
Zalim Bashorov
ac42a0a23e [JS IR BE] don't materialize Unit for toplevel expressions 2018-04-16 14:34:44 +03:00
Zalim Bashorov
8408bada76 [JS IR BE] basic support for the case when IrBlock is used as expression
In this case compiler generates comma separated expressions.
2018-04-16 14:34:43 +03:00
Zalim Bashorov
77ac0a5d95 [JS IR BE] use most of new intrinsics in IR -> IR 2018-04-16 14:34:43 +03:00
Zalim Bashorov
48219e4a9a [JS IR BE] support new intrinsics in IR -> JS 2018-04-16 14:34:43 +03:00
Zalim Bashorov
76e102a2d2 [JS IR BE] declare more intrinsics
* jsGt
* jsGtEq
* jsLt
* jsLtEq
* jsUnaryPlus
* jsUnaryMinus
* jsPrefixInc
* jsPostfixInc
* jsPrefixDec
* jsPostfixDec
* jsAnd
* jsOr
* jsBitAnd
* jsBitOr
* jsBitXor
* jsBitNot
* jsBitShiftR
* jsBitShiftRU
* jsBitShiftL
* jsInstanceOf
2018-04-16 14:34:42 +03:00
Zalim Bashorov
2ed82f136c [JS IR BE] move intrinsic for Object.create calls to JsIntrinsics 2018-04-16 14:34:42 +03:00
Zalim Bashorov
89aefb2e3f [JS IR BE] add basic support for some binary and equality operations; add some intrinsic infrastructure 2018-04-16 14:34:41 +03:00
Zalim Bashorov
1f7d818307 [JS IR BE] use mapTo instead of map when translate call arguments 2018-04-16 14:34:41 +03:00
Zalim Bashorov
194f5d575a [JS IR BE] use IrMemberAccessExpression.valueArgumentsCount instead of descriptor based IrFunctionSymbol.parameterCount and remove last one 2018-04-16 14:34:40 +03:00
Nikolay Krasko
1fb2b40684 Fix 182 branch after QueryExecutor and subclasses update
Parameter taking Processor<T> were replaced with Processor<? super T>.
aaed1ccb91
c6b40a53ee

Instead of updating all usages, use ExecutorProcessor to avoid
different source code for different IDEAs.
2018-04-14 15:29:38 +03:00
Vyacheslav Gerasimov
879c7f3837 as32: Revert KotlinCallerChooser to 173 state 2018-04-13 21:33:17 +03:00
Vyacheslav Gerasimov
16b314f860 as32: Remove JavaBuilderExtension from AS 3.2 C10 2018-04-13 21:33:16 +03:00
Vyacheslav Gerasimov
76cbdf08aa as32: Update AndroidResourceReferenceAnnotator to AS 3.2 C10 2018-04-13 21:33:15 +03:00
Vyacheslav Gerasimov
8efee7bd9c as32: Revert uast to the state of idea 173, AS 3.2 C10 has uast from idea 173 2018-04-13 21:33:15 +03:00
Vyacheslav Gerasimov
a6bd0f618e as32: Remove platform-api & platform-impl from build scripts
since they are not present in AS 3.2 C10
2018-04-13 21:33:14 +03:00
Vyacheslav Gerasimov
00b5d5fa05 as32: Setup versions for AS 3.2 C10 2018-04-13 21:33:13 +03:00
Vyacheslav Gerasimov
4299455dc1 as32: Update to AS 3.2 C10 2018-04-13 21:33:03 +03:00
Vyacheslav Gerasimov
6fab21f916 Bunch: update bunch structure as32 <- 181 2018-04-13 20:55:37 +03:00
Alexey Sedunov
0647ffca36 MPP: Show error popups for module names in the New Kotlin/Multiplatform wizard
#KT-23261 Fixed
2018-04-13 20:23:08 +03:00
Alexey Sedunov
e51b6927b6 Refactor: Introduce JTextComponent.onTextChange() function 2018-04-13 20:23:07 +03:00
Alexey Sedunov
62f654b3d2 Introduce Variable: Avoid explicit types for expression of anonymous type
#KT-12078 Fixed
2018-04-13 20:23:07 +03:00
Alexey Sedunov
c7e72af170 Override/Implement Members: Copy @Experimental-annotated annotations
#KT-22922 Fixed
2018-04-13 20:23:06 +03:00
Alexey Sedunov
c1d8ba9c2b Parameter Info: Do not render nullability annotations
#KT-23408 Fixed
2018-04-13 20:23:06 +03:00
Alexey Sedunov
e5b915661a Rename: Do not suggest camel names for backquoted non-identifiers
#KT-22888 Fixed
2018-04-13 20:23:05 +03:00
Alexey Sedunov
ea66e1e3f7 Copy: Fix exception on copying KtFile to non-KtFile
#KT-22669 Fixed
2018-04-13 20:23:05 +03:00
Alexey Sedunov
bf106d01b8 Find Usages: Restrict search scope of private top-level declarations
#KT-7622 Fixed
2018-04-13 20:23:04 +03:00
Mikhail Glukhikh
c172810d1d Simplify boolean with constants optimization: use partial analysis 2018-04-13 19:11:55 +03:00
Toshiaki Kameyama
90be6235f7 Expand Selection on opening curly brace should select the entire block right away #KT-18769 Fixed 2018-04-13 13:23:42 +03:00
Nikolay Krasko
2227d205c7 Bunch: update "MoveLambdaOutsideParentheses: intention -> inspection"
decf9939fe
2018-04-13 10:45:32 +03:00
Nikolay Krasko
0253fe7c16 Bunch: update after "Wire StorageManager into a ..."
934c56a4da
2018-04-13 10:45:28 +03:00
Alexander Udalov
30b9caeae6 Fix NPE in data class 'equals' codegen
Do not perform the optimization from 0a11385006 for data class
properties of nullable types
2018-04-12 22:19:30 +02:00
Nikolay Krasko
579b773388 172: Remove 172 specific from psiModificationUtils.kt and KtPsiFactory.kt 2018-04-12 19:29:01 +03:00
Nikolay Krasko
2260f66e02 Unify usage of ProgressManager.progressIndicator 2018-04-12 19:29:01 +03:00
Alexander Udalov
1b1e4ab970 Fix stdlib test path in GenerateRangesCodegenTestData
This fixes `./gradlew generateTests`
2018-04-12 18:28:17 +02:00
Alexey Tsvetkov
ea8f2b5cd8 Clear MockApplication in ClassesFqNamesTest 2018-04-12 18:26:50 +03:00
Ilya Gorbunov
9c7fefba69 Restore default values in actual functions that have default values in expect
Suppress error about default argument values in actuals.
The suppression can be removed when/if KT-23548 is implemented.

This is to avoid degrading experience in docs and IDE when working with
these functions.
2018-04-12 17:53:00 +03:00
Ilya Gorbunov
f7546c809d Minor: use common implementation of doubleTotalOrderEquals for tests 2018-04-12 17:53:00 +03:00
Ilya Gorbunov
2826733e87 Put common sources into kotlin-stdlib-sources going into dist 2018-04-12 17:53:00 +03:00
Ilya Gorbunov
136e6b64f2 In tests use stdlib sources from jar rather than from original locations 2018-04-12 17:53:00 +03:00
Ilya Gorbunov
7ccbd36304 Set module name for common projects, this isn't done automatically yet 2018-04-12 17:53:00 +03:00
Ilya Gorbunov
0e4925a20f Remove UNUSED_PARAMETER warning suppression from actual declarations 2018-04-12 17:53:00 +03:00
Ilya Gorbunov
ac3de447ae Do not use code preprocessing anymore 2018-04-12 17:53:00 +03:00
Ilya Gorbunov
37787f9769 Stdlib docs build: use multiplatform sources 2018-04-12 17:53:00 +03:00
Ilya Gorbunov
9dd87d89ba Remove default values in actual functions that have default values in expect
Remove suppressions about default values in expect declarations
2018-04-12 17:53:00 +03:00
Ilya Gorbunov
f7b2eba680 Do not mix expect/non-expect overloads of minOf/maxOf
Workaround for KT-22520
2018-04-12 17:53:00 +03:00
Ilya Gorbunov
912c69aaa3 Suppress expect-actual mismatch for relaxed array extensions
Due to KT-21937
2018-04-12 17:53:00 +03:00
Ilya Gorbunov
38be99daa3 Build stdlib-jdk7/8 tests as multiplatform manually 2018-04-12 17:53:00 +03:00
Ilya Gorbunov
9b38e5e7b5 stdlib tests: move JVM-only test source files 2018-04-12 17:53:00 +03:00
Ilya Gorbunov
ba873e2b46 stdlib tests: provide expect/actual helper functions 2018-04-12 17:53:00 +03:00
Ilya Gorbunov
ee9608f8db stdlib-js: add actual modifiers where required 2018-04-12 17:53:00 +03:00
Ilya Gorbunov
1be55db681 stdlib-common: remove common migration typealias for Volatile annotation
Otherwise it gets to jvm stdlib as new API.
2018-04-12 17:53:00 +03:00
Ilya Gorbunov
0164f9b730 stdlib-common: correct common exception type declarations 2018-04-12 17:53:00 +03:00
Ilya Gorbunov
10be42ddaa stdlib-common: suppress missing Comparator SAM constructor in JVM 2018-04-12 17:53:00 +03:00
Ilya Gorbunov
d97707d6f7 Add JvmMultifileClass to preserve public API surface 2018-04-12 17:53:00 +03:00
Ilya Gorbunov
23d0e5f2e1 Workarounds to build parts of stdlib as kotlin-runtime and mock runtime
Fix source paths of kotlin-stdlib-minimal-for-tests
2018-04-12 17:53:00 +03:00
Ilya Gorbunov
7c74083f09 runtime-jvm: add actual modifiers where required 2018-04-12 17:53:00 +03:00
Ilya Gorbunov
22255a5cc4 stdlib-jvm: move JVM specific sources, add actual modifier where required
Update copyright path after moving JVM sources
2018-04-12 17:53:00 +03:00
Ilya Gorbunov
93f7a46ba4 stdlib-jvm: build as multiplatform, move project to jvm subfolder
Fix path with stdlib-jvm artifacts for public api test
2018-04-12 17:53:00 +03:00
Ilya Gorbunov
0fb3393ee1 stdlib-js: build as multiplatform 2018-04-12 17:53:00 +03:00
Ilya Gorbunov
69ebb3bfb0 Switch to the new stdlib source generation scheme
Remove old generated sources for stdlib-jvm and stdlib-js
2018-04-12 17:53:00 +03:00
Ilya Gorbunov
ae62cd6570 Do not produce original kotlin-stdlib public api dump anymore
It was produced from the kotlin-stdlib of 1.0 which was separate from the kotlin-runtime.
The actual dump is in kotlin-stdlib-runtime-merged.txt
2018-04-12 17:53:00 +03:00
Ilya Gorbunov
70236d4824 Build standard library for JVM from a single source set
Add explicit imports for kotlin.* and kotlin.text.* to prevent typealiases
conflicting with their aliased types from default imports.
2018-04-12 17:53:00 +03:00
Mikhail Zarechenskiy
cfc940af66 Avoid deprecated access by short name though companion object 2018-04-12 17:35:07 +03:00
Raluca Sauciuc
89d61ee12d Support androidx packages
... in the IDE plugin and the Android extensions compiler.

Change-Id: Iffd58351b0592e12ffc937c06d871d26958fe161
2018-04-12 16:29:13 +03:00
Mikhail Zarechenskiy
612baacc25 Make useless elvis diagnostic more consistent for new and old inference
Also, remove diagnostics that can be covered by usual USELESS_ELVIS diagnostic
2018-04-12 14:38:55 +03:00
Anton Bannykh
4e11555c46 JS: fix BasicIrBoxTest constructor & regenerate the tests 2018-04-12 13:52:21 +03:00
Dmitry Savvinov
934c56a4da Wire StorageManager into a ClassTypeConstructorImpl and ClassDescriptorImpl 2018-04-12 13:44:10 +03:00
Mikhail Glukhikh
1477e67076 Optimize KtPropertyAccessor.hasBlockBody() 2018-04-12 11:03:41 +03:00
Mikhail Glukhikh
876563ca91 Move lambda outside: use INFORMATION for named and multiple lambdas case 2018-04-12 11:03:40 +03:00
Mikhail Glukhikh
b0553a3863 Move lambda outside parentheses: fix inspection text / formatting 2018-04-12 11:03:40 +03:00
kenji tomita
decf9939fe MoveLambdaOutsideParentheses: intention -> inspection #KT-21413 Fixed 2018-04-12 11:03:40 +03:00
Nicolay Mitropolsky
83573ed517 181: Uast: more implementations of UCallExpressionEx 2018-04-12 10:29:07 +03:00
Alexey Tsvetkov
bd50ad87ba Use KotlinCoreEnvironment for parsing Kotlin in IC
Creating and disposing CoreApplicationEnvironment on each call leads to
problems with parallel builds, while KotlinCoreEnvironment
avoids disposing application environment in case of parallel builds.

    #KT-23694 fixed
2018-04-11 19:56:15 +03:00
Alexey Tsvetkov
13ac64b84a Move parseFileUtils to incremental-compilation-impl 2018-04-11 19:56:15 +03:00
Denis Zharkov
1442dd6c2b Avoid exponential complexity in LexicalScope::findLocalVariable
There was an exponential complexity in case we have a chain
of nested LexicalScopeWrapper instances:
we were walking through the chain and on each step running
the algorithm recursively.

Such a case is possible in scripts where each line contains LexicalScopeWrapper

The fix looks safe to me because delegate was used there
for checking !is ImportingScope && !is LexicalChainedScope

In all other means, being recursively run the algorithm does the same job.

 #KT-22740 Fixed
2018-04-11 17:53:19 +03:00
Denis Zharkov
a3c8afade5 Minor. Reformat ScopeUtils.kt 2018-04-11 17:53:19 +03:00
Nikolay Krasko
d93dff5657 Bunch: update QuickFixMultiFileTestGenerated.java.172 2018-04-11 17:20:37 +03:00
Toshiaki Kameyama
52d72ab920 Fix AE exception in "Convert too long character literal to string"
So #KT-23608 Fixed
2018-04-11 17:00:38 +03:00
Toshiaki Kameyama
1cbaab1531 Preserve annotation arguments in "Add use-site target" intention
So #KT-23634 Fixed
2018-04-11 17:00:38 +03:00
Toshiaki Kameyama
a5aad22fe7 Don't report "Redundant Companion reference" on accessing nested object
So #KT-23620 Fixed
2018-04-11 17:00:37 +03:00
Toshiaki Kameyama
94c5344fd1 Check explicit type specification in "Might be const" inspection
So #KT-23303 Fixed
2018-04-11 17:00:37 +03:00
Felix Guo
9539212180 Take Java source file into account in "Add annotation target"
So #KT-22860 Fixed
2018-04-11 17:00:37 +03:00
Nikolay Krasko
5559a6edd3 Fix quick fix, refactoring and slice tests - ignore bunch files 2018-04-11 16:28:45 +03:00
Nikolay Krasko
a3d01443b9 Update bunch plugin.xml after adding "Refactor sealed sub-class to object"
df7968678a
2018-04-11 16:28:45 +03:00
Nikolay Krasko
672169f3be Forgotten bunch file commit reminder 2018-04-11 16:28:45 +03:00
Nikolay Krasko
c8fb384465 Fix call to static PlatformTestCase.createModuleAt in 181 2018-04-11 16:28:45 +03:00
Vyacheslav Gerasimov
b98b02b56e 182: Suppress proguard warnings for com.intellij.util.SVGLoader
Depends on apache batick which has lots of dependencies, probably should be refactored out in idea
2018-04-11 16:28:44 +03:00
Vyacheslav Gerasimov
2514800ce0 182: Suppress proguard warnings for new guava nullability annotations 2018-04-11 16:28:44 +03:00
Vyacheslav Gerasimov
d9f9bf7564 182: Set picocontainer version to 1.2 2018-04-11 16:28:44 +03:00
Yan Zhulanow
6d5e49eeae 182: Android Extensions: Create application resource directory storage if absent 2018-04-11 16:28:44 +03:00
Nicolay Mitropolsky
abe0ca3bd1 182: multiPlatformSetup.kt: createTempDir is non-static in 182 2018-04-11 16:28:44 +03:00
Nicolay Mitropolsky
7a2fc4301b 182: CommonIntentionActionsTest updated to new ExpectedParameter 2018-04-11 16:28:43 +03:00
Nicolay Mitropolsky
001c5d6e3e 182: PsiReferenceBase nullability change fixes 2018-04-11 16:28:43 +03:00
Nicolay Mitropolsky
e7c3086db7 182: dep javax.annotation:jsr250-api:1.0 added to compiler/frontend.java 2018-04-11 16:28:43 +03:00
Nicolay Mitropolsky
072af7304f 182: jdk.internal.org.objectweb.asm.Opcodes -> org.jetbrains 2018-04-11 16:28:43 +03:00
Vladislav.Soroka
a1023953b4 182: KT-23383 Optional plugin dependency for kotlin gradle plugin 'java' subsystem dependent features 2018-04-11 16:28:43 +03:00
Nicolay Mitropolsky
c7c565ffa7 182: velocity-dependency fix for idea 182 2018-04-11 16:28:43 +03:00
Nicolay Mitropolsky
316826ef9b 182: CommonIntentionActionsTest-tests fix after createPropertyActions dropping in platform 2018-04-11 16:28:42 +03:00
Nicolay Mitropolsky
1b783070b5 182: generic PopupChooserBuilder<T> compilation fix 2018-04-11 16:28:42 +03:00
Nicolay Mitropolsky
fdb98fd4ab 182: KotlinOutputChecker.myTestName compilation fix 2018-04-11 16:28:42 +03:00
Nicolay Mitropolsky
41c30f06bb 182: KotlinElementActionsFactory.createAddAnnotationActions implementation (KT-22876) 2018-04-11 16:28:42 +03:00
Alexey Tsvetkov
d5f26f2d8d 182: Add oro version for 182 2018-04-11 16:28:41 +03:00
Alexey Tsvetkov
2f4dcd609c 182: Remove deprecated StoragePathMacros usages
Deprecated `StoragePathMacros.PROJECT_CONFIG_DIR` and
`StoragePathMacros.PROJECT_FILE` were removed in Intellij.
2018-04-11 16:28:41 +03:00
Alexey Tsvetkov
619663cc88 182: Remove com.android.annotations.NonNull usage from TestUtils.java
It is not present in Intellij (182.*) anymore.
Also `org.jetbrains.annotations.NotNull` seems OK here as well.
2018-04-11 16:28:41 +03:00
Alexey Tsvetkov
4fc89631a5 182: Update Guava version 2018-04-11 16:28:41 +03:00
Nicolay Mitropolsky
29b7e460dd 182: fixup: compilation fix: PlatformTestCase.myFilesToDelete made non-static in Platform 2018-04-11 16:28:41 +03:00
Nicolay Mitropolsky
44605580f3 182: compilation fix: PlatformTestCase.myFilesToDelete made non-static in Platform
some code from `PlatformTestCase` were copy-pasted to `KotlinLightCodeInsightFixtureTestCaseBase` because `PlatformTestCase` is not in it's type hierarchy, and thus we cant use these methods from `PlatformTestCase` when they became non-static
2018-04-11 16:28:40 +03:00
Nicolay Mitropolsky
22186c05b4 182: KotlinDecompilerServiceImpl and KtParsingTestCase compilation fixes 2018-04-11 16:28:40 +03:00
Vyacheslav Gerasimov
9e64b240ac 182: Set since-build to "182.1" & until-build to "182.*" 2018-04-11 16:28:40 +03:00
Vyacheslav Gerasimov
b37496c3fc 182: Fix compilation for idea 182, nullability changes mostly 2018-04-11 16:28:39 +03:00
Vyacheslav Gerasimov
ff1ce44c8b 182: Fix build scripts for idea 182 2018-04-11 16:28:39 +03:00
Vyacheslav Gerasimov
67d4ba200a 182: Build against idea 182-SNAPSHOT 2018-04-11 16:28:39 +03:00
Vyacheslav Gerasimov
75b2a29a91 182: Build: Add versions for 182 platform 2018-04-11 16:28:39 +03:00
Vyacheslav Gerasimov
1c9a2c5d30 182: Build: Support idea SNAPSHOT version 2018-04-11 16:28:39 +03:00
Vyacheslav Gerasimov
8af4ae0409 182: == 181 -> 182 ^^^ == 2018-04-11 16:28:39 +03:00
Yan Zhulanow
2e4b04bac5 181: Fix API wrapper in Android extensions 2018-04-11 16:28:38 +03:00
Nicolay Mitropolsky
6e1edb420e 181: StringTemplateExpressionManipulatorTest compilation fix 2018-04-11 16:28:38 +03:00
Alexey Tsvetkov
39f7ecc9a3 181: Reimplement constant search in JPS
The API in Intellij have been changed after the PR was merged
(see 8227d8e2dd)

This commit implements new API.
Also mocked Kotlin constant search is removed from JPS tests.
Mocked Java search is in place, but now
it is does not use hardcoded file and constant names.

   #KT-16091 fixed
2018-04-11 16:28:38 +03:00
Alexey Tsvetkov
5ed66c3998 181: Update Idea to 181.4203.6 2018-04-11 16:28:38 +03:00
Alexey Tsvetkov
8d2508e351 181: Fix oromatcher dependency 2018-04-11 16:28:38 +03:00
Vyacheslav Gerasimov
1b36724495 181: Set until-build to "181.*" 2018-04-11 16:28:37 +03:00
Alexey Sedunov
25d19b45e9 181: Safe Delete: Do not delegate class search to Java
This fixes tests failing in IDEA 181
2018-04-11 16:28:37 +03:00
Vyacheslav Gerasimov
4cf804f30f 181: Restore broken android lint quickfixes 2018-04-11 16:28:37 +03:00
Vyacheslav Gerasimov
207247347e 181: Fix test data for android lint based tests 2018-04-11 16:28:37 +03:00
Nicolay Mitropolsky
94d18581e3 181: FakeFileForLightClass made return "virtualFile" from "ktFile" 2018-04-11 16:28:37 +03:00
Nicolay Mitropolsky
44a37f5dad 181: Uast: KotlinAccessorCallExpression.methodIdentifier fix 2018-04-11 16:28:36 +03:00
Alexey Sedunov
7413e09dc1 181: Move: Replace deprecated method call 2018-04-11 16:28:36 +03:00
Alexey Sedunov
bd6b96341f 181: Move: Remove unnecessary runSynchronouslyWithProgress() call
This method is already invoked under progress manager
2018-04-11 16:28:36 +03:00
Alexey Sedunov
ffc059a0a1 181: Misc: Update Move test data 2018-04-11 16:28:36 +03:00
Vyacheslav Gerasimov
212d218bc6 181: Fix test runtime for 181 platform compiler tests 2018-04-11 16:28:36 +03:00
Vyacheslav Gerasimov
ae338566c2 181: Fix test data for android lint based tests 2018-04-11 16:28:35 +03:00
Nicolay Mitropolsky
585348c590 181: LightClasses: using viewProvider from KtFile
#KT-22929
2018-04-11 16:28:35 +03:00
Nicolay Mitropolsky
1125926009 181: Revert "Fix OOM in tests for 181 (Temporary workaround)"
This reverts commit 5cf45ef
2018-04-11 16:28:35 +03:00
Nicolay Mitropolsky
f0a85eeefb 181: IDEA updated to 181.3870.7 2018-04-11 16:28:35 +03:00
Nicolay Mitropolsky
55753d79e8 181: using InjectedFileViewProvider for light-files in language-injections
#KT-22929
2018-04-11 16:28:34 +03:00
Nicolay Mitropolsky
5951fbb390 181: KotlinFinalClassOrFunSpringInspection dropped 2018-04-11 16:28:34 +03:00
Nicolay Mitropolsky
4d65147373 181: KotlinSpringClassAnnotator dropped 2018-04-11 16:28:34 +03:00
Nicolay Mitropolsky
f539ed76a8 181: SpringKotlinAutowiringInspection dropped 2018-04-11 16:28:34 +03:00
Nicolay Mitropolsky
9bac6c5a71 181: Light annotations made strictly non-physical (KT-22565)
(cherry picked from commit cf6e21d)
2018-04-11 16:28:34 +03:00
Nicolay Mitropolsky
5a1a6a3780 181: ultimate: smali dependency added 2018-04-11 16:28:33 +03:00
Simon Ogorodnik
d361e0f5ea 181: Try to fix OOM in 181 by rising Xmx 2018-04-11 16:28:33 +03:00
Nikolay Krasko
48d357136d 181: Idea update to 181.3494.3 (Fixup on rebase) 2018-04-11 16:28:33 +03:00
Alexey Sedunov
4934b45b61 181: Change Signature: Restore node generation method
#KT-22817 Fixed
2018-04-11 16:28:33 +03:00
Alexey Sedunov
aee9938c70 181: Kotlin Ultimate: Update NodeJS plugin version 2018-04-11 16:28:33 +03:00
Nikolay Krasko
8e147bf3f0 181: Idea update to 181.3494.3 2018-04-11 16:28:32 +03:00
Nicolay Mitropolsky
7e5b417955 181: Uast: don't use com.intellij.psi.util.parentOfType (KT-22734) 2018-04-11 16:28:32 +03:00
Simon Ogorodnik
3fd9ec1b18 181: Fix OOM in tests for 181 (Temporary workaround) 2018-04-11 16:28:32 +03:00
Nicolay Mitropolsky
8cde41850e 181: Uast: support for object literals 2018-04-11 16:28:32 +03:00
Nicolay Mitropolsky
036c0fd6a4 181: Uast: fixes for non-leaf identifiers 2018-04-11 16:28:32 +03:00
Nicolay Mitropolsky
8a4ef83b3d 181: Uast: identifiers testdata updates 2018-04-11 16:28:31 +03:00
Vyacheslav Gerasimov
327cff0876 181: Set until-build to "182.*" 2018-04-11 16:28:31 +03:00
Nicolay Mitropolsky
f40ea754cb 181: Uast: identifiers fixes for KotlinUFunctionCallExpression and AbstractKotlinUVariable 2018-04-11 16:28:31 +03:00
Alexey Sedunov
7988fcabcc 181: Misc: Refine nullability to match changes in the platform 2018-04-11 16:28:31 +03:00
Nicolay Mitropolsky
8ce65dc715 181: Uast: weak consistency check and fixes for UIdentifiers 2018-04-11 16:28:31 +03:00
Vyacheslav Gerasimov
1bf12841ae 181: Set 'versions.intellijSdk' to '181.3007.14' 2018-04-11 16:28:30 +03:00
Nicolay Mitropolsky
224480ac5e 181: UAST: UAnchorOwner and type-specific javaPsi support 2018-04-11 16:28:30 +03:00
Nicolay Mitropolsky
ffe33844b7 181: compilation fix: KotlinCallerChooser and KotlinAwareMoveClassesOrPackagesToNewDirectoryDialog 2018-04-11 16:28:30 +03:00
Nicolay Mitropolsky
26a0dbe910 181: KotlinElementActionsFactory: makes elements public by removing other visibility modifiers 2018-04-11 16:28:30 +03:00
Nicolay Mitropolsky
e48b905075 181: Uast: getArgumentForParameter(i: Int) implementation for Kotlin (IDEA-184046) 2018-04-11 16:28:29 +03:00
Nicolay Mitropolsky
1507eed1cf 181: Uast: Constructors.identifiers.txt testdata fix 2018-04-11 16:28:29 +03:00
Vyacheslav Gerasimov
a0e20eefc6 181: Fix dependencies for 181 2018-04-11 16:28:29 +03:00
Vyacheslav Gerasimov
95c854121a 181: Fix compilation MockUpdateParameterInfoContext 2018-04-11 16:28:29 +03:00
Vyacheslav Gerasimov
283ac840c2 181: Add smali plugin required by android plugin to test runtime 2018-04-11 16:28:29 +03:00
Nikolay Krasko
d32c9ada59 181: Remove deprecated API from language injection in 181 2018-04-11 16:28:28 +03:00
Nicolay Mitropolsky
aae4bb1e1f 181: KotlinElementActionsFactory fix for switching on new API
one test is still falling (
2018-04-11 16:28:28 +03:00
Nicolay Mitropolsky
96ac913a6d 181: Uast: parents for UIdentifiers from toUElement 2018-04-11 16:28:28 +03:00
Nicolay Mitropolsky
4e078fe94b 181: Android-related compilation fix (klint.AndroidLintInspectionBase) 2018-04-11 16:28:28 +03:00
Nicolay Mitropolsky
984c2329b4 181: Uast: KotlinUIdentifier almost everywhere (KT-21688) 2018-04-11 16:28:28 +03:00
Nicolay Mitropolsky
9efa79f352 181: Uast: KotlinUIdentifier introduced to store proper sourcePsi (KT-21688) 2018-04-11 16:28:28 +03:00
Nicolay Mitropolsky
c3decbb62c 181: KotlinCoreEnvironment: set ideaCompatibleBuildNumber = "181.1" 2018-04-11 16:28:27 +03:00
Vyacheslav Gerasimov
5f96b5c4d0 181: build fix: IdeaForkJoinWorkerThreadFactory.setupForkJoinCommonPool
now has parameter headless
2018-04-11 16:28:27 +03:00
Vyacheslav Gerasimov
8e20d540d5 181: Fix RunConfigurationTest.kt, nullability changed in 181 platform 2018-04-11 16:28:27 +03:00
Vyacheslav Gerasimov
f31b56a936 181: Fix compatibility after AS 3.0 was merged to 181 2018-04-11 16:28:27 +03:00
Nicolay Mitropolsky
e322c2d70b 181: yet another PersistentStateComponent-related compilation fix 2018-04-11 16:28:26 +03:00
Alexander Podkhalyuzin
f5e0dfaf8c 181: Parameter state in PersistenceStateComponent is not null now in platform 2018-04-11 16:28:26 +03:00
Nicolay Mitropolsky
1f0f99dc82 181: KotlinTestUtils compilation fix: ShutDownTracker.invokeAndWait removed 2018-04-11 16:28:26 +03:00
Vyacheslav Gerasimov
b61ba4a87a 181: Set correct since-build for Idea 181 plugin 2018-04-11 16:28:26 +03:00
Nicolay Mitropolsky
fe9138f658 181: Using setText instead of text = in EditorTextField after nullability changes in platform 2018-04-11 16:28:26 +03:00
Nicolay Mitropolsky
f291873cf8 181: compilation fix when access progressIndicator in ProgressManager by adding !! 2018-04-11 16:28:25 +03:00
Nicolay Mitropolsky
395a817ada 181: compilation fixes related to BackspaceHandlerDelegate and DocumentWindowImpl changes in IDEA 181 2018-04-11 16:28:25 +03:00
Nicolay Mitropolsky
52acefbb18 181: fix for KotlinDebuggerTestCase compilation 2018-04-11 16:28:25 +03:00
Nicolay Mitropolsky
6ce2c079a7 181: UAST: lazy computation made SYNCHRONIZED in UAST
because of UElement caching in platform, which leads to multithreaded usage
2018-04-11 16:28:25 +03:00
Vyacheslav Gerasimov
e3387953f2 181: == 173 -> 181 ^^^ == 2018-04-11 16:28:25 +03:00
Raluca Sauciuc
cab1813dcd as32: Fix compilation to match changes in SdkConstants (#1533)
... and match the intended semantics for AndroidxName.

Change-Id: If2148ab8cefcc124a72f63458b7dbddf1a6cfe04
2018-04-11 16:28:24 +03:00
Vyacheslav Gerasimov
86f8174093 as32: Set intellijEnforceCommunitySdk for AS 2018-04-11 16:28:24 +03:00
Vyacheslav Gerasimov
6929764672 as32: Set since-build to "173.4548.28" for AS 3.2 C3 2018-04-11 16:28:24 +03:00
Vyacheslav Gerasimov
054ae37ef4 as32: Fix fqname constant usages for AS 3.2 C3 2018-04-11 16:28:24 +03:00
Raluca Sauciuc
25e193546d as32: Android framework resource refactoring fixes
Change-Id: I5dc44306eb315bc9463aaf3d55ad1a75c1e12015
2018-04-11 16:28:24 +03:00
Vyacheslav Gerasimov
86e221f867 as32: Build against AS 3.2 C3 2018-04-11 16:28:23 +03:00
Vyacheslav Gerasimov
b83da08708 as32: Fix compilation against AS 3.2 C2 2018-04-11 16:28:23 +03:00
Vyacheslav Gerasimov
7b69459ad0 as32: Update to AS 3.2 C2 2018-04-11 16:28:23 +03:00
Vyacheslav Gerasimov
2d65e5a60c as32: Fix gradle plugin dependencies for AS 3.2 2018-04-11 16:28:23 +03:00
Vyacheslav Gerasimov
4c76ae12d1 as32: Build against AS 3.2 2018-04-11 16:28:23 +03:00
Vyacheslav Gerasimov
302ff12444 as32: == as31 -> as32 ^^^ == 2018-04-11 16:28:23 +03:00
Yan Zhulanow
5efe6b40af as31: Fix Android-related compilation problems 2018-04-11 16:28:22 +03:00
Nikolay Krasko
fac4be2c1f as31: Remove remoteServers dependency to make compatible with AS 2018-04-11 16:28:22 +03:00
Vyacheslav Gerasimov
1ea093c0bc as31: Set until-build to "173.4301.25" for AS 3.1 2018-04-11 16:28:22 +03:00
Nicolay Mitropolsky
60fe6a911f as31: KotlinTestUtils: resolving PathUtil conflict 2018-04-11 16:28:22 +03:00
Nicolay Mitropolsky
0f6df38211 as31: fixup: Kotlin Facet: Configure facet based on Android build variant (in AS) 2018-04-11 16:28:22 +03:00
Nicolay Mitropolsky
a300682f04 as31: facetUtils.kt compilation fix (configureSdkIfPossible-nullability) 2018-04-11 16:28:21 +03:00
Vyacheslav Gerasimov
e2578b6a17 as31: Add smali plugin required by android plugin to test runtime 2018-04-11 16:28:21 +03:00
Vyacheslav Gerasimov
00d9dc7cc0 as31: Fix GenerateTests.kt compilation for AS 2018-04-11 16:28:21 +03:00
Vyacheslav Gerasimov
b250d20dde as31: Disable ultimate for Android Studio 2018-04-11 16:28:21 +03:00
Vyacheslav Gerasimov
fd0045cf6b as31: Fix build scripts for AS 3.1 2018-04-11 16:28:21 +03:00
Vyacheslav Gerasimov
25fddaacfb as31: Fix compilation ResourceReferenceAnnotatorUtil 2018-04-11 16:28:20 +03:00
Vyacheslav Gerasimov
ec460d88a7 as31: Fix compilation KotlinAndroidGradleLibraryDataService.kt for AS 3.1 2018-04-11 16:28:20 +03:00
Vyacheslav Gerasimov
06efb037fd as31: Fix test data for testAddArrayOfTypeForJavaAnnotation 2018-04-11 16:28:20 +03:00
Vyacheslav Gerasimov
c78c82a366 as31: Fix GradleFacetImportTest for AS 2018-04-11 16:28:20 +03:00
Simon Ogorodnik
d58b0798cc as31: Fix AbstractImportsTest, add missing project parameter
Settings by default taken from per-project settings manager
instead of app settings
2018-04-11 16:28:20 +03:00
Vyacheslav Gerasimov
9bb3bb2777 as31: Remove duplicate registration of KotlinUastBindingContextProviderService
from android-lint.xml, it is already registered in plugin.xml
2018-04-11 16:28:20 +03:00
Vyacheslav Gerasimov
4c498b004f as31: Fix test data for android lint based tests for AS 3.0 2018-04-11 16:28:19 +03:00
Vyacheslav Gerasimov
e12e63572c as31: Fix TypeParameterFindViewByIdInspection for AS 3.0 2018-04-11 16:28:19 +03:00
Nikolay Krasko
589487951c as31: Remove ultimate settings from AS branch 2018-04-11 16:28:19 +03:00
Ilya Gorbunov
f22093ee7b as31: Comment out some new code in ClasspathRootsResolver
Relates to disabled modular JDK9 support.
2018-04-11 16:28:18 +03:00
Yan Zhulanow
48ae0651c6 as31: Add typealias for AndroidGradleModel
(cherry picked from commit f6c6845)

(cherry picked from commit d13c2c2)
2018-04-11 16:28:18 +03:00
Simon Ogorodnik
e9caa54afa as31: Remove dependencies on jps/test 2018-04-11 16:28:18 +03:00
Simon Ogorodnik
647ff74612 as31: Disable maven for AS30 2018-04-11 16:28:18 +03:00
Alexey Sedunov
6636c4376b as31: Kotlin Facet: Configure facet based on Android build variant (in AS)
#KT-19958 Fixed
2018-04-11 16:28:18 +03:00
Alexey Sedunov
a9cdccc6de as31: Misc: Fix compilation 2018-04-11 16:28:18 +03:00
Dmitry Jemerov
8568bde4df as31: Fix compilation
(cherry picked from commit bc0bc0e)
2018-04-11 16:28:17 +03:00
Mikhael Bogdanov
554b834f2c as31: Revert "Fix codegen tests on JDK 9 with jdkKind = FULL_JDK" 2018-04-11 16:28:17 +03:00
Dmitry Jemerov
932e9c74b6 as31: No Maven in AS 2018-04-11 16:28:17 +03:00
Dmitry Jemerov
abce7170be as31: Implement ConvertJavaToKotlinProvider
(cherry picked from commit 34dfa24)
2018-04-11 16:28:17 +03:00
Vyacheslav Gerasimov
38b38511a0 as31: Fix KotlinAndroidLineMarkerProvider for AS 3.0 2018-04-11 16:28:17 +03:00
Vyacheslav Gerasimov
13b192cd47 as31: Moved getRequiredVersion to KotlinAndroidQuickFixProvider 2018-04-11 16:28:16 +03:00
Vyacheslav Gerasimov
11ee744340 as31: Drop custom Kotlin Android lint, register quickfixes with extension point 2018-04-11 16:28:16 +03:00
Dmitry Jemerov
686d8a1756 as31: Compilation fixes for as24 2018-04-11 16:28:16 +03:00
Vyacheslav Gerasimov
ab532732ed as31: Fix compilation AndroidResourceReferenceAnnotator 2018-04-11 16:28:15 +03:00
Vyacheslav Gerasimov
02f842f8b5 as31: Revert "Quickfix to enable language feature works for Maven project"
This reverts commit aabd560eef.
2018-04-11 16:28:15 +03:00
Vyacheslav Gerasimov
3dcca14a50 as31: Revert "Quickfix to enable coroutine support works in Maven projects"
This reverts commit 7346fee513.
2018-04-11 16:28:15 +03:00
Vyacheslav Gerasimov
78140fb304 as31: Fix compilation JavaRuntimePresentationProvider 2018-04-11 16:28:15 +03:00
Vyacheslav Gerasimov
7d7fff52b8 as31: Fix build for AS 2.4.0.3
(cherry picked from commit a79f7a7)
2018-04-11 16:28:15 +03:00
Pavel V. Talanov
8eb80a8f4a as31: Add step to patch plugin xml so that it only works in Android Studio
(cherry picked from commit fcee4eb)

(cherry picked from commit 14f7731)

(cherry picked from commit b1f5df2)
2018-04-11 16:28:14 +03:00
Vyacheslav Gerasimov
7c30e80382 as31: Kotlin Facet: Configure facet on Gradle project sync in Android Studio 2.3
#KT-15909 Fixed

(cherry picked from commit 6a490bc681)
2018-04-11 16:28:14 +03:00
Vyacheslav Gerasimov
6bca651848 as31: Fix compilation for Android Studio 2.4 2018-04-11 16:28:14 +03:00
Vyacheslav Gerasimov
a4699add8e as31: Fix gotoResourceHelper: MyReferredResourceFieldInfo now requires module 2018-04-11 16:28:14 +03:00
Vyacheslav Gerasimov
b6abe84357 as31: Fix ResourceFoldingBuilder for AS 2.4 2018-04-11 16:28:14 +03:00
Yan Zhulanow
bb4b1f5b9c as31: Remove Maven components from all-open and no-arg plugins 2018-04-11 16:28:13 +03:00
Yan Zhulanow
72e66f6175 as31: Disable Maven and JPS modules which is not available in AS 2018-04-11 16:28:13 +03:00
Nikolay Krasko
e1fe148561 as31: Run AS properly 2018-04-11 16:28:13 +03:00
Nikolay Krasko
9f8ab7b98e as31: == 173 -> as31 ^^^ == 2018-04-11 16:28:13 +03:00
Natalia Selezneva
5ba337e998 172: Replace missing property from GradleConstants 2018-04-11 16:28:13 +03:00
Nicolay Mitropolsky
9af4f8c66b 172: psiModificationUtils.kt: compilation fixes 2018-04-11 16:28:13 +03:00
Nikolay Krasko
ef6c8c6a10 172: Revert "UAST: support for JvmDeclarationUElement"
This reverts commit db6a2390a22d4b35246cc4c6d246a5d7752f3506.
2018-04-11 16:28:12 +03:00
Nikolay Krasko
e2fb63729d 172: Revert "Data Inflow: Support grouping by leaf expressions"
This reverts commit d5af2db2f259c7d55d38be73b9a5136e3aefd580.
2018-04-11 16:28:12 +03:00
Mikhael Bogdanov
b785aca98e 172: Fix compilation 2018-04-11 16:28:12 +03:00
Nikolay Krasko
cdc0f60fe8 172: Restore KotlinCommonCodeStyleSettings behaviour for 172 Idea
There are no soft margins in CommonCodeStyleSettings.
2018-04-11 16:28:12 +03:00
Nikolay Krasko
ca7f25d52f 172: Fix compilation in 172 after AbstractApplicationUsagesCollector rename
See c299f7d10a93a055cc868a9d9d20d68cc47c35e3 to intellij_community
2018-04-11 16:28:12 +03:00
Nicolay Mitropolsky
18198ee33c 172: Uast-revert: test-data-revert 2018-04-11 16:28:11 +03:00
Nicolay Mitropolsky
a15d48c444 172: Uast-revert: reverting to previous rebase state 2018-04-11 16:28:11 +03:00
Nicolay Mitropolsky
c6bb0ad712 172: Uast-revert: AbstractKotlinRenderLogTest 2018-04-11 16:28:11 +03:00
Nicolay Mitropolsky
302bdebd3a 172: AbstractSlicerTest.kt reverted to previous rebase 2018-04-11 16:28:11 +03:00
Nicolay Mitropolsky
8c7269ea9a 172: KotlinUCollectionLiteralExpression: remove override modifier 2018-04-11 16:28:11 +03:00
Nicolay Mitropolsky
fb0b9221f9 172: IDEA-172-related compilation fix PluginTestCaseBase.addJdk(myFixture.projectDisposable 2018-04-11 16:28:10 +03:00
Natalia Selezneva
39d9ac1250 172: Remove textAttributes parameter from EditorCustomElementRenderer:paint 2018-04-11 16:28:10 +03:00
Nikolay Krasko
934f2d6e2c 172: Restore usage of PathUtil.getLocalFile in 172 idea
There's no VfsUtil.getLocalFile
2018-04-11 16:28:10 +03:00
Vyacheslav Gerasimov
7dcbb909a6 172: Set intellijSdk to 172.4343.14 2018-04-11 16:28:10 +03:00
Vyacheslav Gerasimov
e72007901a 172: Revert "UAST: override getFunctionalInterfaceType + test"
This reverts commit 92c23aa
2018-04-11 16:28:10 +03:00
Vyacheslav Gerasimov
8d3f71a04f 172: Revert "Quick Fixes: Support cross-language "Create from Usage" with Kotlin target"
This reverts commit 908bf71
2018-04-11 16:28:09 +03:00
Vyacheslav Gerasimov
747f397f40 172: Revert "Quick Fixes: Drop deprecated KotlinCommonIntentionActionsFactory"
This reverts commit ba0a91d
2018-04-11 16:28:09 +03:00
Vyacheslav Gerasimov
deb2ffb49f 172: Revert "Refactoring: Use modifier list in CallableInfo where possible"
This reverts commit 99be75c
2018-04-11 16:28:09 +03:00
Nikolay Krasko
577e6e5206 172: Try to remove unneeded commits in 172 branch
Revert "[Unneeded?] Revert "ExpressionOfTypeProcessor: get member name in read action""
This reverts commit 7ec59fc

Revert "[Unneeded] Revert "AbstractNavigateToLibraryTest: fix for invalid files""
This reverts commit 9e80c60

Revert "[Unneeded?] Revert "AbstractExtractionTest: fix for invalid files""
This reverts commit 0b2113b

Revert "[Unneeded] Revert "AbstractIntentionTest: `isApplicableOnPooled` made run under ProgressIndicator""
This reverts commit a41c247
2018-04-11 16:28:09 +03:00
Nikolay Krasko
9c38454c2e 172: [Unneeded?] Revert "ExpressionOfTypeProcessor: get member name in read action"
This reverts commit 32d8e0c72b877f0c0123bb56e0d92beaab410daa.
2018-04-11 16:28:09 +03:00
Nikolay Krasko
0df179de3b 172: [Unneeded] Revert "AbstractNavigateToLibraryTest: fix for invalid files"
This reverts commit e71b1757be6ca4b9ef49d65c6250a94f5f724f53.
2018-04-11 16:28:08 +03:00
Nikolay Krasko
8eb40466ee 172: [Unneeded?] Revert "AbstractExtractionTest: fix for invalid files"
This reverts commit b3b71ac53bb5150457ff228ecccb15060dd2de1f.
2018-04-11 16:28:08 +03:00
Nikolay Krasko
2cc2ea0ce1 172: [Unneeded] Revert "AbstractIntentionTest: isApplicableOnPooled made run under ProgressIndicator"
This reverts commit d1ad207fdbed6698ec352bd8b759f9ae62baebb3.
2018-04-11 16:28:08 +03:00
Nikolay Krasko
9de5b83f6e 172: Revert "UAST: Properly handle annotations on local variables"
This reverts commit 70de7cff5e23abf723009c8df8bc2df2f646a675.
2018-04-11 16:28:08 +03:00
Nikolay Krasko
9db35f27d7 172: Revert "UAST: Add testConvertTypeInAnnotation"
This reverts commit 7d1b28b2b6bc80411ef19bb7619181bee637cf20.
2018-04-11 16:28:08 +03:00
Nikolay Krasko
c106c6a5d2 172: Revert "UAST: Fix testPropertyWithAnnotation"
This reverts commit 36a405cb55198592ee017c7eed9bd50fd6433f22.
2018-04-11 16:28:07 +03:00
Nikolay Krasko
334ae82b04 172: Revert "UAST test data fixes: @null in render"
This reverts commit 2f366b8209206b32792919f35f896fc63ad4b0e5.
2018-04-11 16:28:07 +03:00
Nikolay Krasko
99f74af006 172: Revert "UAST test data fixes: LocalVariableWithAnnotationKt fix for variable type"
This reverts commit ef61beb53ae1030afe11b3d15a2750959136ad65.
2018-04-11 16:28:07 +03:00
Nikolay Krasko
b02ec40a4c 172: Revert "UAST: support for JvmDeclarationUElement"
This reverts commit db6a2390a22d4b35246cc4c6d246a5d7752f3506.
2018-04-11 16:28:07 +03:00
Nikolay Krasko
17a5ce809f 172: Revert "UAST: SimpleKotlinRenderLogTest.testWhenAndDestructing testdata fix"
This reverts commit c6c71dc5e82e5eec547fb6fe3fe6eb578e8183c9.
2018-04-11 16:28:06 +03:00
Nikolay Krasko
5a072fffd2 172: Revert "UAST: StringTemplateComplex testdata fix"
This reverts commit 2ef0be9b2af14438aa7d899f78e2da327e9a8a07.
2018-04-11 16:28:06 +03:00
Nikolay Krasko
72b4b2b9bf 172: Revert "Uast: AbstractKotlinUClass compilation fix"
This reverts commit 86ee036ae7d89f8acc885d54157d9b9ce5f2cb17.
2018-04-11 16:28:06 +03:00
Nikolay Krasko
bf27a16144 172: Revert "Uast: SuperCalls.render.txt testdata fix"
This reverts commit 28a0267dc131ab37ede64f38de0dc2722aba1762.
2018-04-11 16:28:06 +03:00
Nikolay Krasko
fbf722e0bd 172: Revert "Uast: Constructors.kt testData fixes"
This reverts commit 0d35e32b1ee7006b9c9febf1f8992fbbe3246230.
2018-04-11 16:28:06 +03:00
Nikolay Krasko
633eafb902 172: Revert "Uast: WrappedUAnnotation as replacement for usage of JavaUAnnotation (KT-21025)"
This reverts commit 9701403889fbed93d9ea1e8fa4df58c720b3be72.
2018-04-11 16:28:06 +03:00
Nikolay Krasko
7b89b28015 172: Revert "Uast: AbstractKotlinUVariable annotations now are retrieved from Kotlin Psi, not from compiled (KT-21025)"
This reverts commit ebbfc4a3845159ba8f0e3d94a5f70489c348c403.
2018-04-11 16:28:05 +03:00
Nikolay Krasko
50419db87d 172: Revert "Uast: removing java-uast usage from KotlinUastLanguagePlugin and KotlinEnumConstantClassReference"
This reverts commit dfab8a6888a44d41253477eefb5db75368bb0803.
2018-04-11 16:28:05 +03:00
Nikolay Krasko
57789b8c3d 172: Revert "Uast: making AbstractKotlinUClass not inherit from AbstractJavaUClass"
This reverts commit d35f79963c810365451f09e98c148f9ce7fc3263.
2018-04-11 16:28:05 +03:00
Nikolay Krasko
f9af79c6d9 172: Revert "Uast: no more need to exclude UIdentifier from JvmDeclarationUElement check"
This reverts commit a92791a1f3cdec9ece602c5778eb04d5ffbd7505.
2018-04-11 16:28:05 +03:00
Nikolay Krasko
d402412208 172: Revert "Uast: uastParent made final in KotlinAbstractUElement"
This reverts commit 9b006787581cca8167714d07ad36aea195ff9c02.
2018-04-11 16:28:04 +03:00
Nikolay Krasko
affa1e232f 172: Revert "Uast: Constructors.kt testdata fixes"
This reverts commit a725f43588a6d2f2d1c79649f46849f8cbabbc8f.
2018-04-11 16:28:04 +03:00
Nikolay Krasko
b3a534431d 172: Revert "Uast: handling @receiver annotations"
This reverts commit 2f3b1485a30442db016e7f529d273483315067cf.
2018-04-11 16:28:04 +03:00
Nikolay Krasko
6881559ec3 172: Revert "Uast: KotlinAccessorCallExpression made implement JvmDeclarationUElement"
This reverts commit f75a5d8372ab3041d8a1a8073beaa96a79a50b03.
2018-04-11 16:28:04 +03:00
Nikolay Krasko
c6b888678f 172: [Spring] Revert "Fixes for 173 after 28.08.17 changes in IDEA (#1271)"
This reverts commit 3a37d18e5d65043fc99a28772303d948e0f89f6c.
2018-04-11 16:28:04 +03:00
Nikolay Krasko
060ed5db88 172: [Spring] Revert "Spring-Kotlin: Gutter repaired (KT-20550, KT-20566)"
This reverts commit 37752694df794cc07492d21a3924ee735e6d3b9d.
2018-04-11 16:28:03 +03:00
Nikolay Krasko
a4d5a93454 172: [Srping] Revert "Spring gutter icons SpringApiIcons -> SpringApiIcons.Gutter fix."
This reverts commit 2323e9dc75dbdf109564f1a0d28494e6b5e41075.
2018-04-11 16:28:03 +03:00
Nikolay Krasko
f6e829d7f7 172: [Spring?] Revert "SpringKotlinAutowiringInspection: getting rid of SpringJavaInjectionPointsAutowiringInspection"
This reverts commit d0446b0aed0707ef616484c9fda04915c08598b0.
2018-04-11 16:28:03 +03:00
Nikolay Krasko
1a8b58cd14 172: [Spring?] Revert "SpringTestFixtureExtension: option to forbid facet autoconfigure added"
This reverts commit 0c90753c5bd9ac3fa492a61589d2c8aad3b96cc1.
2018-04-11 16:28:03 +03:00
Nikolay Krasko
92a9ed62a2 172: [Spring] Revert "KotlinSpringComponentScanInspection made to support platform JamReferenceContributor"
This reverts commit f6a3b2eae4b0c49359bb477b320bc433988bec37.
2018-04-11 16:28:03 +03:00
Nikolay Krasko
1421895aa6 172: [Spring] Revert "Spring: removing needless EP-s because they ported to UAST in platform"
This reverts commit 9355f79c6b06fdcd365f23b40e93ea841b372b27.
2018-04-11 16:28:02 +03:00
Nikolay Krasko
368dd193ac 172: Revert "Fix compilation after moving to idea 173"
This reverts commit fe121cc6aeadf63ca2c2819c9c7df59cc81caf5d.
2018-04-11 16:28:02 +03:00
Nikolay Krasko
fbed7f9c08 172: Restore compilation against Idea 172
Revert "Fix proguard settings for 173"
4dadae2e9c8419bfda9d77f56797e68edbd8ecd7.

Revert "Fix compilation in 173"
0633aa925c8e862519ae699e5e3fe81a2bd227c2.

Revert "Fix compilation (MockParameterInfoUIContext.java)"
01a7fbfb60d786c56c54f4fd77d9f1233f599ede.

Revert "Fix compilation"
043a5dac796f6bf92bbe6c9573c1af07fadcfe4e.

Revert "Fix compatibility with BuildScriptDataBuilder API changes"
c7df054d0e90a86fbe67f23802e9be49b2117ded.
2018-04-11 16:28:02 +03:00
Nikolay Krasko
3b434eeb13 172: Restore KotlinCoreEnvironment for 172 branch
Revert "`KotlinCoreEnvironment`: set `ideaCompatibleBuildNumber = "173.1"`"
This reverts commit d3321cc77a6b55d8b8ff3c3a16473f2f3b378533.

Revert "`JvmFacade`-related tests repair"
This reverts commit faeacdd17d37a4d733b686f3a1d5e8fc6ea54d79.

Revert "Register new service and EPs added in 173"
This reverts commit 5d227c0e714c1b4316e7b8daca1f208ee423f448.
2018-04-11 16:28:02 +03:00
Nikolay Krasko
e090775974 172: Revert "KtLightAbstractAnnotation build fix for 173 (#1283)"
This reverts commit b401cc19e07ad632d61ca0d402dc6017f9559d18.
2018-04-11 16:28:02 +03:00
Nikolay Krasko
49cc4fe3b6 172: Revert 173 specific changes in language injection
Revert "`KotlinLanguageInjector` using Registry to enable annotation injections"
This reverts commit c16a1d598c2bacc849dd16fed974ccdbf8b80754.

Revert "`KotlinLanguageInjector#injectInAnnotationCall` optimization: using `PsiClassNamePatternCondition` to avoid calling `getResolvedCall`"
This reverts commit f9eaaeab61b1dd50de9341846e129b58eb47f247.

Revert "`KotlinLanguageInjector` can inject into files modified for autocompletion"
This reverts commit 7212b22b083023201700696d775355051321b120.

Revert "`KotlinLanguageInjector` understands patterns-injections into Java annotations"
This reverts commit 45847b515bdfd27cfa5d23ff8b9147054ffa6f60.
2018-04-11 16:28:01 +03:00
Nikolay Krasko
1dcaaf1fe4 172: Revert "Fix GradleNoduleBuilder use qualified names check"
This reverts commit aec020a404d367195d58c7bb5d30185bfb85f202.
2018-04-11 16:28:01 +03:00
Nikolay Krasko
b9f16920aa 172: Revert "idea-version set to since-build="173.1" until-build="181.*""
This reverts commit 48701780db05e3c0928521f5fb95a5b89d417d95.
2018-04-11 16:28:01 +03:00
Nikolay Krasko
2d2b296f79 172: Revert "Update file structure tests as FileStructurePopup api was changed in 173"
This reverts commit 5244d48fde8e373b046a8ccb602a280b946f8d41.
2018-04-11 16:28:01 +03:00
Nikolay Krasko
df4b345def 172: Revert "Workaround for CoreEnvironment initialization: explicitly setting versions for extensions"
This reverts commit 2e50bd19a83ab4a4f2b3a5d0cc09300ec1b7b1f7.
2018-04-11 16:28:01 +03:00
Nikolay Krasko
c255df0a74 172: Revert "Fix find usages tests in 173 (run via ProgressIndicator)"
This reverts commit 1363306d562ad7ef5af9fd1642e139aa23abdd32.
2018-04-11 16:28:00 +03:00
Nikolay Krasko
1821007fda 172: Revert "AbstractJavaToKotlinConverterForWebDemoTest: setup fix: JvmElementProvider and JavaModuleSystem added"
This reverts commit e1f340f59a9ec83c38ad2a0fe32ba47dbf4cdfb1.
2018-04-11 16:28:00 +03:00
Nikolay Krasko
d6cc3d64fe 172: Revert "EdtTestUtil.runInEdtAndWait fix for proper user action emulation"
This reverts commit 4ebe750d36e86545a72177f91dc3baaa235fa92d.
2018-04-11 16:28:00 +03:00
Nikolay Krasko
1010c1285a 172: Revert "RecursiveMethodCallMarkerInfo and SuspendCallMarkerInfo forced to target Leaf-elements"
This reverts commit c78ec71e17c09ddb1094e44c84d9a1b92a3b509f.
2018-04-11 16:28:00 +03:00
Nikolay Krasko
984d9feeae 172: Revert "AbstractQuickFixTest: FORCE_PACKAGE_FOLDER directive added"
This reverts commit 91e10ae8bb6d2748a7a8b02fa661daa4cb00d0f8.
2018-04-11 16:28:00 +03:00
Nikolay Krasko
67303f925e 172: Revert "Ultimate-plugin: multiplePropertiesAnnotationConfig.kt test data fixes"
This reverts commit 4f2ee7359f8dfd3322329799475ff99dd88ed756.
2018-04-11 16:27:59 +03:00
Nikolay Krasko
47df9bc428 172: Revert "Drop new Kotlin Dsl gradle project wizard which has been merged to idea"
This reverts commit 742d337ad722fe6ddcd6ad5dab27d52eda970489.
2018-04-11 16:27:59 +03:00
Nikolay Krasko
b56a0550a4 172: Revert "Fix formatting for new kotlin dsl gradle project build script"
This reverts commit 75a46e66d18f69ff196749ba436b572b4462ea0d.
2018-04-11 16:27:59 +03:00
Nikolay Krasko
d9008bec80 172: Revert "Move: Fix applicability check in IDEA 173"
This reverts commit 74c28b2a564a859a20b3f799df24405ba634c175.
2018-04-11 16:27:59 +03:00
Nikolay Krasko
bac132d94d 172: Revert "Line Markers: Respect subclass module when filtering out duplicates"
This reverts commit 8df0a58586abf42572aff15d4bdd70e51e5cad29.
2018-04-11 16:27:58 +03:00
Nikolay Krasko
ee77f865cd 172: Revert "Drop missing gradle extensions from gradle.xml"
This reverts commit 1f7a145942f0489e18b281878ac711e7505dce15.
2018-04-11 16:27:58 +03:00
Nikolay Krasko
00c9ed8861 172: Revert "Update file name replace in QuickFix tests"
This reverts commit 01051618aa21c3502463c699f1d178136ef7c6b6.
2018-04-11 16:27:58 +03:00
Nikolay Krasko
a7d705b5d8 172: Revert "Fix inAnnotation test in 173 branch"
This reverts commit 955842f2009a2c5aa9ac955340696bd7e1a2651d.
2018-04-11 16:27:58 +03:00
Nikolay Krasko
25b10238e9 172: Revert "Safe Delete: Suppress walking through light field initializer"
This reverts commit 34d3173ba79535591adb3e55a7af7cb9d1e49e40.
2018-04-11 16:27:58 +03:00
Nikolay Krasko
afc37b9fed 172: Revert "Data Inflow: Support grouping by leaf expressions"
This reverts commit d5af2db2f259c7d55d38be73b9a5136e3aefd580.
2018-04-11 16:27:58 +03:00
Nikolay Krasko
236191bb89 172: Revert "Data Inflow: Support grouping by expression nullability"
This reverts commit e608f1ca159d55df39c8f33704220f360d54ba92.
2018-04-11 16:27:57 +03:00
Nikolay Krasko
81a2e2a340 172: Revert "Fixing non-running tests, that used MockApplication environment"
This reverts commit 49fb7aab2a67f09c2832d759448ad07c1bb3023a.
2018-04-11 16:27:57 +03:00
Nikolay Krasko
56ab1f8add 172: [172] Revert "Set correct until-build for Idea 173 plugin"
This reverts commit 0f378217684879491c3184b7db84e3ce3750a8b5.
2018-04-11 16:27:57 +03:00
Nikolay Krasko
99acec0970 172: [Tests] Revert "Allow different diagnostics in Javac tests - workaround for IDEA-184289"
This reverts commit 5212153463dcefbde28b4ca1814f6888fa9c57c1.
2018-04-11 16:27:56 +03:00
Nikolay Krasko
4c8f366e46 172: [Tests] Revert "Modify incremental test in 173 branch - files are not create anymore"
This reverts commit 0cc5d163d7d620565a28681dab31f3d3061a1324.
2018-04-11 16:27:56 +03:00
Nikolay Krasko
fa3edbf01e 172: == 173 -> 172 ^^^ == 2018-04-11 16:27:56 +03:00
Nikolay Krasko
520b3e2f95 Add branches tree description 2018-04-11 16:27:56 +03:00
Dmitry Savvinov
d438988fc6 Fix javadoc for StorageManager.createLazyValueWithPostCompute 2018-04-11 16:03:19 +03:00
Mikhail Glukhikh
e4275cc027 Refactor sealed subclass to object: add tests, fix type parameter case 2018-04-11 14:51:00 +03:00
Gabryel Monteiro
df7968678a Add inspection: Refactor sealed sub-class to object #KT-20305 Fixed 2018-04-11 14:51:00 +03:00
Dmitry Petrov
7cf6c70fbf Use NoScopeRecordCliBindingTrace as default trace in GenerationUtils
NB we use 'Intrinsics.areEqual(Double, Double)' and
'Intrinsics.areEqual(Float, Float)', because right now we take
nullability from the inferred type of the expression (which is 'Any?' in
the test cases).
We should probably reconsider this in case of more exact information
available from the data flow analysis, e.g., in case of

  fun test(x: Any?) =
    x is Serializable && x is Double? && x == 0.0

We statically know that 'x' is not null in 'x == 0.0' (although it's
neither nullability of it's numeric type 'Double?' nor the nullability
of the inferred type 'Any?').

There might be some edge effects in the performance related to byte code
size and preventive unboxing and so on.
2018-04-11 10:49:02 +03:00
Dmitry Petrov
665d6c82ad Fix Android tests for IEEE 754 2018-04-11 10:49:02 +03:00
Ilmir Usmanov
2cfe387bab Move coroutines to kotlin.coroutines package: compiler
Generate continuation type as kotlin.coroutines.Continuaion. This code will
fail at runtime since there is no stdlib backing this change yet.
However, in order to generate compatible stdlib we need a compiler, which
generates continuation type as kotlin.coroutines.Continuation.
Thus, firstly we support the change in the compiler, make it bootstrap
compiler and only then change stdlib and tests accordingly.
 #KT-23362
2018-04-10 22:51:46 +03:00
Anton Bannykh
f8c0c54a66 Revert "Clean up test skips after KT-17137"
This reverts commit 715d5e9
2018-04-10 20:45:07 +03:00
Anton Bannykh
703611a15c Revert "JS: remove -XtypedArraysEnabled flag (always true now)"
This reverts commit 4a5e9bb
2018-04-10 20:45:07 +03:00
Mikhael Bogdanov
56d1184515 Restrict conditions for @JvmDefault super calls
Condition was too strict
  if @JvmDefault implicitly hidden by class in inheritance.
  Diagnostic is redundant cause there isn't breaking
  change depending on interface method generation strategy and
  delegating stub generation in inheriting class.
2018-04-10 16:33:26 +02:00
Mikhael Bogdanov
e23c406285 Minor. Avoid recursion 2018-04-10 16:33:25 +02:00
Mikhael Bogdanov
6d1af263ba Restrict conditions for @JvmDefault super calls
Condition was too strict if we actually make super call
  through super class. Diagnostic is redundant cause there isn't breaking
  change depending on interface method generation strategy.
2018-04-10 16:33:25 +02:00
Mikhael Bogdanov
5f235a8342 Update documentation for @JvmDefault 2018-04-10 16:33:24 +02:00
Dmitry Savvinov
2d8e4e752c Fallback to Any type in case supertypes are empty
This can happen e.g. if all supertypes were on the cycle (A : B, B : A)
-- then SupertypesLoopChecker will cut all supertypes that are on cycle,
leaving set of supertypes empty.

Some clients in the compiler are not ready to work with empty list of
supertypes -- notably, CommonSupertypes.

^KT-23029 Fixed
2018-04-10 17:25:43 +03:00
Ilmir Usmanov
eb3b9032d6 Add synthetic flag to generated private suspend functions
Private suspend functions need to be generated as package-local, since
they are called from their continuations.
However, this means that they can be called from Java, which breaks
their private visibility.
Adding synthetic to them fixes the issue.
 #KT-17584: Fixed
2018-04-10 17:25:12 +03:00
Natalia Selezneva
a487543827 Fix Repl System.in wrapper. Do not exit after readline in user code
^KT-23622 Fixed
2018-04-10 16:14:23 +03:00
Roman Artemev
3bc323807f Fix function lookup in modules with similar names [KT-23582] 2018-04-10 15:58:30 +03:00
Roman Artemev
96b6cec33f Add warning in case similar module names 2018-04-10 15:58:30 +03:00
Roman Artemev
4cdd121c21 Add test for issue KT-23582 2018-04-10 15:58:30 +03:00
Roman Artemev
2bea8816a6 Add Secondary constructor lowering 2018-04-10 15:45:55 +03:00
Roman Artemev
3ce324fa9d Add tests for secondary constructors 2018-04-10 15:45:55 +03:00
Denis Zharkov
42d9c5b932 Remove dependency on :kotlin-test:kotlin-test-jvm from tests-common
#KT-20897 Fixed
2018-04-10 15:38:16 +03:00
Natalia Selezneva
a58bc7f301 Fix transitive module dependencies for scripts 2018-04-10 14:07:04 +03:00
Natalia Selezneva
2d5f5d65b2 Scratch tests: add Full JDK to ProjectJdkTable to be discoverable during resolve of ScriptModuleInfo 2018-04-10 14:06:59 +03:00
Natalia Selezneva
9b14e690db Drop only caches for script dependencies when module for scratch file changed 2018-04-10 14:06:54 +03:00
Natalia Selezneva
2a15e802a6 Minor: reformat 2018-04-10 14:06:50 +03:00
Natalia Selezneva
429e0afe2a Fix the way how script SDK is found in IDE 2018-04-10 14:06:45 +03:00
Natalia Selezneva
8d9f539c79 Return correct ProjectFacade for script and its dependencies
^KT-22588 Fixed
2018-04-10 14:06:34 +03:00
Natalia Selezneva
d75d0d8711 Refactor ScriptDependenciesModuleInfo
Do not mix ScriptDependenciesInfo for all project and for concrete script.
Rename ScriptDependenciesModuleInfo to ScriptDependenciesInfo
Rename ScriptDependenciesModuleSourceInfo to ScriptDependenciesSourceInfo
2018-04-10 14:06:29 +03:00
Natalia Selezneva
f8ad244899 Rewrite AbstractScriptConfigurationTest to test file from project sources
Changes in testData are needed to avoid running injection for string literals
2018-04-10 14:06:23 +03:00
Natalia Selezneva
37a95765cb Add scriptDependencies moduleInfo for scripts located in module source 2018-04-10 14:06:16 +03:00
Natalia Selezneva
c1dd86d323 Use module name from userData to get module info for scratch file 2018-04-10 14:06:09 +03:00
Natalia Selezneva
31266e49d0 Reset scriptDependencies file attribute when dependencies update fails with fatal error 2018-04-10 14:06:03 +03:00
Dmitry Savvinov
8d2f806c6b Minor: extract rendering of type variable into a method 2018-04-10 10:47:22 +03:00
Dmitry Savvinov
e450da8b63 Introduce EXTRA_VERBOSE mode for rendring ConstraintSystem
Use it for 'missing upperBoundViolatedError' debug message
2018-04-10 10:47:22 +03:00
Dmitry Savvinov
00c55c4f55 Minor: extract rendering of type bound into method 2018-04-10 10:47:22 +03:00
Dmitry Savvinov
30948269dd Minor: use enum for determining verbosity of ConstraintSystem render 2018-04-10 10:47:22 +03:00
Dmitry Savvinov
d8b7de4f0e Add extra diagnostic information when no common supertypes are found
We're suspecting that the culprit of such errors is race condition on
'supertypes' in AbstractTypeConstructor, when it is created using
'LockBasedStorageManager.NO_LOCKS'
2018-04-10 10:47:22 +03:00
Dmitry Savvinov
9455f50e58 Minor: reformat AbstractTypeConstructor.kt 2018-04-10 10:47:22 +03:00
Vyacheslav Gerasimov
7c02d55b23 Remove explicit jar specification from ide modules build scripts
They often change between ide versions and difficult to maintain
2018-04-09 21:47:48 +03:00
Yan Zhulanow
95684b9ecb Minor: Fix codegen tests for smap 2018-04-09 19:45:49 +03:00
Yan Zhulanow
715421566b Pill: Add new script modules 2018-04-09 19:45:49 +03:00
Yan Zhulanow
798a4c6c8d Pill: Fix Kotlin plugin artifact generation (ideaPlugin is no more a Copy task) 2018-04-09 19:45:49 +03:00
Mikhael Bogdanov
f1b8a8f913 Fix test data 2018-04-09 18:13:37 +02:00
Mikhael Bogdanov
ea407aba32 Support custom options in quick fix test framework 2018-04-09 18:13:36 +02:00
Mikhael Bogdanov
c5d4f22e4f Add quick fix for adding @JvmDefault annotation 2018-04-09 18:13:36 +02:00
Mikhael Bogdanov
31e459d9c0 Fix misspelling in test data 2018-04-09 18:13:35 +02:00
Mikhael Bogdanov
d788b3b6f9 Add warning on overriding java default by non @JvmDefault method 2018-04-09 18:13:35 +02:00
Mikhael Bogdanov
cb9c1ae104 Support default method super calls within @JvmDefault ones 2018-04-09 18:13:34 +02:00
Mikhael Bogdanov
942dd8a67c Properly calculate this for super call 2018-04-09 18:13:34 +02:00
Mikaël Peltier
0a11385006 KT-12330 Improve bytecode for data class equals/hashCode methods
- Do not longer call hashCode on java/lang/Object but do this
on statically checked type.
- Do not longer call Intrinsics.areEqual but use directly
equals method on statically checked type.

Fix of https://youtrack.jetbrains.com/issue/KT-12330
2018-04-09 14:16:02 +02:00
Dmitry Petrov
e6baf0296d More annotation generation for declarations with test cases 2018-04-09 11:24:37 +03:00
Dmitry Petrov
fdd8b7ae6c Annotations in IR are represented as call expressions (nothing else) 2018-04-09 11:24:37 +03:00
Dmitry Petrov
57077a5eb8 Generate annotations for declarations in psi2ir 2018-04-09 11:24:37 +03:00
Dmitry Petrov
c2dced775d IrDeclaration has annotations
Note that acceptChildren doesn't traverse them (yet?).
2018-04-09 11:24:37 +03:00
Dmitry Petrov
4016254fd4 Generate constructors with empty bodies for annotation classes
Default parameter values of primary constructor of an annotation class
are required to generate default values of annotation properties.
2018-04-09 11:24:37 +03:00
Dmitry Petrov
e74c448c0a Minor: reformat code 2018-04-09 11:24:37 +03:00
Nikolay Krasko
cc14df9e6f Always remove configure notifications without additional checks in tests (KT-23399)
For some reason there were ~1000 tests that were spontaneously
falling (~20%) because they couldn't find some class. It was mostly
Java classes.

Those failures started after cff88a3f8b.

There were group of commits about notifications right before it:
b4fb0e0305b77a0caa83d34edac3253b7d8e082b..1be33b91fa85e50f5048dc5a12604debfa3c19e8

 #KT-23399 Fixed
2018-04-07 03:04:35 +03:00
Vyacheslav Gerasimov
a8031cfe86 Build: Add zipCidrPlugin task which builds plugin for CLion & AppCode 2018-04-06 21:48:43 +03:00
Vyacheslav Gerasimov
d33b3cd4ee Build: Add :prepare:cidr-plugin project 2018-04-06 21:47:55 +03:00
Ilmir Usmanov
bd0ad26dcf Support local suspend functions
Treat them like lambdas. This means:
1) Like local suspend lambdas, which become "non-suspend" after creating
jvmSuspendView, they do this as well
2) They both are generated with the same codegen.
3) They are treated differently only on front-end side.
 #KT-20364: Fixed
2018-04-06 19:11:19 +03:00
Alexander Podkhalyuzin
5a752da9e9 Updated tests #KT-23546 Comment 2018-04-06 16:25:09 +03:00
Alexander Podkhalyuzin
9667214b64 Fixed formatting 2018-04-06 16:25:08 +03:00
Alexander Podkhalyuzin
e4dfa5897f Do not show duplicated names in variables completion list
#KT-23546 Fixed
2018-04-06 16:25:08 +03:00
Alexander Podkhalyuzin
fe680da3f9 Better formatting of BasicCompletionSession 2018-04-06 16:25:08 +03:00
Alexander Podkhalyuzin
0231a3a9e6 Do not show autopopup variable name completion if it was closed
#KT-23546 Comment
2018-04-06 16:25:07 +03:00
Alexander Udalov
89af94be95 Report warning (1.2) or error (1.3) on local annotations
#KT-23277 Fixed
 #KT-23589 Fixed
2018-04-06 14:17:32 +02:00
Mikhail Glukhikh
c141fac94a Add options to detect private / internal API with implicit type 2018-04-06 12:54:29 +03:00
Ilya Chernikov
78e45f00f5 Fix test data after merging new scripting 2018-04-06 08:53:32 +02:00
Ilya Chernikov
cc2b244484 Add a compiler option to disable default scripting plugin 2018-04-06 08:53:31 +02:00
Ilya Chernikov
ccecc90130 Fix some kapt tests:
some implicit usage of Project.getBasePath, which kapt depends on,
was removed from the scripting, and therefore proguard was removing
it from the compiler. This commit instructs proguard to keep it
explicitly.
2018-04-06 08:53:31 +02:00
Alexander Udalov
dd3cf531cf Disable packing module-info to libraries until Android issue is fixed
https://issuetracker.google.com/issues/77587908

 #KT-21266 Open
2018-04-05 19:18:05 +02:00
Alexey Sedunov
6c7959dd54 Configuration: Put 'buildscript' block before 'plugins' in build.gradle
#KT-23588 Fixed
2018-04-05 18:18:01 +03:00
Alexander Udalov
d2ed73eb78 Enable all Java 9 tests 2018-04-05 12:38:48 +02:00
Alexander Udalov
914cf18051 Fix line separators in scripting-related build.gradle.kts files 2018-04-04 22:26:17 +02:00
Ilya Chernikov
cc59716b39 Remove usages of the compiler from dist in script sample modules
prevent constant reindexing of the compiler jar
2018-04-04 21:44:20 +02:00
Pavel V. Talanov
de71598794 Fix line markers for actual enum entries
#KT-22632 Fixed
2018-04-04 17:56:35 +02:00
Pavel V. Talanov
e66768cbb3 Rewrite mpp line marker tests to be generated 2018-04-04 17:56:35 +02:00
Pavel V. Talanov
c3d2334eed Fix expect declarations available in completion in platform modules 2018-04-04 17:56:35 +02:00
Pavel V. Talanov
549bebbd19 Add test infrastructure for completion in mpp
Allow to specify specific expected module in test data for completion items
2018-04-04 17:56:35 +02:00
Pavel V. Talanov
08b62d3564 Rewrite 'goto' mpp tests to be generated
Adjust test data
Use new util in FindUsagesMultiModuleTest
2018-04-04 17:56:34 +02:00
Pavel V. Talanov
1f4926e259 Rewrite QuickFixMultiModuleTest to be generated
Adjust test data
Drop 'overload' test data since it was never run before
2018-04-04 17:56:34 +02:00
Pavel V. Talanov
67a436bf7e MPP tests: provide utils to setup test mpp from project structure
Allows to avoid configuration in test code
2018-04-04 17:56:34 +02:00
Pavel V. Talanov
01bff0e156 AbstractQuickFixMultiModuleTest: refactor and simplify code
Remove dependency on test module names
2018-04-04 17:56:33 +02:00
Pavel V. Talanov
36d23e4501 Refactor: merge synonymous utils 2018-04-04 17:56:33 +02:00
Pavel V. Talanov
784936eb00 Show 'actual/expect' icons for declarations in addition to visibility 2018-04-04 17:56:33 +02:00
Pavel V. Talanov
c86a6cf21d Minor: rename expect/actual icon constants
Reflect icons' content
2018-04-04 17:56:32 +02:00
Pavel V. Talanov
9c9cdee7f0 Refactor: move utils related to expect/actual declarations and MPPs
Move them to 'idea-analysis' module
2018-04-04 17:56:32 +02:00
Pavel V. Talanov
3aee544f02 Throw more descriptive exception when service isn't found 2018-04-04 17:56:32 +02:00
Ilya Chernikov
da56f54982 Use script compiler options on script dependencies in the IDE as well
further fixes #KT-19120
2018-04-04 16:58:14 +02:00
Ilya Chernikov
5bf8460032 Do not throw if the script definition name is not defined 2018-04-04 16:23:59 +02:00
Ilya Chernikov
bdd001d04c [minor] drop explicit stdlib detection logic in script compiler
...as it is mainly redundant and in the current for somewhat incorrect
2018-04-04 16:23:58 +02:00
Ilya Chernikov
73d2580435 Add FATAL diagnostic severity to match changes in the current script infrastructure 2018-04-04 16:23:58 +02:00
Ilya Chernikov
599a9acce8 Rearrange scripting examples to conform the build system requirements 2018-04-04 16:23:58 +02:00
Ilya Chernikov
7fbcfdf09e Add config params for specifying target annotations, import param renaming 2018-04-04 16:23:58 +02:00
Ilya Chernikov
191b1cfefa Refactor configurations handling:
- rearrange compile call parameters for clarity, more defaults
- remove baseConfiguration method - it is now covered by defaultConfiguration
for static part, and refineConfiguration call if a config parameter is
specified
- implement proper configurations chaining, documented in comment to compile function
- minor renamings and refactorings
2018-04-04 16:23:58 +02:00
Ilya Chernikov
4a4edf3458 [minor] Renames and rearrangements for clarity 2018-04-04 16:23:58 +02:00
Ilya Chernikov
5058c66e8c Refactor scripting properties:
- flatten the structure
- add some parameters
- replace iterables with lists
- renaming all scope objects uniformily
also:
- fix passing and usage of script sources
- renamings and other minor improvements
2018-04-04 16:23:58 +02:00
Ilya Chernikov
2ddcc280a9 Implement simplified property bag dsl:
move it to the separate jar,
use property bag chaining
2018-04-04 16:23:57 +02:00
Ilya Chernikov
495c75c48e Rename heterogeneous map to PropertyBag, make it chainable
the commit is needed to implement single chained script configuration bags
2018-04-04 16:23:57 +02:00
Ilya Chernikov
15fcee474c Fix script classpasth from environment extraction...
for classes dirs
2018-04-04 16:23:57 +02:00
Ilya Chernikov
6ea41b425d Pass script source directly instead of via configuration 2018-04-04 16:23:57 +02:00
Ilya Chernikov
29797ec264 Switch to plugins section in scripting build files after rebasing 2018-04-04 16:23:57 +02:00
Ilya Chernikov
ae2af238fa Fixes after refactoring the API 2018-04-04 16:23:57 +02:00
Ilya Chernikov
1f0cac50d2 Refactor scriptDefinition in the common part
- get rid of selector (because of confusions), move it's data into
definition itself and make it more generic with heterogeneous map
- make main KotlinScript annotation accept complete definition
- make additional annotation for building definition from parts
- add ScriptingEnvironment and pass it as a constructor parameter to
the script handlers
- rename some classes for clarity
2018-04-04 16:23:57 +02:00
Ilya Chernikov
2c3a50e4b3 Refactor scripting examples:
- split into script def and host part
- remove bad dependencies
- organize it in a way that should be typical for user scenarios
2018-04-04 16:23:56 +02:00
Ilya Chernikov
7cca1a72d3 Fix after review: add stdlib to the script compilation classpath by default 2018-04-04 16:23:56 +02:00
Ilya Chernikov
d50798c4cf Refactor script-util context tools to simplify its usage in the new scripting 2018-04-04 16:23:56 +02:00
Ilya Chernikov
4742d0a034 Rename scripting plugins to more established scheme 2018-04-04 16:23:56 +02:00
Ilya Chernikov
00320bad8d Implement support for additional receivers in the backend 2018-04-04 16:23:56 +02:00
Ilya Chernikov
611aff6b61 J2K: ScriptContext - convert 2018-04-04 16:23:56 +02:00
Ilya Chernikov
cf4cca3683 J2K: ScriptContext - rename 2018-04-04 16:23:56 +02:00
Ilya Chernikov
87de1dff03 Implement support for additional receivers for script in frontend 2018-04-04 16:23:56 +02:00
Ilya Chernikov
e79d3dd035 Fix scripting in the frontend after refactorings 2018-04-04 16:23:55 +02:00
Ilya Chernikov
1cb9592fcc Change samples after adding configuration dsl 2018-04-04 16:23:55 +02:00
Ilya Chernikov
0f0934aaa2 Change jvm implementation after adding configuration dsl 2018-04-04 16:23:55 +02:00
Ilya Chernikov
1723ff658d Refactoring heterogeneous map handling, add dsl builders 2018-04-04 16:23:55 +02:00
Ilya Chernikov
63d601e1be Implement scripting configuration gradle plugin 2018-04-04 16:23:55 +02:00
Ilya Chernikov
d05f67127d Move scripting configuration into compiler plugin 2018-04-04 16:23:55 +02:00
Ilya Chernikov
1514a113b8 minor: Add maven deps example template to the discovery resource folder 2018-04-04 16:23:55 +02:00
Ilya Chernikov
0c06ec9088 Implement script templates discovery in the idea plugin 2018-04-04 16:23:54 +02:00
Ilya Chernikov
d07a3f2bdd Implement script templates discovery in the cli compiler 2018-04-04 16:23:54 +02:00
Ilya Chernikov
f496fbb625 Add new scripting libs to proguard library jars
so proguard do not complain for missing classes
2018-04-04 16:23:54 +02:00
Ilya Chernikov
548bf26c58 Add new scripting support to the gradle plugin 2018-04-04 16:23:54 +02:00
Ilya Chernikov
c764365da5 Add new scripting support to the compiler 2018-04-04 16:23:54 +02:00
Ilya Chernikov
3f22e28a51 Implement basic support of the new scripting in the frontend and plugin 2018-04-04 16:23:54 +02:00
Ilya Chernikov
3732422e6a Add example scripting hosts with tests:
the simple scripting host and the one with maven resolving
2018-04-04 16:23:54 +02:00
Ilya Chernikov
c48a74b84a Implement base jvm scripting infrastructure 2018-04-04 16:23:54 +02:00
Ilya Chernikov
aac7f97121 Add new experimental scripting API 2018-04-04 16:23:53 +02:00
Mikhael Bogdanov
4aec9499b5 Add @RequireKotlin(1.2.40) on interface with @JvmDefaults and its subinterfaces 2018-04-04 16:17:38 +02:00
Mikhael Bogdanov
be33a9bf3b Update test data 2018-04-04 14:55:39 +02:00
Mikhael Bogdanov
a27d1b7a3b Update @JvmDefault documentation 2018-04-04 14:55:39 +02:00
Natalia Selezneva
a6019cc5fb Rearrange script definition contributors to avoid old EP appear before new EP
Fix highlighting of build.gradle.kts files with LivePlugin enabled
^KT-23571 Fixed
2018-04-04 12:44:04 +03:00
Dmitry Jemerov
e05b54a2b4 Fix unsupported syntax in code style settings example 2018-04-04 11:35:04 +02:00
Alexander Udalov
0439abba46 Check that kotlin.stdlib is explicitly required in module-info
Writing a Jigsaw-modular Kotlin program which doesn't require
kotlin.stdlib doesn't make sense because it most likely will fail at
runtime, on access to anything from the standard library. Previously, we
checked that kotlin.stdlib was in the module graph, but that's not
enough, we should also check that the source module requires it.
'-Xallow-kotlin-package' can be used to disable the error.

Add a test checking that an indirect (transitive) dependency is also OK
2018-04-03 21:50:25 +02:00
Ilya Gorbunov
7501d2ad69 Make JDK 9 required to build the project 2018-04-03 21:24:35 +02:00
Ilya Gorbunov
299d6fa772 Use default compileJava9Java task to build java9 source set 2018-04-03 21:24:34 +02:00
Ilya Gorbunov
bd4abaa8bf Improve JDK discovery for JDK9+ on Windows 2018-04-03 21:24:07 +02:00
Alexander Udalov
828cc6dbf3 Add module-info.java for kotlin-reflect
The standard way of loading resources with built-ins metadata from the
current class loader no longer works in the modular mode on Java 9
because the current class loader is for module 'kotlin.reflect', but the
metadata is located in the module 'kotlin.stdlib'. On Java 9, we now use
the class loader of 'kotlin.stdlib' to load these resources.

 #KT-21266 Fixed
2018-04-03 21:24:03 +02:00
Alexander Udalov
2d41c7d462 Add module-info.java for standard Kotlin libraries
Using the new multi-release jar feature, store compiled
module-info.class files into META-INF/versions/9 instead of the artifact
root. Hopefully, this will break fewer tools which do not support
module-info.class files because any sane tool should not do anything
with files in META-INF because before Java 9 that directory only
contained resources.

Upgrade some Maven plugins to newer versions which do not fail on
module-info.class files

 #KT-21266 In Progress
2018-04-03 21:22:14 +02:00
Alexey Tsvetkov
650e97f200 Temporarily turn off source map generation in JS IC tests
Until IncrementalJsCompilerRunnerTestGenerated$ClassHierarchyAffected.testEnumEntryRemoved 
is fixed
2018-04-03 21:11:12 +03:00
Alexey Tsvetkov
6f59b6da8e Use daemon if available for parsing files in JPS 2018-04-03 21:11:12 +03:00
Alexey Tsvetkov
3eb968807e Invalidate usages of removed classes before round
#KT-23165 fixed
2018-04-03 21:11:12 +03:00
Alexey Tsvetkov
8cd0f13f2b Convert KotlinSourceFileCollector: simplify after conversion 2018-04-03 21:11:11 +03:00
Alexey Tsvetkov
3f36f472b3 Convert KotlinSourceFileCollector: actual conversion 2018-04-03 21:11:11 +03:00
Alexey Tsvetkov
336d63c0a3 Convert KotlinSourceFileCollector: rename file 2018-04-03 21:11:11 +03:00
Alexey Tsvetkov
bd779cb26e Remove usages of deprecated API 2018-04-03 21:11:11 +03:00
Alexey Tsvetkov
58e4b704c6 Replace reflection with direct call 2018-04-03 21:11:11 +03:00
Alexey Tsvetkov
fa9c80e05c Convert CompilerRunnerUtil: actual conversion 2018-04-03 21:11:11 +03:00
Alexey Tsvetkov
f27b6c0d8d Convert CompilerRunnerUtil: rename file 2018-04-03 21:11:11 +03:00
Alexey Tsvetkov
455fe7fe61 Reformat jps-plugin module 2018-04-03 21:11:11 +03:00
Dmitry Jemerov
ecb9a39f94 Report errors when trying to build decompiled text for light class 2018-04-03 19:45:37 +02:00
Mikhael Bogdanov
08ff1de248 Update test data 2018-04-03 19:38:37 +02:00
Mikhael Bogdanov
2c56f0bfd3 Require 'jvmDefaultFlag' for default super calls 2018-04-03 19:18:19 +02:00
Mikhael Bogdanov
db59e916fb Inline utility method 2018-04-03 19:18:18 +02:00
Mikhael Bogdanov
3f5fea05de Write 'RequireKotlin' annotation on @JvmDefault members 2018-04-03 19:18:17 +02:00
Mikhael Bogdanov
23e8adb793 Add custom diagnostic checker for @JvmDefault annotation 2018-04-03 19:18:17 +02:00
Mikhael Bogdanov
89f22e69b4 Relocate @JvmDefault to stdlib module 2018-04-03 19:18:16 +02:00
Mikhael Bogdanov
38f8924ae3 Update test data. Use simple ''@JvmDefault' instead full qualifier 2018-04-03 19:18:15 +02:00
Mikhael Bogdanov
2a8041e77e Check method abstractness during bridge generation per method not interface 2018-04-03 19:18:14 +02:00
Mikhael Bogdanov
f290b325ee Remove @JvmDefault members from delegation 2018-04-03 19:18:14 +02:00
Mikhael Bogdanov
d84a15c0f6 Support inline for private @JvmDefault members 2018-04-03 19:18:13 +02:00
Mikhael Bogdanov
affe445955 Minor.Reformat 2018-04-03 19:18:12 +02:00
Mikhael Bogdanov
308283e52e Support synthetic accessors for @JvmDefault members 2018-04-03 19:18:12 +02:00
Mikhael Bogdanov
1acd5642ce Minor.Reformat 2018-04-03 19:18:11 +02:00
Mikhael Bogdanov
1d3e57acee Add @JvmDefault diagnostics 2018-04-03 19:18:10 +02:00
Mikhael Bogdanov
63afd37cdd Remove unused parameters, compiler keys and obsolete code 2018-04-03 19:18:10 +02:00
Mikhael Bogdanov
fe45eb2a81 Initial support of @JvmDefault 2018-04-03 19:18:09 +02:00
Mikhael Bogdanov
e885195ee1 Add @JvmDefault annotation 2018-04-03 19:18:08 +02:00
Mikhael Bogdanov
5830f99bce Remove unused test data 2018-04-03 19:18:08 +02:00
Mikhael Bogdanov
c143480727 Remove wrong directive
Similar test exists under 'defaults' foldes
2018-04-03 19:18:07 +02:00
Mikhael Bogdanov
b337b9ea8d Specify idea.home.path for java 8 tests
Default discovery mechanism points to wrong location
2018-04-03 19:18:06 +02:00
Ilmir Usmanov
eb81c205c7 Replace CHECKCAST kotlin/Unit with ARETURN for tail call optimization
Sometimes instead of {POP, GETSTATIC Unit.INSTANCE, ARETURN} sequence
the codegen emits {CHECKCAST Unit, ARETURN} sequence, which breaks tail
call optimization. By replacing CHECKCAST with ARETURN we eliminate
this issue.

 #KT-19790: Fixed
2018-04-03 20:04:18 +03:00
Ilmir Usmanov
7b2de2de5e Add regression test for KT-20744
#KT-20744: Obsolete
2018-04-03 20:02:02 +03:00
Toshiaki Kameyama
2d4ef8d1e6 Allow "add constructor invocation" for sealed top-level inheritors
So #KT-23320 Fixed
2018-04-03 19:49:32 +03:00
Mikhail Glukhikh
d54c57f9df Minor refactoring: get rid of js.getJetTypeFqName usage in intention 2018-04-03 19:49:32 +03:00
Toshiaki Kameyama
488e5e9f60 Do not suggest "redundant toInt() call" for comparison receiver
So #KT-23133 Fixed
2018-04-03 19:49:31 +03:00
Toshiaki Kameyama
f91819ace7 "Simplify boolean expression": handle Boolean? comparison correctly
So #KT-23377 Fixed
2018-04-03 19:49:31 +03:00
Dmitry Jemerov
a495c2e5ea Don't run analysis in SpecifyTypeExplicitlyIntention.isAvailable()
If type is invalid, show error hint when action is invoked
2018-04-03 18:37:33 +02:00
Mikhail Glukhikh
6d9457853e Fix handling of characters in "convert to string template"
So #KT-23045 Fixed
So #KT-23046 Fixed
2018-04-03 18:26:25 +03:00
Alexander Udalov
d0e99e9a3f Fix NPE from JarURLConnection.getUseCaches when loading compiler plugins
#KT-22513 Fixed
2018-04-03 16:55:48 +02:00
Mikhail Glukhikh
2125c42328 Make DeprecatedCallableAddReplaceWithInspection applicability based
Removes intention version of the same thing
Includes some optimization of 'Deprecated' annotation detection
2018-04-03 17:46:27 +03:00
Mikhail Glukhikh
ab973b2ff0 Fix several false positives and make safer "redundant companion ref"
Don't report it on an import directive #KT-23520 Fixed
Don't report it if companion nested class is referenced #KT-23519 Fixed
Check companion reference both by descriptor and by name
2018-04-03 17:45:14 +03:00
Mikhail Glukhikh
23488fac56 Optimization: RedundantCompanionReferenceInspection 2018-04-03 17:30:46 +03:00
Alexander Udalov
964bf503a6 Fix warning about kotlin-reflect-api bundling Kotlin Runtime
This fixes the "Some JAR files in the classpath have the Kotlin Runtime
library bundled into them" warning when compiling all modules that
depend on kotlin-reflect-api. This warning is reported on jars in the
classpath which look like standard library artifacts, but in fact are
not because their manifest does not say so. With this change, we're now
writing the manifest of standard library artifacts to the resulting jar
of kotlin-reflect-api, with the standard library component name
"internal" (in fact, it doesn't affect anything here, any name would be
OK) to make the compiler believe that this is actually a standard
library jar
2018-04-03 13:18:56 +02:00
Nicolay Mitropolsky
14ce13315c Uast: wrapping expression bodies with return and code block (#KT-23557) 2018-04-03 14:10:01 +03:00
Mikhail Glukhikh
66d134ef5c "Can be private" inspection: don't analyze data class parameters
So #KT-23566 Fixed
2018-04-03 13:44:37 +03:00
Yan Zhulanow
dc3cd01fad Kapt: Find the right annotation descriptor in case of repeatable annotations (#KT-23427) 2018-04-03 00:16:54 +03:00
Yan Zhulanow
4cab250f72 Pill: Add marker option for JUnit3RunnerWithInners test runner 2018-04-02 19:26:39 +03:00
Yan Zhulanow
46973bf1fe Kapt: Do not escape cyrillic letters in stubs (#KT-23286) 2018-04-02 19:26:37 +03:00
Yan Zhulanow
ae3d574473 Pill: Support Android tests 2018-04-02 19:26:35 +03:00
Yan Zhulanow
ead7653f84 Minor: Fix Parcelable test data 2018-04-02 19:26:34 +03:00
Yan Zhulanow
78f2fe1eab Pill: Add idea-android-output-parser module to JPS model 2018-04-02 19:26:32 +03:00
Yan Zhulanow
5d9bdbec10 Tests: Disable inspections after test as Platform test framework requires 2018-04-02 19:26:30 +03:00
Yan Zhulanow
8f02d338a6 Android: Extract dependencies to Android plugin to extensions 2018-04-02 19:26:28 +03:00
Yan Zhulanow
39e9d28c63 Kapt: Support 'kapt.kotlin.generated' option in Maven 2018-04-02 19:26:26 +03:00
Yan Zhulanow
b1d7935d4a Kapt: Annotation processors should not be discovered when the processor fqNames are set by user (#KT-22939) 2018-04-02 19:26:24 +03:00
Yan Zhulanow
dc8eb7446f Kapt, minor: make Gradle API a bit cleaner 2018-04-02 19:18:45 +03:00
Yan Zhulanow
b3fbec9ec3 Fix EA-117939: Add a read action 2018-04-02 19:17:56 +03:00
Yan Zhulanow
81f3346329 Evaluate: Fix annotation value evaluation (#KT-23058) 2018-04-02 19:16:46 +03:00
Yan Zhulanow
4d13e38948 Show warning alert when the installed Kotlin plugin version is incompatible with the IDE platform version 2018-04-02 19:16:16 +03:00
Yan Zhulanow
b664177bd5 EA-100549: Throw an exception with an additional data instead of Java assertion 2018-04-02 19:16:03 +03:00
Yan Zhulanow
ec0abb0854 Fix EA-79206: Process only valid layout .xml files in Android Extensions 2018-04-02 19:15:48 +03:00
Yan Zhulanow
c8a1517190 Fix EA-113820: Accept also nullable elements in 'getRelevantElement()' 2018-04-02 19:15:33 +03:00
Yan Zhulanow
2b0489529d Fix compatibility for compiler API in DeclarationAttributeAltererExtension (EA-114961) 2018-04-02 19:14:52 +03:00
Yan Zhulanow
ff4cdfb43e Remove "New Kotlin Activity" action as Android plugin can generate it by itself (#KT-22845, EA-114706) 2018-04-02 19:14:40 +03:00
Yan Zhulanow
966480a155 Debugger: A dirty fix for setting breakpoints inside finally {} in case if exception is thrown from try {} (#KT-22654) 2018-04-02 19:14:28 +03:00
Yan Zhulanow
eec9c6bffa Debugger: Fix breakpoints and stepping for inline-only function lambda arguments (#KT-23064) 2018-04-02 19:14:14 +03:00
Alexey Sedunov
ae37cc30a1 JS: Use the same output paths for JPS and Maven-based builds
#KT-22586 Fixed
2018-04-02 15:28:35 +03:00
Elifarley C
1b3d539a25 toBigDecimal: Avoid creating new BigDecimal instance for some values
Avoid creating new `BigDecimal` instance by calling `BigDecimal.valueOf(this)`, which doesn't create a new instance if the argument falls in the range [0..10].
(there's a `private static final BigDecimal[] zeroThroughTen` cache in BigDecimal.java with 11 BigDecimal instances)
2018-04-02 15:26:49 +03:00
Mikhail Zarechenskiy
e1d75d5581 Migration fixes for new inference 2018-03-30 20:39:55 +03:00
Mikhail Zarechenskiy
ae35a3b324 Enable new inference in the compiler 2018-03-30 20:39:55 +03:00
Mikhail Zarechenskiy
152a9a21f9 Make type parameter nullable as it should be
This change is needed, because in NI we perform a more strict check
2018-03-30 20:39:54 +03:00
Mikhail Zarechenskiy
3592b19fa4 Update bootstrap to 1.2.50-dev-310 2018-03-30 20:39:54 +03:00
Vyacheslav Gerasimov
10c14260b1 Build: Fix dependency on markdown in :prepare:idea-plugin
org.jetbrains:markdown brings kotlin-stdlib dependency transitively, which resolves to default configuration of :kotlin-stdlib project. But we need to pack jar from distJar configuration. Also sourceSets.builtins.output is copied to plugin because :kotlin-stdlib has compile dependency on it. Probably we should also refactor :kotlin-stdlib to avoid such confusions in future.
2018-03-30 20:10:20 +03:00
Vyacheslav Gerasimov
22496353b6 Fix KotlinReferenceImporter, add safe call to quickFixActionRanges
HighlightInfo.quickFixActionRanges is nullable in 181
2018-03-30 17:05:55 +03:00
Ilya Gorbunov
d2a235b752 Minor code improvements, add more test cases #KT-11208
Compare new readLine with the reference implementation in BufferedReader.
2018-03-30 16:04:22 +03:00
meztihn
12e427b4b5 KT-11208 Remove readLine's new charset parameter
It can't be introduced in a patch release.
2018-03-30 16:03:19 +03:00
meztihn
cca7a59bba KT-11208 Improve readLine's tests readability 2018-03-30 16:03:19 +03:00
meztihn
68cb66ff0e KT-11208 Remove readLine's lineSeparator parameter 2018-03-30 16:03:19 +03:00
meztihn
f6c1886394 KT-11208 Remove stream buffering 2018-03-30 16:03:19 +03:00
Ilya Gorbunov
f45e3ac7d9 kotlin-stldib-js: do not import experimental sourceset in IDEA
Temporary workaround to prevent multiple IDEA modules sharing the same content root error.
2018-03-30 16:03:19 +03:00
Sergey Mashkov
42de429565 IDL2K: add property to control deployment 2018-03-30 15:13:42 +03:00
Mikhail Zarechenskiy
0632bbbed0 Nullability of intersection type should be determined by supertypes
Intersection types cannot be nullable as is because of special rules for subtyping
2018-03-30 14:51:07 +03:00
Mikhail Zarechenskiy
aebcb61402 Resolve elements in chain of qualifier expression without expected type
Consider call chain `foo.bar.baz()` which has expected type `Int`
Elements `foo` and `bar` doesn't have expected type `Int`,
this is especially important in NI, because we use expected type for
candidate applicability
2018-03-30 14:51:07 +03:00
Natalia Selezneva
3d73786e98 Highlight scripts according to ScriptLocation annotation in ScriptDefinition 2018-03-30 14:43:17 +03:00
Natalia Selezneva
15914dac86 Add ScriptExpectedLocations annotation to script-runtime.
It describes where script file can be found.
2018-03-30 14:43:17 +03:00
Natalia Selezneva
27f1eb1e13 Do not reload dependencies for scripts that wasn't recently touched 2018-03-30 14:43:17 +03:00
Natalia Selezneva
f52441d64e Do not show "Gradle Project needs to be imported" notification for gradle script if only spaces are added 2018-03-30 14:43:17 +03:00
Alexey Sedunov
b0a99c7945 Move Out Of Object Intention: Fix assertion error
#KT-22983 Fixed
2018-03-30 12:37:30 +03:00
Alexey Sedunov
14b1bdf627 Rename: Fix renaming of backquoted property accessors
#KT-23298 Fixed
2018-03-30 12:37:30 +03:00
Alexey Sedunov
2104a0fa2b Extract Function: Drop extra space in modifier list
#KT-23274 Fixed
2018-03-30 12:37:30 +03:00
Alexey Sedunov
0a0043a851 Convert Function to Property: Forbid for properties with both initializer and getter
#KT-23293 Fixed
2018-03-30 12:37:29 +03:00
Alexey Sedunov
43b4a496e3 Rename: Increase precedence of RenameSyntheticDeclarationByReferenceHandler
Otherwise it's not applicable references to Java declarations

 #KT-20241 Fixed
2018-03-30 12:37:29 +03:00
Anton Bannykh
a514c0f515 JS IR: initial lowerings reuse 2018-03-29 20:32:10 +03:00
Nikolay Krasko
6adf7eaf04 Check stubs consistency in decompiler tests 2018-03-29 19:49:02 +03:00
Nikolay Krasko
dbab5bcc58 Delete bundled Kotlin plugin from different kind of AS jar/zip 2018-03-29 19:49:01 +03:00
Nikolay Krasko
70d236cb8d Always configure "idea.home.path" system variable
When TestLoggerFactory is initialized in tests it checks that variable
and it it's not present uses classpath to search for logger configuration.

If this search is unsuccessful a lot of exceptions are written to log:

java.lang.RuntimeException: Could not find installation home path. Please make sure bin/idea.properties is present in the installation directory.
     	at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:96)
     	at com.intellij.testFramework.TestLoggerFactory.reconfigure(TestLoggerFactory.java:67)
2018-03-29 19:49:00 +03:00
Alexander Udalov
5d9348eea1 Sanitize compiler version for version requirement checks
Strip everything after (and including) the first '-' character.

The previous approach of skipping the checks if "SNAPSHOT" is in the
version, is subsumed by the new one because "1.2-SNAPSHOT" now becomes
"1.2" with regards to the version requirement checks, which allows the
compiler to use the 1.2-only API
2018-03-29 17:12:18 +02:00
Alexander Podkhalyuzin
b78869ecfc Fixed aliased imports cache #KT-23430 Fixed 2018-03-29 16:05:00 +02:00
Nikolay Krasko
6a71f5bd2c Restore JUnit3RunnerWithInners version for JPS and delegate pill to it 2018-03-29 14:14:34 +03:00
Nikolay Krasko
9a831bf7dd Collect statistics for inlay parameter options 2018-03-29 14:14:34 +03:00
Nikolay Krasko
8d4fa8f3e8 Stop running tests from inner classes in JUnit3RunnerWithInners (KT-23234)
Running tests as part of parent class produced test names on
TeamCity that were different from test names obtained when inner classes
were executed first. And it looks like test order execution in Gradle
depends on file walker and file system.

 #KT-23234 Fixed
2018-03-29 14:14:34 +03:00
Nikolay Krasko
bf8c7075bc Don't spam to error log from kapt3 successful tests 2018-03-29 14:14:33 +03:00
Dmitry Jemerov
9516c638ea Use more efficient file type check (avoid identifying file type by file) 2018-03-29 13:11:37 +02:00
Dmitry Jemerov
85ebe97597 Avoid unnecessary collection copy (KT-23384) 2018-03-29 13:11:36 +02:00
Dmitry Jemerov
6f1881b9ff Import reference at offset uses existing import fix (KT-23235)
If we have a valid autoimport fix at given offset, don't recalculate
variants; use existing ones
2018-03-29 13:11:36 +02:00
Dmitry Jemerov
5b04d99eeb Return null script if stub tells us file is not a script 2018-03-29 13:11:36 +02:00
Roman Artemev
68e47a9d60 Implement basic IR -> JS class translation 2018-03-29 13:26:04 +03:00
Mikhail Zarechenskiy
e70162771d [NI] Fix exception from IDE completion
Fake arguments that are created for completion might have missing PSI parts (see `DummyArgument`)
2018-03-29 13:13:39 +03:00
Mikhail Glukhikh
05db4b3ccf Optimization: LeakingThisInspection 2018-03-29 11:39:10 +02:00
Mikhail Glukhikh
5e9ca6f466 Optimization: AddVarianceModifierInspection 2018-03-29 11:39:09 +02:00
Mikhail Glukhikh
34de241154 Add inspection to detect public API with implicit type 2018-03-29 11:39:01 +02:00
Dmitry Jemerov
6a619d0aa5 Ensure that multiplatform Gradle task runner runs first
In order to have effect, the runner needs to be registered before the
main Gradle runner, which also has order="first" in plugin.xml.
2018-03-29 09:50:34 +02:00
Dmitry Jemerov
8f19e95bd0 Set SDK from JVM module when running JUnit tests for common module 2018-03-29 09:50:34 +02:00
Dmitry Jemerov
6bee25cad2 Reformat 2018-03-29 09:50:34 +02:00
Dmitry Jemerov
20cd193030 Delete remains of external annotations support from compiler 2018-03-29 09:45:07 +02:00
Zalim Bashorov
9349b9bc67 [JS BE] Fix the crash on compound operations with a qualified call on left side
#KT-22001 Fixed
2018-03-28 22:49:09 +03:00
Alexander Udalov
c3b6abfb1f Minor, add javadoc to KotlinBuiltIns.isBuiltIn 2018-03-28 19:48:50 +02:00
Zalim Bashorov
4d742c5266 Add more tests to JS IR whitelist and regenerate tests 2018-03-28 20:33:23 +03:00
Zalim Bashorov
0aa0ffc6fd [JS IR BE] Add generating JS AST for more IR elements:
* string concat
* get local value
* set local variable

* block
* composite block
2018-03-28 20:33:22 +03:00
Zalim Bashorov
7ae28a806b [JS IR BE] Add generating JS AST for "while" and "do-while" 2018-03-28 20:33:22 +03:00
Zalim Bashorov
52e2fb7a4e [JS IR BE] Add generating JS AST for "when" 2018-03-28 20:33:22 +03:00
Zalim Bashorov
d46bba1521 [JS IR BE] Support must of kinds of constants except Long and Char 2018-03-28 20:33:22 +03:00
Mikhail Zarechenskiy
81ac3a4f2f Add ability to enable new inference in the platform 2018-03-28 18:32:28 +03:00
Ilmir Usmanov
4070f13e26 Do not generate beforeInlineMarker on tailrec jump
Before this change, the codegen used to generate beforeInlineMarker
in order to spill variables later. However, since the tailrec call
is replaced with jump, no afterInlineMarker is generated, leading to
inconsistency of these markers. Thus, the spilling fails.
This change disables generating of beforeInlineMarker.

 #KT-21521: Fixed
2018-03-28 15:50:24 +03:00
Ilmir Usmanov
58bac6882d Fix transforming of coroutine's create when it is suspend lambda with receiver
Unlike ordinary lambdas suspend lambdas has create method which invokes
the constructor of the lambda object (continuation).
The inliner could not cope with this.
The previous change fixed the case of suspend lambda without receiver.
This change adds support of suspend lambdas with receiver.

 #KT-21605: Fixed
2018-03-28 15:48:16 +03:00
Toshiaki Kameyama
e96b5f3117 Fix false positive in redundant companion reference #KT-23435 Fixed 2018-03-28 13:27:45 +02:00
Alexander Udalov
3bc7eefad9 Regenerate tests 2018-03-28 12:55:00 +02:00
Mikhail Glukhikh
7e711eaf30 Memory optimization: CanBeParameterInspection 2018-03-28 12:04:58 +02:00
Mikhail Glukhikh
491eeb3d6f Optimization: OverridingDeprecatedMemberInspection 2018-03-28 12:04:56 +02:00
Mikhail Glukhikh
b8da1d67d5 Optimize UsePropertyAccessSyntaxInspection 2018-03-28 12:04:55 +02:00
Mikhail Glukhikh
52cd71c3c4 Optimization: ReplaceGetOrSetInspection 2018-03-28 12:04:53 +02:00
Mikhail Glukhikh
9170aa0674 Distinguish PARTIAL_WITH_CFA resolve mode from just PARTIAL
So #KT-23182 Fixed
2018-03-28 12:04:33 +02:00
Mikhail Glukhikh
5d57341ee4 Make cheaper analysis in KtReference.resolveToPsiElements
Related to KT-23182
2018-03-28 12:04:13 +02:00
Dmitry Petrov
3a936c9e27 Minor: drop 'transformTypeArguments' 2018-03-27 17:25:11 +03:00
Dmitry Petrov
47b3152bd0 Throw detailed exceptions for incorrect argument indices 2018-03-27 17:25:11 +03:00
Dmitry Petrov
9a76ee63ab Determine typeArgumentsCount by descriptor 2018-03-27 17:25:11 +03:00
Dmitry Petrov
3b967017f6 Render type arguments by index 2018-03-27 17:25:11 +03:00
Dmitry Petrov
b5607e4b3d Store type arguments by indices instead of TypeParameterDescriptor keys 2018-03-27 17:25:11 +03:00
Alexey Sedunov
f4936d3e31 JS: Fix NodeJS run configuration support
#KT-16710 Fixed
2018-03-27 13:47:14 +03:00
Alexey Sedunov
e604707450 Move: Support "Search references" option in dialogs 2018-03-27 13:47:13 +03:00
Dmitry Savvinov
5b216a0270 Don't throw exception on recursion for class header scope
The root issue here is that when we have some cycle in scopes, the place
where we detect a loop depends on where we've entered that cycle.

Previously, we didn't know about cases where we enter scopes loop
through `ClassResolutionScopesSupport.scopeForClassHeaderResolution` =>
there were no need to handle recursion on `scopeForClassHeaderResolution`
carefully.

It seems that in some very narrow cases (launch of specific
inspection on specficic code with specific caches state), we do manage
to enter loop exactly through `scopeForClassHeaderResolution` (see
KT-23033), which causes exception.

^KT-23033 Fixed
2018-03-27 12:16:54 +03:00
Dmitry Savvinov
148573fcf6 Remove 'DataFlowValueKindUtils.isStable', use 'DataFlowValue.isStable' instead 2018-03-27 10:51:51 +03:00
Anton Bannykh
7b860eab36 Merge kotlin-experimental into kotlin standard library (KT-23055 fixed)
* kotlin-experimental.js has been already merged into kotlin.js
* change library name to kotlin in kotlin-experimental.meta.js in order to produce correct require calls
* concatenate kotlin-experimental.meta.js with kotlin.meta.js
* suppress multiple module declaration warning for such use case
2018-03-26 23:13:28 +03:00
Anton Bannykh
d0e71acaa5 JS: fix NaN bug workaround 2018-03-26 20:07:00 +03:00
Anton Bannykh
e1233beddc Convert BinaryOperationIntrinsic to Java @FunctionInterface
Also some minor renamings and visibility changes
2018-03-26 20:07:00 +03:00
Anton Bannykh
3a7518cad2 Implemented equality comparison for primitive types 2018-03-26 20:07:00 +03:00
Anton Bannykh
7cde03938a Fix some Unit materialization bugs 2018-03-26 20:07:00 +03:00
Anton Bannykh
1f7d235fb5 AssignmentBOIF is never used 2018-03-26 20:07:00 +03:00
Anton Bannykh
7c61e594e2 Simplified CompareTo intrinsics 2018-03-26 20:07:00 +03:00
Anton Bannykh
757649d6da BinaryOperationIntrinsic as typealias 2018-03-26 20:07:00 +03:00
Anton Bannykh
2352dc3d1c minor ObjectIntrinsics refactoring 2018-03-26 20:07:00 +03:00
Anton Bannykh
60e487dcec Minor FunctionIntrinsics refactoring 2018-03-26 20:07:00 +03:00
Anton Bannykh
5b11ee251f Simplify binary operation intrinsics
Having to invoke `exist` so prevent a runtime exception
is no better then trying to invoke a method on a null
reference. It is actually worse, because Kotlin type
system handles the latter.
2018-03-26 20:07:00 +03:00
Anton Bannykh
cfd42b85b2 Kotlinify Intrinsics.java 2018-03-26 20:07:00 +03:00
Alexander Udalov
a4b7023f65 Fix compilation errors in builtinsSerializer test data 2018-03-26 17:21:09 +02:00
Alexander Udalov
6660873e18 Add annotations to dependencies of tests-common
To prevent warnings "unknown enum constant Capitalization.Title" during
the build
2018-03-26 17:21:08 +02:00
Alexander Udalov
13df75ef74 Minor, extract isInstanceType to protoTypeTableUtil 2018-03-26 17:21:08 +02:00
Alexander Udalov
f7a3182982 Minor, add default value to contract expression flags 2018-03-26 17:21:07 +02:00
Alexander Udalov
46a1109910 Report warnings on usages of kotlin-stdlib-jre7/kotlin-stdlib-jre8
#KT-21347 Fixed
2018-03-26 17:19:35 +02:00
Alexander Udalov
71e9ee7437 Minor, rephrase diagnostic message on repeatable annotations 2018-03-26 16:35:17 +02:00
Alexander Udalov
7f1a468b2e Read virtual files safely in KotlinMetadataStubBuilder
Do not fail on an invalid file, or on a file pointing to a non-existent
.jar entry, exactly as this is done in KotlinMetadataDecompiler
2018-03-26 15:54:28 +02:00
Mikaël Peltier
3a50d0d78f KT-22063 Add intrinsics for javaObjectType and javaPrimitiveType
Fix of https://youtrack.jetbrains.com/issue/KT-22063
2018-03-26 15:52:19 +02:00
Alexey Tsvetkov
d79a4fd9a0 Remove gradle/project-schema.json
It is not needed anymore.
Also since :ultimate project is included conditionally,
if "non-ultimate" developer regenerates
and commits gradle/project-schema.json,
then ultimate builds would fail.
2018-03-26 16:09:29 +03:00
Alexey Tsvetkov
b420671a1d Introduce jps-compatible-base plugin to create necessary configurations
To avoid generating static accessors (via kotlinDslAccessorsSnapshot),
we need to create all necessary configurations during 'plugins'
block evaluation.
2018-03-26 16:09:29 +03:00
Alexey Tsvetkov
8a82c1618c Use Plugins DSL in Kotlin Gradle scripts
When plugins DSL is used, there is no need to
manually generate typesafe accessors for extensions and
conventions (by running `./gradlew kotlinDslAccessorsSnapshot`).
2018-03-26 16:09:29 +03:00
Alexey Tsvetkov
19a13b47ff Use java-gradle-plugin in buildSrc 2018-03-26 16:09:29 +03:00
ilmat192
9d15052688 Fix composite build with Kotlin/Native (#1588) 2018-03-26 16:04:41 +03:00
Mikhail Zarechenskiy
4ed5e2f35e [NI] Improve inference for lambdas that return lambdas 2018-03-26 14:59:52 +03:00
Mikhail Zarechenskiy
b8c0910724 Add one more test on delegated properties to check NI 2018-03-26 14:37:32 +03:00
Mikhail Zarechenskiy
3ea0b9975f [NI] Use specialized type of integer value type for delegate receiver 2018-03-25 20:22:38 +03:00
Mikhail Zarechenskiy
3dde31729e [NI] Record information about delegated property as in old inference 2018-03-25 20:22:37 +03:00
Mikhail Zarechenskiy
7e982fed4f Add complex test on delegated properties 2018-03-25 20:22:37 +03:00
Mikhail Zarechenskiy
bb4fb669a0 [NI] Refactoring: rename method 2018-03-25 20:22:36 +03:00
Mikhail Zarechenskiy
bf92280f52 [NI] Update testdata about inference for delegated properties 2018-03-25 20:22:36 +03:00
Mikhail Zarechenskiy
53b434a3e3 [NI] Use getValue/setValue methods simultaneously to infer types
Rewrite inference for delegated properties with the new scheme
2018-03-25 20:22:36 +03:00
Mikhail Zarechenskiy
0f60965595 [NI] Introduce basic resolver for many candidates 2018-03-25 20:22:35 +03:00
Mikhail Zarechenskiy
3078e5a6ff [NI] Simplify creation of resolution callbacks 2018-03-25 20:22:35 +03:00
Mikhail Zarechenskiy
ff10e97c28 [NI] Make CallResolutionResult more typed 2018-03-25 20:22:35 +03:00
Mikhail Zarechenskiy
c8ef785010 [NI] Move method hasContradiction to constraints storage 2018-03-25 20:22:34 +03:00
Mikhail Zarechenskiy
663b417c5a [NI] Introduce method to add extra constraints before completion 2018-03-25 20:22:34 +03:00
Mikhail Zarechenskiy
50027225a1 [NI] Extract interface InferenceSession to a separate file 2018-03-25 20:22:34 +03:00
Mikhail Zarechenskiy
1a5282c4b7 [NI] Introduce methods to extend inference for several candidates 2018-03-25 20:22:33 +03:00
Mikhail Zarechenskiy
01cdc08026 [NI] Refactor: extract method to run candidate completion out 2018-03-25 20:22:33 +03:00
Mikhail Zarechenskiy
2235f5eb48 [NI] Refactor: create separate method for candidate preparation 2018-03-25 20:22:33 +03:00
Mikhail Zarechenskiy
8c44d44e78 [NI] Propagate class to extend inference through resolution context 2018-03-25 20:22:33 +03:00
Mikhail Zarechenskiy
887a69b72e [NI] Extend constraint completer to work with several resolve atoms 2018-03-25 20:22:32 +03:00
Zalim Bashorov
a47a916437 Restore hack for avoiding tracking declarations from JS stdlib 2018-03-24 20:09:11 +03:00
Nikolay Krasko
ba662b7d56 Minor: another message fix (KT-23309)
#KT-23309 Fixed
2018-03-23 18:31:22 +03:00
Nikolay Krasko
982b768c69 Refactoring: collect callbacks for collecting module info in one place 2018-03-23 18:04:08 +03:00
Nikolay Krasko
0b0eb210b6 Refactoring: get module language settings in ResolverForProjectImpl 2018-03-23 18:04:06 +03:00
Nikolay Krasko
525d90540a Refactoring: enumerate used components in PerFileAnalysisCache.kt 2018-03-23 18:04:03 +03:00
Nikolay Krasko
586860e03a Refactoring: store correspondent module info in module content 2018-03-23 18:04:01 +03:00
Nikolay Krasko
3e313509e1 Refactoring: restrict callback in ResolverForProjectImpl 2018-03-23 18:03:59 +03:00
Nikolay Krasko
666d31bdc4 Refactoring: visibility restrictions 2018-03-23 18:03:57 +03:00
Nikolay Krasko
38a79086d3 Rename: ResolutionFacadeImpl -> ModuleResolutionFacadeImpl 2018-03-23 18:03:54 +03:00
Nikolay Krasko
dced45d1bf Refactoring: rename AnalyzerFacade -> ResolverForModuleFactory 2018-03-23 18:03:52 +03:00
Nikolay Krasko
c5e8374fa8 Minor: typo fix (KT-23309)
#KT-23309 Fixed
2018-03-23 17:58:12 +03:00
Nikolay Krasko
0f441760c2 Refactoring: remove usages of analyzeFully
Function isn't removed because it has usages from other plugins
2018-03-23 17:58:11 +03:00
Nikolay Krasko
059013a8d3 Rename: analyzeFullyAndGetResult -> analyzeWithAllCompilerChecks in ResolutionFacade 2018-03-23 17:58:11 +03:00
Nikolay Krasko
f2b478f304 Rename: analyzeFullyAndGetResult -> analyzeWithAllCompilerChecks in resolutionApi.kt 2018-03-23 17:58:10 +03:00
Mikhail Glukhikh
804d340c5f Fix more broken QF tests 2018-03-23 15:26:21 +03:00
Mikhail Glukhikh
e937a350fe Fix broken QF tests 2018-03-23 14:57:33 +03:00
Ilmir Usmanov
481dbee96a Do not ignore copy operations while finding source instructions
in redundant locals elimination.

Since IgnoringCopySourceInterpreter ignores ALOADs and ASTOREs,
the source instruction of ALOAD K in {ALOAD N, ASTORE K, ALOAD K}
sequence is not ASTORE K. In this case we cannot simply replace K
with N, since there can be multiple {ALOAD N, ASTORE K} sequences
in separate branches. After replacement we get different stack
frames.
This change resolves this.

However, in ReturnUnitMethodTransformer we want to ignore copies
of the same GETSTATIC kotlin/Unit.INSTANCE, since we do not mess
with local variables and just replace ASTORE with ARETURN to help
tail-call optimization.
 #KT-23373: Fixed
2018-03-23 14:32:48 +03:00
Mikhail Zarechenskiy
15b46cdda9 [NI] Don't perform useless computation for smartcasts 2018-03-23 14:18:32 +03:00
Toshiaki Kameyama
e06c13732f Add intentions for specifying use-site targets for an annotation
So #KT-19871 Fixed
2018-03-23 13:03:00 +03:00
Denis Zharkov
e162749366 Add a cache for PsiBasedClassResolver instances
The PsiBasedClassResolver constructor isn't very cheap to call
because it runs computation of conflicting names each time

Again, this is helpful for Spring-interop because PsiBasedClassResolver
is used very frequently there

 #KT-23380 Fixed
2018-03-23 12:36:15 +03:00
Denis Zharkov
f060604d98 Add a cache for KtImportDirective::importedFqName
It's very useful for Spring users because KotlinAnnotatedElementsSearcher
calls PsiBasedClassResolver::canBeTargetReference rather frequently
on a file and the latter function retreives importedFqName for each
import in the file that becomes a problem because computing fq-name
from PSI is a heavy computation

 #KT-23380 In Progress
2018-03-23 12:36:15 +03:00
Denis Zharkov
673d1aa91d Fix a memory leak of old resolve session from light classes
The problem is that diagnostics might indirectly retain a reference to an
obsolete ResolverForProject (it becomes outdated after out of block
modification).

At the same time light class instances may survive afer OOM when they
are leaked somewhere (e.g. to Java resolve)

The idea is to store the Diagnostics instance inside a
ResolverForProject component which will be collected once
ResolverForProject is collected itself.

 #KT-23380 In Progress
2018-03-23 12:36:15 +03:00
Dmitry Petrov
bd7e9d5397 Fix type argument mapping for members imported from objects 2018-03-23 11:43:44 +03:00
Dmitry Petrov
37040523ad valueArgumentsCount 2018-03-23 11:43:44 +03:00
Dmitry Petrov
3c7914b0c1 Minor: drop obsolete code 2018-03-23 11:43:44 +03:00
Dmitry Petrov
135d3ab57a Fix type arguments mapping 2018-03-23 11:43:44 +03:00
Dmitry Petrov
eb5904ea8e Underlying constructor for type alias should always be substituted
Otherwise PSI2IR fails because of type mismatch.
2018-03-23 11:43:44 +03:00
Dmitry Petrov
bfcf1584a2 Minor: reformat code 2018-03-23 11:43:44 +03:00
Toshiaki Kameyama
26dc5840f1 Fix two exceptions in "Convert concatenation to template
So #KT-23045 Fixed
So #KT-23045 Fixed
2018-03-23 09:36:49 +03:00
Toshiaki Kameyama
7328f75103 Don't suggest 'Redundant semicolon' before lambda extension call
So #KT-23152 Fixed
2018-03-23 09:35:34 +03:00
Ilya Gorbunov
5d06c2c584 Code conformance test: actualize stdlib and tools exclusions 2018-03-23 04:25:07 +03:00
Ilya Gorbunov
bb04198f7e kotlin-stdlib-gen: add dsl option for multiple suppressed diagnostics 2018-03-23 04:23:25 +03:00
Ilmir Usmanov
bd7ad8c9d5 Raise deprecation level to ERROR of coroutineContext
inside kotlin.coroutines.experimental.intrinsics package
 #KT-22400
2018-03-22 22:12:27 +03:00
Ilya Gorbunov
dd8a00f651 Make kotlin-test-js implement both kotlin-test-common and kotlin-test-annotations-common 2018-03-22 21:55:04 +03:00
Natalia Selezneva
c7513b5ffa Fix compatibility with LivePlugin
^KT-23371 Fixed
2018-03-22 17:17:59 +03:00
Ilya Gorbunov
7a40b4c5f1 Refactor: extract JVM-specific tests into separate files
Make KotlinVersion random comparison test running in JS
2018-03-22 17:08:43 +03:00
Ilya Gorbunov
2d099a29b8 Clean up redundant -Xmulti-platform option from multiplatform projects
It was necessary before, but now it's provided automatically.
2018-03-22 15:16:33 +03:00
Nikolay Krasko
117890dba8 Fix generating cls stubs when is metadata using type tables (KT-23345)
Affected cases:
 - return type for suspend lambda
 - aliased type in type alias declaration
 - using type alias instead of aliased type in declarations

 #KT-23345 Fixed
2018-03-22 11:54:03 +03:00
Nikolay Krasko
875e0a64e7 Add -Xuse-type-table to jvm compiler options 2018-03-22 11:54:01 +03:00
Toshiaki Kameyama
a67068d37e Suggest "Add annotation target" quick fix also for field use-site
So #KT-23227 Fixed
2018-03-22 10:30:46 +03:00
Toshiaki Kameyama
e328d2d1ca Suggest "Remove braces" in nested if correctly #KT-14270 Fixed 2018-03-22 09:56:22 +03:00
Toshiaki Kameyama
8082a5daf7 Fix "Add braces to if" when semicolon is used instead of a new line
So #KT-23123 Fixed
2018-03-22 09:45:54 +03:00
Yan Zhulanow
369dbd604b Android modules should not be imported as common modules (#KT-23367) 2018-03-22 04:53:00 +03:00
Yan Zhulanow
db20c1a38f Minor: Add Android Studio platform prefix in Android patchset branches to fix 'runIde' task for them 2018-03-22 04:52:59 +03:00
Yan Zhulanow
3932c745df Minor: Fix bundled Kotlin plugin removal in Android Studio bundle for macOS 2018-03-22 04:52:58 +03:00
Mikhail Zarechenskiy
effdfe8ec0 Prohibit incorrect annotations with use-site targets more precisely
#KT-21696 Fixed

The problem is coming from the fact that `AnnotationTarget.VALUE_PARAMETER` is mapped to receiver parameter and to value parameter, but annotation with use-site target `receiver` can be used only on type reference of receiver parameter
2018-03-22 04:03:08 +03:00
Mikhail Zarechenskiy
6007559af1 Minor, remove unused method, add TODO 2018-03-22 04:03:06 +03:00
Mikhail Zarechenskiy
6086cd2cf4 Prohibit non-const expressions through varargs in annotations
Fixes #KT-23153 for Kotlin 1.3

 The problem was in the type check of expression type against expected type. When feature `AssigningArraysToVarargsInNamedFormInAnnotations` (KT-20171) appeared, expected type could be wrong, which led to failed type check
2018-03-22 04:03:04 +03:00
Mikhail Zarechenskiy
4ebd11a7ae Refactoring: rename parameter to argument for annotation diagnostics 2018-03-22 03:59:55 +03:00
Mikhail Zarechenskiy
baf16895f2 Refactor and prettify checkCompileTimeConstant method 2018-03-22 03:03:56 +03:00
Vyacheslav Gerasimov
96caf7f4ce Build: Get rid of build scan deprecated methods 2018-03-21 20:08:42 +03:00
Alexey Tsvetkov
605bcc66a1 IC: add destination dir to start of classpath instead of end
Otherwise IC fails when a project declares a class with the same name
as in one of its dependencies.
The issue is relevant only for non-JPS IC (Gradle, Maven, etc.),
but I added the test for JPS too.

  #KT-20516 fixed
2018-03-21 18:44:42 +03:00
Alexey Tsvetkov
55cbd28910 Do not exclude :ultimate:generateTests in "Generate All Tests"
:ultimate is excluded by default now,
so `-x :ultimate:generateTests` fails
2018-03-21 18:44:42 +03:00
Ilya Gorbunov
5d13b1681f Refactor: extract JVM API into separate files
Increase visibility to internal for:
- copyToArrayOfAny
- UNINITIALIZED_VALUE
- InitializedLazyImpl

Change file classes to multifile:
- LazyKt
- GroupingKt
- IntrinsicsKt (coroutines)
2018-03-21 18:08:00 +03:00
Nikolay Krasko
5dc4e31918 Update idea to 173.3.5 (173.4674.33) 2018-03-21 17:25:45 +03:00
Nikolay Krasko
3b4ca3558b Add hard dependency to Java module in plugin.xml
Otherwise resulting plugin will be installable to PyCharm, WebStorm and
other Intellij IDE without Java.

It can be resolved with `xi:include`, but it should be done with care,
because some declarations in `jvm.xml` should be placed after some
declarations in `plugin.xml` (action groups suffer from this issue for
sure).
2018-03-21 17:25:40 +03:00
Nikolay Krasko
d847f9f7ac Use stringValue for getting version of *jre usage in Maven (KT-23271)
#KT-23271 Fixed
2018-03-21 17:25:34 +03:00
Natalia Selezneva
3b11b890e9 Set FATAL severity for errors from GradleScriptTemplateProvider 2018-03-21 16:51:53 +03:00
Roman Artemev
0d0adbbc05 Fixed handling of default params in declaration (KT-23239) 2018-03-21 12:44:24 +03:00
Roman Artemev
a121a4a6b2 Added test to check default params in declaration (issue KT-23239) 2018-03-21 12:44:24 +03:00
Alexander Podkhalyuzin
7d72fe07bb Fixed broken exception reporter 2018-03-21 12:25:32 +03:00
Mikhail Glukhikh
b739db3c35 Fix parameter handling in "Move suspicious reference into parentheses"
Related to KT-21743
2018-03-21 09:53:38 +03:00
Toshiaki Kameyama
fbd06dc74f Fix "move suspicious reference into parentheses" for functional types
So #KT-21743 Fixed
2018-03-21 09:30:17 +03:00
Toshiaki Kameyama
3fbf85dc37 Add inspection to highlight unnecessary explicit companion references
So #KT-22971 Fixed
2018-03-21 09:15:48 +03:00
Zalim Bashorov
4c5913f5a3 Regenerate tests 2018-03-20 22:44:30 +03:00
Zalim Bashorov
68457a55a8 [JS IR BE] support more constructions:
* generate declaration for top level properties
* basic support for calls
* break
* continue
* throw
* generate declaration for local vals and vars
2018-03-20 22:44:29 +03:00
Zalim Bashorov
560e35174b Minor: renames
IrElementToJsNodeTransformer -> BaseIrElementToJsNodeTransformer
IrFileTransformer -> IrFileToJsTransformer
IrModuleTransformer -> IrModuleToJsTransformer
2018-03-20 22:44:29 +03:00
Zalim Bashorov
87ee373205 Few improvements in test infrastructure:
* add the way to specify another compatible target for target backend.
  It's used to generate a test for X_IR backend even when in a test data
  is explicitly written a target: "// TARGET_BACKEND: X".
* Add the ability to run tests "ignored" with the "IGNORE_BACKEND" directive
  as regular tests, i.e. w/o catching exceptions.
* Print stack trace of caught exception inside tests "ignored"
  with the "IGNORE_BACKEND" directive.
2018-03-20 22:44:28 +03:00
Zalim Bashorov
f899394126 Regenerate tests 2018-03-20 22:44:28 +03:00
Zalim Bashorov
e0a070ff35 [JS IR BE] basic compiler 2018-03-20 22:44:27 +03:00
Zalim Bashorov
4404c6dd2c Run JS box tests for JS IR BE 2018-03-20 22:44:26 +03:00
Zalim Bashorov
bef7b5389b Create ir/backend.js module with dummy compiler 2018-03-20 22:44:26 +03:00
Zalim Bashorov
f820b3eadd Fix exception from PathManager.getHomePath with message "Could not find installation home path" 2018-03-20 22:44:25 +03:00
Zalim Bashorov
44d5d0da7e Rid of most of the usage of JsConfig in TopDownAnalyzerFacadeForJS 2018-03-20 22:44:25 +03:00
Vyacheslav Gerasimov
66eaa34bdb Build: Put local repositories to the top of repositories block 2018-03-20 20:57:13 +03:00
Vyacheslav Gerasimov
40a765819a Remove unused versions.intellij-plugin property 2018-03-20 20:44:20 +03:00
Vyacheslav Gerasimov
f55d137790 Upgrade shadow plugin to 2.0.2
Fixes warning 'Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.'
2018-03-20 20:44:20 +03:00
Toshiaki Kameyama
9d6b36c249 KT-20282 'Move statement up' works incorrectly for statement after 'finally' block if 'try' block contains closure 2018-03-20 20:39:17 +03:00
Alexey Belkov
d3b1b7a5be Minor: fix assertion 2018-03-20 20:39:17 +03:00
Yan Zhulanow
793a05106c Minor: Remove old 'buildLexer.xml' path from ant.xml 2018-03-20 16:22:52 +03:00
Denis Zharkov
d8538db719 Avoid retaining whole KotlinClassHeader in IDEKotlinBinaryClassCache
Before this change there was a retention chain
VirtualFile -> KotlinBinaryData -> KotlinBinaryHeaderData -> KotlinClassHeader

The latter one contains all binary metadata (a lot of String[])
while only a small part of it is used.

The used parts are moved straight to KotlinBinaryClassHeaderData
in this change.

 #KT-19484 Fixed
2018-03-20 10:46:13 +03:00
Ilya Chernikov
dca7323627 [minor] fix asm sources connection 2018-03-19 17:17:10 +01:00
Alexey Tsvetkov
6ab96c1d7d Set up idea.home.path in :incremental-compilation-impl
To avoid warnings in stderr
2018-03-19 18:04:33 +03:00
Alexey Tsvetkov
2584143e92 Report correct source to output mapping for kjsm files
Now IC can correctly remove kjsm files when source files are changed
2018-03-19 18:04:33 +03:00
Alexey Tsvetkov
ea09f4caf6 Remove all kjsm files before writing new ones 2018-03-19 18:04:33 +03:00
Alexey Tsvetkov
a3feb77193 Compare diverged .meta.js files in a human readable way 2018-03-19 18:04:33 +03:00
Alexey Tsvetkov
1cd2abf76f Fix comparing directories after IC test
A directory-after-rebuild should correspond to expectedDir parameter,
a directory-after-IC should correspond to actualDir parameter.
Also we should not forgive extra directories.
2018-03-19 18:04:33 +03:00
Alexey Tsvetkov
d95abf2234 Generate meta info in JS IC tests 2018-03-19 18:04:33 +03:00
Alexey Tsvetkov
1d87aaf3d6 Avoid serializing JS metadata twice per compilation 2018-03-19 18:04:33 +03:00
Alexey Tsvetkov
ebb774b0ee Sort package fragments by fq-name for JS serialization 2018-03-19 18:04:33 +03:00
Alexey Tsvetkov
1fd0e5e50c Optimize serializing JS metadata
This makes JS IC tests twice as fast
2018-03-19 18:04:33 +03:00
Alexey Tsvetkov
89275410a6 Avoid reading JS libraries twice per compilation 2018-03-19 18:04:33 +03:00
Alexey Tsvetkov
ba60ca468c Improve JS inliner performance 2018-03-19 18:04:32 +03:00
Ilya Chernikov
0e5c5af727 Add asm sources into idea sdk sources on the sdk preparation
restores navigation to asm sources in idea.
The asm sources could not be added separately, due to the gradle issue
https://issues.gradle.org/browse/GRADLE-3210
2018-03-19 15:47:19 +01:00
Alexey Tsvetkov
30d0cc3a34 Ensure all output directories are cleared on IC rebuild
In some cases IC needs to perform a rebuild.
Before this change IC was not clearing output directories
besides destination dir for classes, so for example
kapt stubs were not cleared.

Stalled stubs might lead to compile errors.
For example:
1. foo/XGen.java is generated from annotated class foo/X (XGen also
references X).
2. foo/X is moved to bar/X and some other change forces IC to rebuild.
3. kapt generates bar/X stub, but foo/X stub
was not removed because stubs dir is not cleared.
4. kapt runs annotation processors, foo/XGen.java is generated from
foo/X stub, bar/XGen.java is generated from bar/X stub.
5. kotlinc rebuilds. Since destination dir is cleared properly,
only bar/X.class exists.
6. javac tries to compile foo/XGen and fails, because it
compiles against actual Kotlin classes, not stubs.

This commit fixes the issue by passing all output directories
of a task from Gradle to Kotlin IC.

   #KT-21735 fixed
2018-03-19 17:39:47 +03:00
Alexey Tsvetkov
afce075dc8 Fix unresolved references in kotlin-gradle-plugin in Idea 2018-03-19 17:39:47 +03:00
Ilya Chernikov
d6792f5f52 Implement support for additional compiler arguments for scripts in IDE
fixes #KT-19120
2018-03-19 11:45:10 +01:00
Ilya Chernikov
643e81f0ae Refactor language feature settings processing for exposing it outside of the CLI compiler 2018-03-19 11:45:09 +01:00
Natalia Selezneva
58edab37c1 Add test for fatal severity in scripts 2018-03-19 09:41:38 +03:00
Natalia Selezneva
f957b3072b Add FATAL severity to ScriptExternalHighlightingPass 2018-03-17 00:28:34 +03:00
Natalia Selezneva
dcea9d0cd5 Add FATAL severity to script dependencies resolve result 2018-03-17 00:23:57 +03:00
Natalia Selezneva
82481b48c4 Restore old package for ScriptTemplatesProvider.
Note that this is EP used in another plugins (ex. LivePlugin https://plugins.jetbrains.com/plugin/7282-liveplugin)
2018-03-17 00:21:32 +03:00
Natalia Selezneva
1f75eaed9a Don't highlight gradle scripts during gradle import.
Show warning on the top panel for these files
2018-03-17 00:21:25 +03:00
Natalia Selezneva
5f1118e820 Don't highlight scripts if resolver returns Failure.
Note that we don't highlight script when ScriptDependenciesFileAttribute is not set.
2018-03-17 00:21:17 +03:00
Natalia Selezneva
4b4acfee2c Scripts: display errors from external resolver in panel if text range is empty 2018-03-17 00:21:10 +03:00
Natalia Selezneva
26a4b67fa3 Introduce default ScriptTemplate for Gradle scripts
^KT-23228 Fixed
2018-03-17 00:21:02 +03:00
Natalia Selezneva
9f02664351 Minor: reformat 2018-03-17 00:20:55 +03:00
Vyacheslav Gerasimov
042873fa2c Build: add maven.repository.mirror property
May be used to add additional repository to all projects

(cherry picked from commit d8407b9)
2018-03-16 20:07:31 +03:00
Nikolay Krasko
79d9ea6716 Check module is from given set of modules before passing it to callbacks
`module` variable is fetched from `moduleInfoByDescriptor`, and this map
is filled in `createModuleDescriptor`, witch is called in
`doGetDescriptorForModule` only for modules from the given set.
2018-03-16 18:19:52 +03:00
Nikolay Krasko
7f501e3a78 Minor: document fields usages in ResolverForProjectImpl 2018-03-16 18:03:21 +03:00
Nikolay Krasko
03459eb808 Protect resolverByModuleDescriptor collection with storageManager lock
Read access from isResolverFromModuleDescriptorComputed was exposed through
DelegatingPackageFragmentProvider.
2018-03-16 16:40:38 +03:00
Nikolay Krasko
9145470f79 Minor: remove "JVM" constant usages in multi target platform 2018-03-16 16:40:38 +03:00
Nikolay Krasko
34569c2541 Minor: hasTopLevelCallables rename 2018-03-16 16:40:37 +03:00
Nikolay Krasko
14a0434737 Remove reference to binding context from LazyLightClassDataHolder cache
The ultimate goal is to remove references to binding context and resolve
result from light classes. There still can be references from `diagnostics`
field, but `bindingContext` is unneeded and can be removed.

Relates to snapshots from IDEA-187395.
2018-03-16 16:40:37 +03:00
Nikolay Krasko
481a5bc28d Update JUnit3RunnerWithInners.java for Gradle 4.6 (KT-23292)
Update after "Executer -> Executor" rename
3f1487e800

 #KT-23292 Fixed
2018-03-16 16:40:37 +03:00
Yan Zhulanow
e2ed77354f Pill: Update module structure, add missing modules metadata and metadata.jvm 2018-03-16 16:31:55 +03:00
Ilmir Usmanov
826d667398 Remove redundant locals
Do not transform already transformed suspend lambdas
Ignore duplicates of continuation in local variable table during redundant locals elimination.
2018-03-16 16:26:14 +03:00
Ilmir Usmanov
81f3e39f29 Do not generate ACONST_NULL as continuation of crossinline suspend lambda 2018-03-16 16:26:13 +03:00
Ilmir Usmanov
6b7173ba13 Forbid default inline/crossinline suspend parameters 2018-03-16 16:26:12 +03:00
Ilmir Usmanov
7224b99928 Add intention to remove suspend from parameter on suspend inline function 2018-03-16 16:26:11 +03:00
Ilmir Usmanov
6854135077 Support crossinline suspend lambda as parameter of inline function
Use fake continuation instead of ALOAD 0 while inlining
Do not generate state machine for inner lambdas and inner objects,
which capture crossinline suspend lambda.

 #KT-19159: Fixed
2018-03-16 16:26:11 +03:00
Ilmir Usmanov
042ca55be7 Do not generate suspension points for crossinline lambdas 2018-03-16 16:26:10 +03:00
Ilmir Usmanov
e6a353e590 Remove returns unit markers in suspend lambdas 2018-03-16 16:26:09 +03:00
Ilmir Usmanov
e169383f76 Fix problem with transforming suspend lambda instantiation by itself
#KT-21605: Fixed
2018-03-16 16:26:09 +03:00
Svyatoslav Scherbina
f3bc8d179c Add one more IR text test case 2018-03-16 14:47:20 +03:00
Svyatoslav Scherbina
aac940415f Fix psi2ir when type parameter bound goes after the type parameter 2018-03-16 14:47:18 +03:00
Simon Ogorodnik
c0b0f6d1ca Extract PSI to separate module 2018-03-16 13:32:14 +03:00
Toshiaki Kameyama
55c93bc8b6 Fix NPE on conversion: run/apply with explicit signature -> let/also
So #KT-22949 Fixed
2018-03-16 12:17:24 +03:00
Toshiaki Kameyama
f93b21eaa2 Fix "Add function to supertype" braces #KT-23215 Fixed 2018-03-16 12:11:26 +03:00
Alexander Udalov
404bcc58e5 Update bootstrap to 1.2.40-dev-967 2018-03-15 20:47:35 +01:00
Alexander Udalov
4484335eac Update light classes test data after d0ed0c4049 2018-03-15 18:23:16 +01:00
Alexander Udalov
a23af6306c Update test data of log tag consistency test on lint
The reason is that UastUtils.tryResolveNamed (in
LogDetector.checkTagConsistent) started to refer to the field of the
property in the companion after d0ed0c4049 instead of its getter
2018-03-15 18:19:43 +01:00
Denis Zharkov
21932b5824 Use mockJDK as a bootClasspath for AbstractCompileKotlinAgainstJavaTest
Otherwise JAVA_HOME is being used that lead to test result depending
on minor JDK version used on a computer

 #KT-21047 Fixed
2018-03-15 19:00:31 +03:00
Denis Zharkov
1766812bf3 Minor. Reformat AbstractCompileKotlinAgainstJavaTest 2018-03-15 19:00:31 +03:00
Denis Zharkov
c334f46825 Avoid retaining reference to ProtoBuf.Package in JvmPackagePartSource
Otherwise, 2e933a165a doesn't help
2018-03-15 18:59:44 +03:00
Denis Zharkov
4b78abaa7a Minor. Reformat JvmPackagePartSource 2018-03-15 18:59:44 +03:00
yukuku
6f6b0baf3b Fix wrong example on the docs of @PurelyImplements 2018-03-15 18:56:26 +03:00
Alexey Tsvetkov
baa20e2677 Ensure absolute paths are written to module xml file
Since d0ca0dca2b
first IC build uses CompilationMode.Rebuild instead of Incremental
to avoid unnecessary work (computing API difference etc.).

However there is a branch that does not transform source files
paths to absolute ones before writing them to module xml file.

In our plugins we have always transformed files to absolute ones before
passing them to IncrementalJvmCompilerRunner, so there is no problem.

But third party build systems could pass relative paths to IncrementalJvmCompilerRunner
(namely Kobalt does so).
It turned out to break builds because KotlinToJVMBytecodeCompiler takes
module xml file's (which is a temporary file itself) parent as a base
for relative source files (see KotlinToJVMBytecodeCompiler.getAbsolutePaths).

This change ensures that makeModuleFile always uses absolute files.

    #KT-22542 fixed
2018-03-15 18:06:13 +03:00
Anton Bannykh
e377a30929 Use mocha instead of QUnit for debugging stdlib tests in browser 2018-03-15 17:54:17 +03:00
Anton Bannykh
338bde23fc JS stdlib: run kotlin.test library tests 2018-03-15 17:54:17 +03:00
Vyacheslav Gerasimov
f0ec073bf6 Build: Include ultimate projects only if intellijUltimateEnabled 2018-03-15 16:35:20 +03:00
Vyacheslav Gerasimov
ef018d2ac1 Make dependencies on Android gradle plugin non-transitive
com.android.tools.build:gradle brings about 50 unused transitive dependencies including idea-core and uast, sometimes it breaks IDE features like navigation to declarations and debugging.

Inline contents of ReflectionUtil.findMethod to remove dependency on idea-core
2018-03-15 15:20:22 +03:00
Anton Bannykh
04cbea4956 JS: fix Long constant translation (KT-19228 fixed) 2018-03-15 14:58:10 +03:00
Alexey Sedunov
b7d79cc146 Gradle: Do not resolve sourcesets in projects with Android module 2018-03-15 13:17:43 +03:00
Denis Zharkov
e1c29ad3fd Regenerate tests for androidx support annotations 2018-03-15 10:34:33 +03:00
Denis Zharkov
7d8e7f481d Add a reference to third-party/annotations/androidx in license 2018-03-15 10:34:33 +03:00
Jake Wharton
b22f051edb Add support for nullability annotations in androidx package. 2018-03-15 10:34:33 +03:00
Toshiaki Kameyama
a3b35cbfe0 Reformat: ConvertToStringTemplateIntention 2018-03-15 10:32:07 +03:00
Toshiaki Kameyama
66906e2c80 Process '$' correctly in "Convert concatenation to template"
So #KT-12226 Fixed
2018-03-15 10:29:58 +03:00
Alexey Belkov
3b2bbee595 Standardize and improve descriptions of intentions/inspections 2018-03-15 09:56:47 +03:00
Nikolay Krasko
bc7ccbc39b Fix stub mismatch for top level declaration with JvmPackageName (KT-21831)
ClassId stores jvm name and it differs from kotlin name in that case.

 #KT-21831 Fixed
2018-03-14 21:16:58 +03:00
Toshiaki Kameyama
c1f43558b9 Unwrap: function parameter (KT-14788)
#KT-14788 Fixed
2018-03-14 21:16:58 +03:00
Ilya Chernikov
6838873a93 Fix local build problem - task compileJava not found
The problem is happening because our plugin deletes the task from
common projects, which may lead to such errors. The proper fix is
planned in our gradle plugin.
2018-03-14 15:39:30 +01:00
Ilya Chernikov
755f05e669 Switch to gradle 4.6 2018-03-14 15:39:30 +01:00
Ilya Chernikov
07b82ff1cc Fix noDefaultJar helper - remove the disabled jar from archives
before this fix switching to the gradle 4.6-rc1 caused the problem on
local publish task - kotlin-compiler.jar not found
2018-03-14 15:39:30 +01:00
Mikaël Peltier
d0ed0c4049 KT-14258 Optimize accesses to properties defined into companion
- Use direct access to property defined into companion object when
it is possible rather than always use an accessor to access the
property.
- Use direct access will speedup runtime performance.
- Avoid to generate useless accessors for companion properties.

Fix of https://youtrack.jetbrains.com/issue/KT-14258
2018-03-14 15:30:40 +01:00
Anton Bannykh
fd244be9ca JS: add tests to make sure KT-22019 is fixed 2018-03-14 17:15:16 +03:00
Natalia Selezneva
a5ac8abc7c Run Script Action should add script dependencies to classpath 2018-03-14 16:09:03 +03:00
Natalia Selezneva
7d76554966 Run script action in IDE should use kotlin compiler from plugin
^KT-22647 Fixed
2018-03-14 16:08:57 +03:00
Natalia Selezneva
2486be0f86 'Configure kotlin' should set 1.2-SNAPSHOT version in build.gradle for snapshot version of kotlin plugin 2018-03-14 16:08:33 +03:00
Mikhael Bogdanov
cdcb651c8e Get rid of 'BRIDGE' flag on $default functions 2018-03-14 13:57:49 +01:00
Zalim Bashorov
ac5ef57876 Regenerate tests 2018-03-14 15:06:35 +03:00
Zalim Bashorov
055b900d8a Add generating tests using "whitelist" of target backend; add new target backends: JS_IR and JVM_IR 2018-03-14 15:06:31 +03:00
Zalim Bashorov
82f41a1125 J2K TargetBackend 2018-03-14 15:06:31 +03:00
Zalim Bashorov
9970dd051f Fix copyright's start year in generated tests 2018-03-14 15:04:58 +03:00
Zalim Bashorov
814be1810c Don't write copyright to *.gradle.kts and *.gradle files 2018-03-14 15:04:57 +03:00
Zalim Bashorov
c0ce3f849d Fix copyright's start year 2018-03-14 15:04:57 +03:00
Alexander Udalov
e21c73229c Throw exceptions explicitly in protoTypeTableUtil
Previously, if both type and typeId messages were missing (for example,
ProtoBuf.Function.returnType/returnTypeId) because of some bug, the
behavior was unpredictable because a type with id 0 from the type table
would be returned, which could be a completely irrelevant type. This is
an incorrect situation and we should report a diagnostic instead.
Temporarily throw an exception instead, since this only affects how the
compiler works on bad metadata
2018-03-14 12:25:23 +01:00
Alexander Udalov
0a78fe8ae3 Move some serialization helpers to metadata/metadata.jvm 2018-03-14 12:25:22 +01:00
Alexander Udalov
779290be0c J2K Interner: convert and prettify 2018-03-14 12:25:22 +01:00
Alexander Udalov
bda7514b43 J2K Interner: rename .java -> .kt 2018-03-14 12:25:21 +01:00
Alexander Udalov
acf357e9b5 Extract descriptor-related behavior in StringTable to separate interface
Descriptor-related code is only needed to be able to compute
"replacement" names for local classes, which are different in JVM and JS
2018-03-14 12:25:20 +01:00
Alexander Udalov
043f4c3d01 Increase patch number of metadata versions
After adding inline classes in 915455ebe9
2018-03-14 12:25:19 +01:00
Alexander Udalov
407de206a3 Minor corrections in proto schemas, mostly in comments
Also set up code style for the protobuf plugin
2018-03-14 12:25:19 +01:00
Alexander Udalov
9d8d4b837b Minor, move JavaFlexibleTypeDeserializer.id to JvmProtoBufUtil
To be able to read platform types with metadata.jvm
2018-03-14 12:25:18 +01:00
Alexander Udalov
241673c6a1 Add forgotten SinceKotlin to Metadata.pn
kotlin.Metadata is internal, so it shouldn't have any visible effect
2018-03-14 12:25:17 +01:00
Alexander Udalov
3f3e05a9d2 Move essential metadata-related classes to 'metadata' and 'metadata.jvm' 2018-03-14 12:25:16 +01:00
Alexander Udalov
88dea9aa70 Move NameResolver to module 'metadata' and J2K
Also move NameResolverImpl to 'metadata' and JvmNameResolver to
'metadata.jvm'
2018-03-14 12:25:16 +01:00
Alexander Udalov
0ba42850f9 Drop ClassData and PackageData, rename ClassDataWithSource -> ClassData
Use pairs in JvmProtoBufUtil for simplicity
2018-03-14 12:25:15 +01:00
Alexander Udalov
5ed5ac8291 Minor, use stdlib instead of ifEmpty 2018-03-14 12:25:14 +01:00
Alexander Udalov
a5a69c5099 Remove dependency of ClassMapperLite on JavaToKotlinClassMap
There are two reasons for this. First, this class will be used in the
metadata reading library which should not have dependencies on lots of
compiler stuff JavaToKotlinClassMap depends on.

Second, it was easy to accidentally break the deserialization in old
compilers by adding another mapping to JavaToKotlinClassMap. This was
possible because ClassMapperLite is used to decide whether or not the
JVM signature is "trivial" and should be written to the metadata (at
JvmSerializerExtension.SignatureSerializer.requiresSignature). If the
signature is trivial but mentions a type added in JavaToKotlinClassMap
in the new compiler, the old compiler will not be able to load the
signature correctly. See the comment on ClassMapperLite for more
information
2018-03-14 12:25:14 +01:00
Alexander Udalov
070effc69d Minor, drop unnecessary ClassDescriptor.classId implementation 2018-03-14 12:25:13 +01:00
Alexander Udalov
b07c6086cd Remove dependency of NameResolverImpl on FqName
Remove AbstractJsProtoComparisonTest.getProtoData in favor of
(apparently copy-pasted) IncrementalJsCache.getProtoData
2018-03-14 12:25:12 +01:00
Alexander Udalov
4f81e572c7 Make NameResolver.getName extension instead of member
To get rid of dependency of NameResolver on Name
2018-03-14 12:25:11 +01:00
Alexander Udalov
e31f286444 Make NameResolver.getClassId extension instead of member
To get rid of dependency of NameResolver on ClassId
2018-03-14 12:25:11 +01:00
Alexander Udalov
27ad4f7d5d Move ProtoBuf classes to package org.jetbrains.kotlin.metadata 2018-03-14 12:25:10 +01:00
Alexander Udalov
575a388b11 Move core protobuf schemas to 'metadata' and 'metadata.jvm' 2018-03-14 12:25:09 +01:00
Alexander Udalov
368af867b8 Add modules metadata and metadata.jvm 2018-03-14 12:25:08 +01:00
Alexander Udalov
54d6710923 Regenerate gradle/project-schema.json 2018-03-14 12:25:07 +01:00
Alexander Udalov
99964cd030 Move descriptor-related utilities from Flags to ProtoEnumFlags 2018-03-14 12:25:07 +01:00
Alexander Udalov
ec67a878a0 Minor, rename Deserialization -> ProtoEnumFlags
Also fix warnings and remove unneeded JvmStatic
2018-03-14 12:25:06 +01:00
Alexander Udalov
7e1b1db7cc Minor, don't use BitEncoding where it's not necessary 2018-03-14 12:25:05 +01:00
Alexey Tsvetkov
ceb243c096 Don't pack kotlin-daemon-client and daemon-common into kotlin-compiler-runner jar 2018-03-14 13:29:32 +03:00
Alexey Tsvetkov
c736f229ce Always depend on runtimeJar of kotlin-daemon-client 2018-03-14 13:29:32 +03:00
Sergey Igushkin
0039be6972 Fix binary incompatibility with Android Gradle plugin 3.2.0-alpha06
Remove a non-reflective usage of the ResourceSet class, which has been
moved to a different package between versions. Access it through
reflection instead. This is a workaround. We can introduce a proper
fix once we have a public API in the Android plugin.

The test case that could detect the compatibility issue is
`testAndroidExtensionsManyVariants` (it uses experimental Android
extensions), but we did not run it with 3.2.0-alpha6. This commit
adds a test class with the same tests for 3.2.0-alpha6.

Issue #KT-23192 Fixed
2018-03-14 04:11:35 +03:00
Alexey Tsvetkov
3a7a34cc4e Add all necessary compile dependencies to 'pill:generate-all-tests'
Before this change running the pill:generate-all-tests:testClasses
task (which is run by Intellij on "Build" invocation) led to compile error
2018-03-13 21:26:28 +03:00
Alexey Tsvetkov
0deec7983d Revert "Provide custom ConstantAffectionResolver in JPS"
This reverts commit 772a935de6.

The API in Intellij was changed, now the issue can be fixed only in
182.* branches.
2018-03-13 21:26:11 +03:00
Vyacheslav Gerasimov
d831d35869 Add readme for including kotlin-compiler into composite build 2018-03-13 18:29:26 +03:00
Vyacheslav Gerasimov
0e879896e0 Add include/kotlin-compiler project
Needed to include kotlin compiler project into a composite build (kotlin native + cotlin compiler)
2018-03-13 18:29:24 +03:00
Vyacheslav Gerasimov
361e8e065c Remove unused xpp3 & xstream from IntellijCoreDependencies
They are 'fatjared' into kotlin-compiler but proguard removes them from resulting jar afterwards
2018-03-13 17:50:15 +03:00
Nikolay Krasko
7174b31756 Fix GradleConfiguratorTest.kt compilation 2018-03-13 17:42:40 +03:00
Nikolay Krasko
48f2fd8607 Add explicit set of supported file types to KotlinPositionManager 2018-03-13 15:52:21 +03:00
Nikolay Krasko
674fbc9871 Process dependencyManagement during stdlib-jre* deprecation check (KT-21745, KT-23161)
#KT-23161 Fixed
 #KT-21745 Fixed
2018-03-13 15:52:20 +03:00
Nikolay Krasko
57aaf0444f Add support for "implementation" gradle directive (KT-21746)
#KT-21746 Fixed
2018-03-13 15:52:19 +03:00
Nikolay Krasko
9004cdfa45 Reformat: idea-gradle module 2018-03-13 15:52:18 +03:00
Denis Zharkov
cff88a3f8b Fix false positive unreachable code in case of Nothing!-typed calls
Note, that this change potentially has some other effects in corner cases
(like the changed test data that is rather sensible because `bar`
in the example is not effectively projected out and can be called
with nulls)

Probably, we need to consider rewriting all other isSomeType methods
in KotlinBuiltins, but now it seems to be a rather dangerous change

 #KT-16424 Fixed
2018-03-13 14:40:05 +03:00
Denis Zharkov
a7854bc0ce Fix SAM detection algorithm for case of default overrides
#KT-22652 Fixed
2018-03-13 14:39:35 +03:00
Dmitry Jemerov
b4fb0e0305 Further reduce number of calls to getConfigurableModulesWithKotlinFiles
Also handle INRE and requeue check
2018-03-13 12:29:16 +01:00
Dmitry Jemerov
a29d693dc5 Fix inverted logic of isNotConfiguredNotificationRequired 2018-03-13 12:29:16 +01:00
Dmitry Jemerov
fa39cec94b Avoid duplicate scan of modules with Kotlin files (KT-23183) 2018-03-13 12:29:16 +01:00
Alexey Sedunov
1be33b91fa MPP: Do not report ACTUAL_WITHOUT_EXPECT if compatibility is null for all modules
This fixes diagnostic tests
2018-03-13 14:18:36 +03:00
Sergey Igushkin
c0a17f72a7 Fix bad property name introduced in the fix for #KT-23085 2018-03-13 14:17:12 +03:00
Simon Ogorodnik
48fb3db7ba Fix inserting variable name suggestion on non-enter char typing
#KT-21933 fixed
2018-03-13 12:51:29 +03:00
Mikhail Glukhikh
d5d9aa0329 GotoSuperActionHandler: minor refactoring 2018-03-13 10:58:24 +03:00
Mikhail Glukhikh
ab30275f14 Navigation: add expect declarations as supers #KT-16892 Fixed 2018-03-13 10:40:54 +03:00
Mikhail Glukhikh
849f9fc5c1 Navigation: add actual declarations as implementations (KT-16892) 2018-03-13 10:40:52 +03:00
Ilya Gorbunov
3530d9b4c7 Download org.jetbrains:markdown:0.1.25 from bintray 2018-03-13 09:50:10 +03:00
Svyatoslav Scherbina
d3ab86db48 Fix access to scoped symbol table when inserting implicit casts to IR 2018-03-13 09:46:32 +03:00
Dmitry Petrov
d38258d7a0 Use specified comparison generator for chars in optimized ranges
Otherwise if Char value is a result of some erased generic call,
coercing it to I (primitive int) causes CCE at run-time.

 #KT-23104 Fixed Target versions 1.2.40
2018-03-13 09:34:10 +03:00
Ilya Gorbunov
2891a6c954 Do not use java.home system property to locate JDK dependencies
It may point either to JDK/bin or to JRE/bin. Instead use JDK_16 and JDK_18 paths.
2018-03-13 08:52:15 +03:00
Ilya Gorbunov
6955cabbba Improve KPropertyN documentation
Provide missing documentation for Getter and Setter of KProperty1/2.
Fix the link to the 'getExtensionDelegate' extension.
2018-03-12 23:17:38 +03:00
Sergey Igushkin
07b811460a Deal with unnamed Gradle inputs/outputs
Fix the only unnamed input added to a Gradle task at runtime.
Add a test that checks for unnamed task inputs.

Issue #KT-23085 Fixed
2018-03-12 21:54:03 +03:00
Alexey Tsvetkov
97700316f5 Replace compileOnly with testCompileOnly in :generators
In Gradle testCompileOnly configuration does not extend compileOnly.

Since :generators project does not have main source set,
compileOnly dependencies have never worked.

Instead "kotlin-reflect" was resolved transitevely trough
:compiler:frontend.script module (a runtime dependency becomes
a compile transitive dependency).

In ccd6263787 I replaced `runtime` dependency
on "kotlin-reflect" with `runtimeOnly` breaking `:generators:compileTestKotlin`.
2018-03-12 20:07:31 +03:00
Sergey Igushkin
32df9c00ee Update literals in the grammar reference
Add missing long literal suffix
Add binary integer literals
Introduce IntegerLiteral lexer rule, which is closer to the actual lexer

Issue #KT-22713 Fixed
2018-03-12 18:02:22 +03:00
Sergey Igushkin
41044cd277 Fix the rule for valueArguments 2018-03-12 18:02:08 +03:00
Alexey Belkov
4b5b9b40e7 Grammar: Fix "object" rule (KT-22676) 2018-03-12 18:02:08 +03:00
Alexey Belkov
d98c454806 Grammar: Fix "LabelName" rule (KT-22676) 2018-03-12 18:02:08 +03:00
Alexey Belkov
4ffd4f8060 Grammar: Fix "labelDefinition" rule in precedence table (KT-22676) 2018-03-12 18:02:08 +03:00
Alexey Belkov
2b9f26a0da Grammar: Fix "functionType" rule (KT-22676) 2018-03-12 18:02:08 +03:00
Alexey Belkov
d0f3001fd5 Grammar: Fix "optionalProjection" rule (KT-22676) 2018-03-12 18:02:08 +03:00
Alexey Belkov
d6496814b2 Grammar: Fix "enumEntry" rule (KT-22676) 2018-03-12 18:02:08 +03:00
Alexey Belkov
8f88bc0a3c Grammar: Fix broken link (KT-22676) 2018-03-12 18:02:08 +03:00
Alexey Belkov
3cb952df5d Grammar: Add terminating semicolons (KT-22676) 2018-03-12 18:02:08 +03:00
Alexey Belkov
6fa87f98ca Grammar: Improve wording (KT-22676) 2018-03-12 18:02:08 +03:00
Alexey Belkov
c0866e7ba2 Grammar: Fix rule headings in section "Lexical structure" (KT-22676) 2018-03-12 18:02:08 +03:00
Alexey Tsvetkov
e8f8488d54 Add diagnostic task to print all shadow jars in compile classpaths 2018-03-12 17:31:11 +03:00
Alexey Tsvetkov
ccd6263787 Use runtimeOnly dependency in kotlin-reflect
"kotlin-reflect" is a shadow jar which breaks incremental compilation
to avoid non-incremental builds, project should add
* `compileOnly` dependency on ":kotlin-reflect-api"
* `runtimeOnly` dependency on ":kotlin-reflect"
* `runtime` dependency is not recommended because it leaks into compile
* classpath
through transitive dependencies
2018-03-12 16:09:04 +03:00
Pavel V. Talanov
dc27a3f6d0 Minor: lightClassUtils, less specific return type 2018-03-12 12:05:08 +01:00
Pavel V. Talanov
32516a3f33 Refactor: split *LightClassGenerationSupport into separate files
Move cli binding trace implementation to top level
2018-03-12 12:05:05 +01:00
Pavel V. Talanov
f421181e16 Split LightClassGenerationSupport into separate entities
LightClassGenerationSupport:
    Includes utilities related to generating light classes
    Primary client of this service are KtLight* implementation classes
KotlinAsJavaSupport:
    Provides APIs to transform kotlin code into Psi* entities
    Primary client of this service is JavaElementFinder
2018-03-12 12:04:59 +01:00
Ilya Gorbunov
62d409a9ba Use dex-method-list:3.0 from maven central
Update changed API usages and reformat code according to code style.
2018-03-09 19:39:42 +03:00
Mikhael Bogdanov
95a7e6c2d5 Minor.Reformat 2018-03-08 11:50:09 +01:00
Mikhael Bogdanov
c1c8660e55 Don't try to transform sam wrappers in same module
#KT-22304 Fixed
2018-03-08 11:50:08 +01:00
Mikhail Glukhikh
2a6f1d7731 Regenerate tests 2018-03-07 19:24:56 +03:00
Mikhail Glukhikh
cc5821382c Compilation fix 2018-03-07 19:15:17 +03:00
Mikhail Glukhikh
71a6827b1c MPP wizard step refactoring: use UI layout DSL 2018-03-07 19:07:56 +03:00
Mikhail Glukhikh
ea4b04780c MPP wizard fix: remove non-existing modules from settings.gradle 2018-03-07 19:07:56 +03:00
Mikhail Glukhikh
1d0c5413de MPP wizard: add combobox selecting common module position + extra checks
So #KT-23097 Fixed
2018-03-07 19:07:55 +03:00
Mikhail Glukhikh
879779ec0d MPP wizard: take default JDK from default project template
Related to KT-23097
2018-03-07 19:07:55 +03:00
Mikhail Glukhikh
4f2701385d MPP wizard: set sourceCompatibility / jvmTarget for JVM module
Related to KT-23097
2018-03-07 19:07:55 +03:00
Alexey Sedunov
d9aa1796cd MPP: Support multiple 'expectedBy' dependencies for single module
#KT-22865 Fixed
2018-03-07 18:34:03 +03:00
Toshiaki Kameyama
e3a69d118f Disable "Add labeled return" for suspend lambdas #KT-23126 Fixed 2018-03-07 16:10:44 +03:00
Toshiaki Kameyama
5d1f5d9bca "Remove redundant 'if'" now works correctly with labeled return
So #KT-23109 Fixed
2018-03-07 16:01:38 +03:00
Toshiaki Kameyama
733cb42ced Make implicit this inspection work for lambda invocation #KT-22970 Fixed 2018-03-07 15:58:23 +03:00
Toshiaki Kameyama
a87f652591 Reformat intentions/Utils 2018-03-07 15:41:39 +03:00
Toshiaki Kameyama
dd4ceb8c0f Move getCallableDescriptor function declaration to Utils 2018-03-07 15:41:07 +03:00
Toshiaki Kameyama
f48eacfbd4 Add inspection (INFORMATION) to convert Pair constructor into to call
So #KT-22933 Fixed
2018-03-07 15:40:19 +03:00
Toshiaki Kameyama
963e430b42 Make "Add annotation target" available on use-site annotation
So #KT-22861 Fixed
So #KT-22862 Fixed
2018-03-07 15:33:28 +03:00
Mikhail Glukhikh
442a89bc6c ModuleDescriptor now sees internals of its expected by #KT-15739 Fixed 2018-03-07 13:58:31 +03:00
Mikhail Glukhikh
0c4c9251d6 Sort modifiers: process visibility & modality after others
Related to KT-22954
2018-03-07 13:57:16 +03:00
Toshiaki Kameyama
b9e7e8fca3 Sort modifiers: process final modifier correctly #KT-22954 fixed 2018-03-07 13:34:25 +03:00
Felix Guo
e88d5b2a76 Fix typo in README (#1547)
`qualify` -> `quality`
2018-03-07 10:37:40 +01:00
Dmitry Jemerov
81adbcb7e6 Support for implicit package prefixes
Now, if all Kotlin files directly under a source root have the same
package statement, it's used as an implicit package prefix for that
source root. It's honored by the package name/directory name mismatch
inspection and by new file creation actions;
support in refactorings is TODO.

 #KT-17306 Fixed
2018-03-07 10:31:57 +01:00
Yan Zhulanow
753319a89d Pill: Rewrite existing "idea.home.path" option if already set 2018-03-06 22:27:55 +03:00
Yan Zhulanow
799c0f28b7 Pill: Fix platform home directory (this fixes IDE tests) 2018-03-06 22:27:55 +03:00
Yan Zhulanow
d1a4acb81f Pill: Add "IDEA (No ProcessCancelledException)" run configuration 2018-03-06 22:27:54 +03:00
Yan Zhulanow
8e2ef6bedd J2K: Script Codegen (step 2) 2018-03-06 22:27:53 +03:00
Yan Zhulanow
7711624308 J2K: Script Codegen (step 1) 2018-03-06 22:27:51 +03:00
Yan Zhulanow
fa8a3b55f3 REPL, Refactoring: A number of trivial renames/moves 2018-03-06 22:27:51 +03:00
Yan Zhulanow
82c72f228a REPL, Refactoring, Minor: Lower property visibility 2018-03-06 22:27:50 +03:00
Yan Zhulanow
bceb138ed1 REPL, Refactoring: Get rid of nasty enum-like String literals 2018-03-06 22:27:49 +03:00
Yan Zhulanow
96dda8de6b REPL, Refactoring: Make ReplFromTerminal and ReplInterpreter not to implement ReplConfiguration 2018-03-06 22:27:48 +03:00
Yan Zhulanow
07363f2904 REPL, Refactoring: Replace strange callback function with an execution interceptor 2018-03-06 22:27:48 +03:00
Yan Zhulanow
b35676c1bd Minor: Delete an unused class 2018-03-06 22:27:47 +03:00
Yan Zhulanow
da35ded090 Minor: Add "repl" to dictionary 2018-03-06 22:27:46 +03:00
Yan Zhulanow
54251ddac0 REPL, Refactoring: Rename ReplErrorLogger to ReplExceptionReporter
ReplErrorLogger is not really a class that logs errors, ReplWriter exists for that purpose (I don't think ReplWriter has a good API as well, though). The only thing it does is that is passes exceptions got from the compiler to IDE. So, in my opinion, the old name is rather confusing and it doesn't describe what the class actually do.

Also rethrow exceptions explicitly.
2018-03-06 22:27:45 +03:00
Svyatoslav Scherbina
5abade0e32 Fix missing type parameters of property accessors in external IR stubs 2018-03-06 16:43:20 +03:00
Alexey Sedunov
e145a64d50 Rename: Forbid rename of synthetic declaration references
#KT-20241 Fixed
2018-03-06 15:15:44 +03:00
Alexey Sedunov
9761e33110 Refactor: Use RefactoringErrorHintException to report errors in test mode 2018-03-06 15:15:44 +03:00
Alexey Sedunov
df4c80f43a Shorten References: Allow import insertion when function and property have the same name
#KT-22745 Fixed
2018-03-06 15:15:44 +03:00
Alexey Sedunov
df4cd14161 Move: Relax private/protected visibility checks for usages in Java code 2018-03-06 15:15:43 +03:00
Alexey Sedunov
4fd221fc0c Rename: Filter out destructuring references to parameters
They shouldn't be renamed in any case

 #KT-15039 Fixed
2018-03-06 15:15:43 +03:00
Alexey Sedunov
85b381db7c Rename: Identify elements with the same origin when checking import ambiguity
#KT-13284 Fixed
2018-03-06 15:15:43 +03:00
Alexey Sedunov
6c17bbe42c Rename: Check redeclaration for local variables
Also add tests for other local declarations

 #KT-13255 Fixed
2018-03-06 15:15:42 +03:00
Alexey Sedunov
4609b2ae37 Navigation: Resolve typealiased SAM-references to type alias declaration
#KT-15302 Fixed
2018-03-06 15:15:42 +03:00
Alexey Sedunov
5bff4b9f39 Rename: Allow deleting name of companion object
#KT-20178 Fixed
2018-03-06 15:15:42 +03:00
Alexey Sedunov
0e3e387446 Rename: Adapt VariableInplaceRenameHandler to Kotlin
#KT-16510 Fixed
2018-03-06 15:15:42 +03:00
Alexey Sedunov
7149a0855a Rename: Use OverloadChecker for redeclaration conflict analysis
#KT-19561 Fixed
 #KT-22812 Fixed
 #KT-13907 Fixed
2018-03-06 15:15:41 +03:00
Alexey Sedunov
12d5a72697 Move: Show more accurate message when moving subclass of a sealed class
#KT-23065 Fixed
2018-03-06 15:15:41 +03:00
Alexey Sedunov
5f43bd56b4 Extract Function: Use 'public' visibility for function extracted from public inline
#KT-15228 Fixed
2018-03-06 15:15:41 +03:00
Alexey Sedunov
d690aedb89 References: Fix resolution of delegate reference for local variables
#KT-22229 Fixed
2018-03-06 15:15:40 +03:00
Alexey Sedunov
96de29dfcb Create from Usage: Support accessors for local delegated properties
#KT-19730 Fixed
2018-03-06 15:15:40 +03:00
Mikhail Glukhikh
2eddce57ff MPP wizard: add combo-box with JDK for JVM platform, if any
Related to KT-23097
2018-03-06 14:32:31 +03:00
Mikhail Glukhikh
2108634ddb MPP wizard: add check-boxes to create JVM / JS module
Related to KT-23097
2018-03-06 14:32:31 +03:00
Mikhail Glukhikh
cc8a2b3123 MPP wizard: add common module at the same level with platform ones
Related to KT-23097
2018-03-06 14:32:31 +03:00
Mikhail Glukhikh
720c84d1d6 Fix style: KotlinGradleMultiplatformWizardStep 2018-03-06 14:32:31 +03:00
Mikhail Glukhikh
fe7b7fb0bd Create actual fix: add empty brackets for classes in super-type lists
Related to KT-21082
2018-03-06 14:32:30 +03:00
Mikhail Glukhikh
ef3e0b01c4 Create actual fix: use target module instead of target platform 2018-03-06 14:32:30 +03:00
Mikhail Glukhikh
90e4413fc9 Create actual: put top-level actual declarations in the same file
When multiple expect declarations are in the same file,
and some of them already have actual declarations for this platform,
then "Create actual fix" put other declarations into the same file
with existing actual declarations

So #KT-17058 Fixed
So #KT-21082 Fixed
2018-03-06 14:32:30 +03:00
Mikhail Glukhikh
3ec2dac10b Create actual fix: reformat 2018-03-06 14:32:30 +03:00
Pavel V. Talanov
27d7bb595f CliLightClassGenerationSupport: correctly find facade files
This fixes a problem where JvmPackageName annotation could force file
    facades to be in the package different to declared kotlin package
2018-03-06 12:07:12 +01:00
Pavel V. Talanov
00ee5e3d16 Refactor: extract mapping package to files to a separate component
Make it extensible
2018-03-06 12:07:08 +01:00
Pavel V. Talanov
fae0f611a0 Test java resolve against kotlin file with JvmPackageName annotation 2018-03-06 12:07:07 +01:00
Pavel V. Talanov
498431311c Light classes: test "JvmPackageName" and actual declarations 2018-03-06 12:06:59 +01:00
Pavel V. Talanov
d2b90b84f8 KotlinFileStubForIde: save full facadeFqName
Prefix is not necessarily same as packageFqName since JvmPackageName was introduced
2018-03-06 12:05:53 +01:00
Nikolay Krasko
9e061555af Use anchor for element to avoid working with invalid element (KT-22631)
Element in constructor can be invalidated when dumb mode begins/ends.
Working with invalid elements can produce nodes without icons and bad
presentation.

 #KT-22631 Fixed
2018-03-06 13:04:26 +03:00
Nikolay Krasko
bb9933a8f9 Reformat: structureView package 2018-03-06 13:04:25 +03:00
Pavel V. Talanov
6c4537accc Create InvalidLightClassDataHolder for expect classes
This fixes an exception from duplicateJvmSignature reporter
Fixes "QuickFixTestGenerated$Override.testDontOfferToImplementMembersForExpectedClass" on teamcity
2018-03-05 18:07:38 +01:00
Pavel V. Talanov
89c82a85d0 Do not build light classes for expect classes
#KT-15482 Fixed
2018-03-05 18:07:36 +01:00
Toshiaki Kameyama
3f96e1dabc Move statement up/down fails for multiline declarations with lambdas (KT-21013)
#KT-21013 Fixed
2018-03-05 16:10:59 +03:00
Alexander Udalov
f41165c566 Minor, use elvis in deprecationUtil.kt 2018-03-05 13:43:10 +01:00
Alexander Udalov
e92e7c6f80 Do not report RequireKotlin-related diagnostics in snapshot compilers
Otherwise it's difficult to use a newly added API annotated with
RequireKotlin with the latest, not yet released, version.

For example, suppose there's a new function added in kotlin-stdlib,
since Kotlin 1.3, which requires 1.3 (Kotlin < 1.3 is supposed to report
an error on usages):

    @SinceKotlin("1.3")
    @RequireKotlin("1.3", COMPILER_VERSION, message = ...)
    fun foo() {}

Until Kotlin 1.3 is released, the latest available compiler in Maven has
the version 1.3-SNAPSHOT, which is _less_ than 1.3 according to Maven
rules which are used in getDeprecationByVersionRequirement. Therefore,
errors will be reported on usages of foo, and there's no Kotlin compiler
version which can be used to verify if the function works correctly,
which is inconvenient.

Since SNAPSHOT versions are effectively "pre-release" in a way, it's OK
for them to skip reporting these diagnostics
2018-03-05 13:39:13 +01:00
Alexander Udalov
bbaea6a062 Refactor deprecation by version requirement
- Get rid of ApiVersion in favor of MavenComparableVersion
- Don't crash on invalid versions in RequireKotlin
- Extract to a separate function
2018-03-05 13:39:13 +01:00
Nikolay Krasko
90802f2d7c Refactoring: remove ModuleResolverProvider, inline createModuleResolverProvider 2018-03-05 15:20:53 +03:00
Nikolay Krasko
de68607d5f Refactoring: move JavaResolveExtension.kt to util package 2018-03-05 15:20:53 +03:00
Svyatoslav Scherbina
7a2d761a7d Add minor improvements to psi2ir and IR utilities:
* Generate missing IR parameter declarations in external stubs
* Use origin = FAKE_OVERRIDE in external IR stubs for fake overrides
* Set .parent in external IR stubs
* Set .parent in IR generated by some utility methods
2018-03-02 15:41:48 +03:00
Dmitry Petrov
13a7270129 Generate type parameter declarations for property accessors
This requires "scoped" type parameter symbols, because in the ugly world
of descriptors property accessors have no type parameters of their own.
2018-03-02 14:35:35 +03:00
Dmitry Petrov
31996f1139 Update "defaultness" for property accessor with inherited visibility
Property accessor that overrides a non-default property accessor with
visibility different from the property visibility was incorrectly
considered "default". Corresponding metadata was written incorrectly,
and 'internal' setter call caused NSME

 #KT-23044 Fixed Target versions 1.2.40
2018-03-02 10:54:32 +03:00
Dmitry Petrov
8e8c5fae01 Minor: reformat code 2018-03-02 10:54:32 +03:00
Yan Zhulanow
6950c256ce Pill: Replace most of the hardcoded library coordinates with info from Gradle 2018-03-02 03:15:33 +03:00
Yan Zhulanow
6e65a4810e Make a project-wide embeddedComponents configuration for embedding external binaries to project artifacts 2018-03-02 03:15:32 +03:00
Yan Zhulanow
3c06dd7464 Pill, Minor: Move run configurations to the resources source set 2018-03-02 03:15:31 +03:00
Yan Zhulanow
3894afcf0b Pill, Minor: Remove the hardcoded repository, use the available utilities 2018-03-02 03:15:30 +03:00
Yan Zhulanow
b24d87f7ed Pill: Merge two "root" and "non-root" Pill plugins 2018-03-02 03:15:30 +03:00
Yan Zhulanow
3da479c1d5 Pill, Small: Pass libraries to 'parse()' directly 2018-03-02 03:15:29 +03:00
Yan Zhulanow
07ede20dc5 Pill: Import KotlinPlugin artifact 2018-03-02 03:15:28 +03:00
Yan Zhulanow
bc78d2c417 Pill: Move .iml files out of the module structure 2018-03-02 03:15:27 +03:00
Yan Zhulanow
4c12a4cb11 Pill: Add 'unpill' task 2018-03-02 03:15:25 +03:00
Yan Zhulanow
df88acaefd Get rid of test-to-production dependencies as it's not supported in plain IDEA projects 2018-03-02 03:15:24 +03:00
Yan Zhulanow
e7a2743dcf Pill: Add "Generate All Tests" run configuration 2018-03-02 03:15:23 +03:00
Yan Zhulanow
55164660a8 Pill: Attach asm sources 2018-03-02 03:15:22 +03:00
Yan Zhulanow
ad5a42459a Pill: Apply required changes to the default JUnit configuration on import 2018-03-02 03:15:21 +03:00
Yan Zhulanow
868ef262b8 Pill: Add JPS run configurations 2018-03-02 03:15:20 +03:00
Yan Zhulanow
a0c105adbe Fixes to make the project compile when using Pill 2018-03-02 03:15:19 +03:00
Yan Zhulanow
8dad2d30f5 Move the compiler.xml back to IDEA (this fixes almost all IDE tests when running on JPS) 2018-03-02 03:15:18 +03:00
Yan Zhulanow
34d1611ed4 Add Pill support to compiler and IDE modules 2018-03-02 03:15:17 +03:00
Yan Zhulanow
af60bcfb47 Initial Pill implementation
Pill is a Gradle-to-JPS model generator for compiler + compiler plugins + IDE project parts.
The generated project model does not know anything about Gradle and is fully operable using only JPS.
2018-03-02 03:15:16 +03:00
Yan Zhulanow
0ebcd0ad40 Remove inline function usages that break JPS compilation 2018-03-01 21:30:51 +03:00
Ilmir Usmanov
07ec704228 Fix modifiers generation for companion objects
when language verion is 1.3

 #KT-23002: Fixed
2018-03-01 20:03:26 +03:00
Alexey Sedunov
30314d43d9 Shorten Reference: Disable ${...} shortening inside completion insert handler 2018-03-01 17:41:10 +03:00
Mikhail Glukhikh
68757fff2e Downgrade "Type parameter can have ... variance" to INFORMATION level 2018-03-01 16:19:21 +03:00
Nikolay Krasko
a03470d151 Fix test data for JavaMethodUsedInKotlin.kt test after 173.3.4 update
- Ignore empty lines in actual test data
- Don't generate additional //INFO: in final file diff
2018-03-01 15:41:10 +03:00
Renaud Paquay
94ee78c0ca Hitting breakpoint in Kotlin sometimes doesn't work (KT-22205)
Fix KT-22205 and https://issuetracker.google.com/issues/71556313

Hitting breakpoints in Kotlin JUnit test with an Android Gradle
project sometimes(*) does not work in Android Studio 3.1 beta.

(*) The issue is related to various threads running concurrently
with "dumb" mode background code, so the issue reproduces only
on certain configurations.

In a nutshell, the issue is as follows

* On one hand, gradle build finishes, fires an event ("buildFinished")
  that is processed "later" and that causes the IDE to enter "dumb" mode
  for a shot amount of time (about 300-500 msec on a somewhat up to date
  multi-core computer).

* On the other hand, once the JVM of the debuggee is started, breakpoints
  need to be resolved (on the debugger thread, through a call to
  com.intellij.debugger.engine.CompoundPositionManager.createPrepareRequests.
  This code calls into the "KotlinPositionManager.createPrepareRequests",
  which in turns calls into "PerFileAnalysisCache.analyze". That method
  returns "AnalysisResult.EMPTY" is the project is in dumb mode.
  This return value prevents callers from successfully resolving
  the source location into a breakpoint.

Given that the 2 code paths above execute on separate threads without
explicit synchronization, the "failed to resolve breakpoint" issue
occurs sporadically, to the point it happens 100% of the time on
certain configuration.

The fix is so wrap the kotlin breakpoint resolution code inside
a "runReadActionInSmartMode" so that the debugger thread "waits"
for "dumb" mode to terminates before trying to resolve breakpoint
locations.

 #KT-22205 Fixed
2018-03-01 15:41:09 +03:00
Nikolay Krasko
b1bcadd762 Add mandatory dependency to com.intellij.modules.remoteServers
Android studio doesn't have this bundled module, so this should
prevent installing plugins for Intellij to AS.

This patch should be reverted in AS branches.
2018-03-01 15:41:07 +03:00
Egor Neliuba
715d5e90ba Clean up test skips after KT-17137
We need to clean these up since primitive array `is` checks work now

(cherry picked from commit b413e9ef51606c51ebfb21bd7ff646b0fb75470a)
2018-03-01 14:26:13 +03:00
Anton Bannykh
4a5e9bbc7f JS: remove -XtypedArraysEnabled flag (always true now) 2018-03-01 14:26:13 +03:00
Dmitry Savvinov
60aae55233 Update changelog for 1.2.30 2018-03-01 14:15:42 +03:00
Pavel V. Talanov
a6aea5625a Dsl completion: fix completion when multiple receivers are in scope 2018-02-28 19:48:45 +01:00
Ilya Chernikov
65af137117 (minor) Fix script templates from setting processing 2018-02-28 19:29:05 +01:00
Ilya Chernikov
a5278c2184 Get rid of PathUtil dependency in the script_util
reduces transitive dependencies required for the script_util
2018-02-28 19:29:05 +01:00
Ilya Chernikov
db7e06aaa4 Make dependencies to the script-runtime directly to the project...
instead to vie projectDist. With the current project bootstrap scheme a
dependency to the simply built script-runtime project via dist is not
needed anymore, but it breaks proper sources navigation in IDEA.
2018-02-28 19:29:05 +01:00
Nicolay Mitropolsky
fa1d2a891b KotlinLanguageInjector: getNameReference extracted to work with annotations 2018-02-28 17:19:46 +03:00
Nicolay Mitropolsky
08c41474af KotlinLanguageInjector: "kotlin" injections in annotations handled by injectWithCall 2018-02-28 17:19:46 +03:00
Nicolay Mitropolsky
fd4f4ef853 KotlinLanguageInjector: support for nested annotations (#KT-21753) 2018-02-28 17:19:46 +03:00
Mikaël Peltier
5c04264218 Remove unnecessary dependencies from AbstractBoundedValue
- Bounded value is a low-level abstraction for bounded ranges that is
used to generate specialized contains checks and for loop. It only
needs to contains StackValue that will be used to generate code.
- SimpleBoundedValue already have a constructor supporting StackValue
but having only one constructor avoid to pass extra argument that
will be used to only compute another information.
2018-02-28 15:20:03 +03:00
Anton Bannykh
ed80252ba8 JS: fix double compareTo behaviour for NaN and +-0 (KT-22723) 2018-02-28 15:01:58 +03:00
Alexander Podkhalyuzin
12c01ef80a Kotlin SDK auto-creation is disabled now #KT-23059 Fixed
(cherry picked from commit f5d8479)
2018-02-28 14:38:29 +03:00
Mikhail Glukhikh
0f029d8f51 Scope function conversion: remove 'can' from description to fix tests 2018-02-28 14:30:32 +03:00
Alexey Sedunov
d06f23f2ba Move: Fix replacement of non-code usages with backquoted names
#KT-13986 Fixed
2018-02-28 14:03:43 +03:00
Alexey Sedunov
a194eb94cf Remove Redundant Backticks: Fix inspection applicability
#KT-22804 Fixed
2018-02-28 14:03:43 +03:00
Alexey Sedunov
f65fe0dd5f Minor: Fix NPE
#KT-22724 Fixed
2018-02-28 14:03:43 +03:00
Alexey Sedunov
883558a4c7 Move/Copy: Fix 'protected' conflict reporting for references in super type entries
#KT-22678 Fixed
2018-02-28 14:03:43 +03:00
Alexey Sedunov
27f5ddcf83 Rename: Report redeclaration conflict between class and type alias
#KT-22751 Fixed
2018-02-28 14:03:42 +03:00
Alexey Sedunov
a341392524 Move: Search Java usages when top-level declaration moves to new facade
#KT-22747 Fixed
2018-02-28 14:03:42 +03:00
Alexey Sedunov
91fdc0e967 Move: Drop ${...} around shortened qualified expression
#KT-22692 Fixed
2018-02-28 14:03:42 +03:00
Alexey Sedunov
e63e48933d Move: Add import for top-level declarations moved to the default package
#KT-22661 Fixed
2018-02-28 14:03:42 +03:00
Alexey Sedunov
96132a686a Type Hierarchy: Support Kotlin class constructors
#KT-22925 Fixed
 #KT-22926 Fixed
2018-02-28 14:03:41 +03:00
Mikhail Glukhikh
66f3126b20 Scope function conversion: remove forced INFORMATION highlight type 2018-02-28 13:17:39 +03:00
Nicolay Mitropolsky
2f6fb4091b making LambdaArgument methods nullable
overridden `LambdaArgument.getArgumentExpression` removed because it is already nullable in parent

#EA-117013
2018-02-28 12:13:12 +03:00
Mikhail Glukhikh
664a25ce81 Polish KT-22011 inspection: message, level, group, range, etc. 2018-02-28 12:10:24 +03:00
Toshiaki Kameyama
7d6cb7805c Add inspection: Java mutator method used on immutable Kotlin Collections
In particular, fill, reverse, shuffle, sort calls are reported
So #KT-22011 Fixed
2018-02-28 11:52:44 +03:00
Mikhail Glukhikh
bec28c8388 Replace with for-each: add new-lines using comment saver
Related to KT-15858
2018-02-28 11:29:44 +03:00
Toshiaki Kameyama
7f880bf58c Replace with for-each: add new-line if necessary #KT-15858 Fixed 2018-02-28 11:18:21 +03:00
Dmitry Petrov
ae7f60a96e Update IR testData after rebase on master 2018-02-28 10:35:13 +03:00
Dmitry Petrov
b206bf199f Add type operand symbol for type operator expression 2018-02-28 10:35:13 +03:00
Dmitry Petrov
e89047d2cc Generate super classes and overridden functions in proper scope
Such references require proper scope so that local symbols are bound.
Example:

```
fun <T> outer() {
    abstract class ALocal<S : T> {
        abstract fun bar()
    }

    class Local<S : T> : ALocal<S>() {
        override fun bar() {}
    }
}
```

Here local classes have type parameters with upper bounds depending on
function type parameters, and members overriding members in other local
classes.
2018-02-28 10:35:13 +03:00
Dmitry Petrov
8fef0f0535 Make IrDeclaration#parent a var 2018-02-28 10:35:13 +03:00
Dmitry Petrov
02f01efaac Update testData 2018-02-28 10:35:13 +03:00
Dmitry Petrov
d29a47ec7f Generate references to superclasses 2018-02-28 10:35:13 +03:00
Dmitry Petrov
e5295d0f78 Generate references to overridden declarations as a separate pass
NB currently it relies on overriddenDescriptors in a FunctionDescriptor,
thus maybe incorrect for transformed declarations.
2018-02-28 10:35:13 +03:00
Dmitry Petrov
9570b64953 Add 'parent' to IrDeclaration, initialize it with a hack (for migration) 2018-02-28 10:35:13 +03:00
Mikhail Glukhikh
24622c0139 Fix two broken tests (missing actions) 2018-02-28 10:31:27 +03:00
Mikhail Glukhikh
dd106cb65c Add braces: use CommentSaver to save/restore comments
Related to KT-16332
2018-02-27 18:25:38 +03:00
Toshiaki Kameyama
4726b44371 Add braces to 'if' statement: save/restore comments correctly
So #KT-16332 Fixed
2018-02-27 18:25:22 +03:00
Mikhail Glukhikh
b436ee6e19 Replace some of RESOLVED_CALL & REFERENCE_TARGET usages to resolveToCall 2018-02-27 18:24:55 +03:00
Anton Bannykh
a7d980a890 JS: use Mocha + NodeJs instead of Karma + PhantomJs to run stdlib tests (again) 2018-02-27 16:41:00 +03:00
Mikhail Glukhikh
a3f88165cd Make add / remove labeled return: extract 'getParentLambdaLabelName'
Related to KT-20439
2018-02-27 14:47:11 +03:00
Mikhail Glukhikh
86e6f3c5e3 Make add / remove labeled return working for hierarchical blocks
Related to KT-20439
2018-02-27 14:47:10 +03:00
shiraji
59f6dc07cf Implement intention to add labeled return to last expression in a lambda
So #KT-20439 Fixed
2018-02-27 14:47:04 +03:00
shiraji
769e28519e Implement intention to remove labeled return from last lambda expression
So #KT-20439 Fixed
2018-02-27 14:46:50 +03:00
Nicolay Mitropolsky
35ce30aedc Uast: better reports for failed method conversions in KotlinUClass 2018-02-27 11:23:04 +03:00
Nicolay Mitropolsky
795516269d Uast: don't run resolve if not inside KtFile 2018-02-27 11:22:40 +03:00
Dmitry Petrov
8fbdf52d34 Chars are not promoted to Int on comparisons 2018-02-27 10:09:17 +03:00
Dmitry Petrov
4bb6c61a5a Don't generate enum entry initializers for 'expect enum class' 2018-02-27 10:08:12 +03:00
Nikolay Krasko
4c7e46cbf8 Support prefix and suffix in Kotlin injection with comments and annotations (KT-23005)
#KT-23005 Fixed
2018-02-26 18:42:59 +03:00
Nikolay Krasko
9026582352 Minor: rename file 2018-02-26 18:42:58 +03:00
Nikolay Krasko
c5fc195754 Refactoring: move collectAllModuleInfosFromIdeaModel function 2018-02-26 18:42:58 +03:00
Nikolay Krasko
60af145170 Refactoring: move package ../caches/resolve/lightClasses -> ../caches/lightClasses 2018-02-26 18:42:58 +03:00
Nikolay Krasko
08a46c1396 Refactoring: move idea source modules classes to caches/project package 2018-02-26 18:42:58 +03:00
Nikolay Krasko
287ad512fb Refactoring: extract project structure caches to separate package 2018-02-26 18:42:57 +03:00
Nikolay Krasko
a67ae0bf9f Refactoring: remove defaults values 2018-02-26 18:42:57 +03:00
Nikolay Krasko
9b8e550f3b Refactoring: move util files 2018-02-26 18:42:57 +03:00
Nikolay Krasko
931dec9cd8 Refactoring: move MapPsiToAsmDesc.kt to lightClasses package 2018-02-26 18:42:57 +03:00
Nikolay Krasko
47f4c79204 Reformat caches package 2018-02-26 18:42:57 +03:00
Stanislav Erokhin
77b146a51a Minor. Fixed output path for builtIns generator 2018-02-26 17:58:06 +03:00
Ilya Gorbunov
0f828a5107 Update paths of the moved sources for building the documentation 2018-02-26 17:11:12 +03:00
Ilya Gorbunov
5c0cc5f799 Move deprecated kotlin-runtime and reduced runtime for tests into stdlib
Rename mock-runtime-for-test project to kotlin-stdlib:jvm-minimal-for-test
2018-02-26 17:11:11 +03:00
Ilya Gorbunov
c796e5338b Move runtime.jvm sources to stdlib/jvm/runtime
Update path in kotlin-runtime
Update path in kotlin-mock-runtime-for-tests
2018-02-26 17:11:10 +03:00
Ilya Gorbunov
00b23a0fe9 Rearrange kotlin-stdlib-js library sources
Move kotlin.* api inside kotlin directory.
Update copyright paths.
2018-02-26 17:11:08 +03:00
Simon Ogorodnik
57e47d1830 Propose convert to string template as inspection more frequent 2018-02-26 12:11:18 +03:00
Zalim Bashorov
4c15642e2c Add missed references to license/README.md 2018-02-26 12:09:28 +03:00
Nicolay Mitropolsky
be961b458d make "IDEA Ultimate" run-configuration use -P intellijUltimateEnabled 2018-02-26 11:21:38 +03:00
Pavel V. Talanov
cf6fd4da81 Completion: prevent lookup elements from being duplicated correctly
This code prevents completion items from being submitted several times for the same descriptors
But some contributors actually do contribute extra items for already processed descriptors

Fixes a problem introduced in 1796d40118
2018-02-22 20:32:54 +01:00
Pavel V. Talanov
10f6d65e03 IdeStubIndexService: do not index annotations without name
Fixes NPE after changes introduced in 8f8cbfcfa5
2018-02-22 20:29:00 +01:00
Alexey Tsvetkov
d7644559eb Perform a test lookup before build
#KT-22535 fixed
   #KT-22995 fixed
2018-02-22 18:21:37 +03:00
Alexey Tsvetkov
7c9412a0b3 Avoid instanciating LookupStorage when clearing it
#KT-22535
  #KT-22995
2018-02-22 18:21:37 +03:00
Alexey Tsvetkov
140ba0681a Throw BuildDataCorruptedException when lookup operation cannot be performed
That is expected to force a rebuild (but it does not seem to be the case
in case of parallel build).

  #KT-22535
  #KT-22995
2018-02-22 18:21:37 +03:00
Alexey Tsvetkov
8ab9366ae5 Synchronize access to lookup storage in JPS
Storage operations are synchronized already,
but BuildDataManager.getStorage is not synchronized,
so maybe it is possible to create multiple LookupStorage
instances.

    #KT-22535
    #KT-22995
2018-02-22 18:21:37 +03:00
Nicolay Mitropolsky
3a609a9472 Assertions to catch EA-114080 2018-02-22 12:51:50 +03:00
Denis Zharkov
5a591be25f Convert SwitchCodegen to Kotlin, prettify and optimize codegen 2018-02-22 11:42:18 +03:00
Natalia Selezneva
806faf86b7 Tests: allow file modification during highlighting for scripts 2018-02-22 10:00:21 +03:00
Natalia Selezneva
de76d75f03 Drop caches for synthetic files when dependencies changed 2018-02-22 10:00:15 +03:00
Natalia Selezneva
8367aea624 Run update dependencies task in background 2018-02-22 10:00:10 +03:00
Natalia Selezneva
790cf1aa58 Show notification "Gradle projects need to be imported" when build.gradle.kts file changed
^KT-19165 Fixed
2018-02-22 10:00:02 +03:00
Natalia Selezneva
63aeaf9cd5 Do not highlight kts files outside source roots if not all definitions are initialized
^KT-20521 Fixed
^KT-21420 Fixed
2018-02-22 09:59:43 +03:00
Natalia Selezneva
e62412398c Reload dependencies for kts files after Gradle Sync
^KT-21721 In Progress
2018-02-22 09:59:08 +03:00
Natalia Selezneva
af4c1ce0e9 Minor: reformat 2018-02-22 09:59:02 +03:00
Alexey Tsvetkov
7881a305d9 Compare JS output files against file instead of hardcoded set
A difference is not obvious when two sets are compared:
there might be just one different element, but
sets would be printed in one line in iteration order
(which is non-fixed for hashsets).

Also the properties:
  EXPECTED_JS_FILES_IN_OUTPUT_FOR_STDLIB_ONLY,
  EXPECTED_JS_FILES_IN_OUTPUT_FOR_MODULE_STDLIB_ONLY,
  EXPECTED_JS_FILES_IN_OUTPUT_NO_COPY,
  EXPECTED_JS_FILES_IN_OUTPUT_WITH_ADDITIONAL_LIB_AND_DEFAULT_DIR,
  EXPECTED_JS_FILES_IN_OUTPUT_WITH_ADDITIONAL_LIB_AND_CUSTOM_DIR
are hard to distinguish in code and are not convenient to edit.
2018-02-22 01:13:09 +03:00
Ilmir Usmanov
9fdd34ce6e Minor. Add regression test for KT-15930
#KT-15930: Obsolete
2018-02-21 19:32:50 +03:00
Ilmir Usmanov
bcf29d106d Minor. Add regression test for KT-18292
#KT-18292: Obsolete
2018-02-21 19:32:41 +03:00
Ilmir Usmanov
a0186224b2 Do not report NOTHING_TO_INLINE on suspend inline functions
#KT-22260: Fixed
2018-02-21 19:19:09 +03:00
Alexey Tsvetkov
772a935de6 Provide custom ConstantAffectionResolver in JPS
#KT-16091 fixed
2018-02-21 19:12:12 +03:00
Anton Bannykh
eabe21726c JS: improve switch elimination 2018-02-21 18:39:19 +03:00
Pavel V. Talanov
92070d132e Completion: do not force dsl members to the top if some type is expected 2018-02-21 14:44:14 +01:00
Pavel V. Talanov
1796d40118 Completion: assign highest priority to dsl members in dsl context
Use the same style as for dsl for lookup items that belong to dsl
2018-02-21 14:44:13 +01:00
Pavel V. Talanov
8f8cbfcfa5 KtAnnotationEntry#name is stubbed and is nullable 2018-02-21 14:44:09 +01:00
Pavel V. Talanov
8600add7f7 Refactor: extract utils related to DslMarker to a separate object 2018-02-21 14:44:08 +01:00
Dmitry Savvinov
d570b863ce Introduce deprecation of companion objects nested classes
Introdude deprecation as per KT-21515. Warning is reported on type
usage, that soon will became invisible. Quickfix by adding explicit
import is added.

Idea behind implementation is to mark scopes that are deprecated (see
ClassResolutionScopesSupport).

Then, during walk along hierarchy of scopes, look at deprecation status
of the scope that has provided this classifier.
Note that we also have to check if there are *some* non-deprecated
visibility paths (because we can see classifier by two paths, e.g. if
we've added explicit import) -- then this type reference shouldn't be
treated as deprecated.
2018-02-21 16:04:49 +03:00
Mikhail Glukhikh
acd8edaa9c WEAK_WARNING -> GENERIC_ERROR_OR_WARNING in three inspections
Now there inspection use configured highlight level instead of
forced weak warning: null check to safe call, reformat, sort modifiers
2018-02-21 15:59:59 +03:00
Alexey Sedunov
17e64ebae0 Move: Fix processing of callable references to nested Java classes and static methods
#KT-17827 Fixed
2018-02-21 13:21:20 +03:00
Alexey Sedunov
441f88c144 Move: Fix processing of callable references to nested Kotlin classes
#KT-17827 In Progress
2018-02-21 13:21:19 +03:00
Alexey Sedunov
bdfc814389 Move: Fix scope of internal reference recovery in the case of file move
#KT-22282 Fixed
2018-02-21 13:21:19 +03:00
Alexey Sedunov
4537192e86 Move: Check if sealed class is moved with its subclasses
#KT-22769 Fixed
2018-02-21 13:21:18 +03:00
Alexey Sedunov
27d4593fc4 Move: Fix lengthening of qualified type references
KT-14519 Fixed
2018-02-21 13:21:18 +03:00
Alexey Sedunov
1af21dd160 Move: Warn about moving public declaration to non-public class
#KT-22771 Fixed
2018-02-21 13:21:18 +03:00
Alexey Sedunov
acf6408474 Create from Usage: Fix "Create class" applicability check for when entries
#KT-22329 Fixed
2018-02-21 13:21:17 +03:00
Alexey Sedunov
0934859718 Create from Usage: Revert suggested container order for "Create Class"
#KT-22917 Fixed
2018-02-21 13:21:17 +03:00
Dmitry Jemerov
9e30ede998 Fix ISE in KotlinPairMatcher.getCodeConstructStart() 2018-02-21 10:13:08 +01:00
Yan Zhulanow
2fdadb0f5a Evaluator: Send class bytecode array in loop with a limited chunk size (#KT-22967)
JDI in Android has a limited byte buffer size (8192), and we must not exceed it.
2018-02-20 23:19:59 +03:00
Yan Zhulanow
dfc007ebd3 Use thread-safe WeakHashMap implementation in annotation-based IDE plugins (#KT-22514) 2018-02-20 23:19:35 +03:00
Mikhail Glukhikh
84993ec3a0 Resolution API: introduce and use KtElement.resolveToCall() 2018-02-20 20:25:42 +03:00
Mikhail Glukhikh
513376e5f0 Introduce KtNamedFunction.resolveToDescriptorIfAny() 2018-02-20 20:25:42 +03:00
Mikhail Glukhikh
5848bc9a44 Introduce KtClassOrObject.resolveToDescriptorIfAny() 2018-02-20 20:25:42 +03:00
Mikhail Glukhikh
bd0cbb716c Rename: analyzeWithDeclarations --> analyzeWithContent() 2018-02-20 20:25:41 +03:00
Mikhail Glukhikh
f6513cd17e Introduce resolveToParameterDescriptorIfAny(), drop reified version 2018-02-20 20:25:41 +03:00
Mikhail Glukhikh
7a1b3cd224 Introduce & use resolveToDescriptorIfAny<DescriptorType>
This allows to omit casts after resolveToDescriptorIfAny() call,
get different descriptors for different receivers (in future),
distinguish parameter / property situation for primary constructor
2018-02-20 20:25:41 +03:00
Mikhail Glukhikh
8c97f8cbb5 Deprecate KtElement.analyzeFullyAndGetResult(), use analyzeAndGetResult 2018-02-20 20:25:41 +03:00
Mikhail Glukhikh
cd1745d354 Light classes: analyzeFully() --> analyzeWithDeclarations() 2018-02-20 20:25:41 +03:00
Mikhail Glukhikh
eabc7c9ba8 Replace some KtDeclaration.analyze() with resolveToDescriptorIfAny()
Also, enhance comment on KtElement.analyze()
2018-02-20 20:25:40 +03:00
Mikhail Glukhikh
88b8652ed2 J2K: convert + get rid of analyzeFully (3 files) 2018-02-20 20:25:40 +03:00
Mikhail Glukhikh
50ce8d68bf J2K: rename *.java --> *.kt (3 files) 2018-02-20 20:25:40 +03:00
Mikhail Glukhikh
1ca1a6dddc KotlinFrameExtraVariablesProvider: add analyze / analyzeFully comment 2018-02-20 20:25:40 +03:00
Mikhail Glukhikh
135c06dc96 Android goto tests: analyzeFully --> analyze 2018-02-20 20:25:39 +03:00
Mikhail Glukhikh
c1f7303fa3 CanBePrimaryConstructorProperty: analyzeFully --> analyze 2018-02-20 20:25:39 +03:00
Mikhail Glukhikh
57d0da9843 MoveMemberOutOfCompanionObject: reformat 2018-02-20 20:25:39 +03:00
Mikhail Glukhikh
d4dbd4cd6a MoveMemberOutOfCompanionObject: analyzeFully --> analyze 2018-02-20 20:25:39 +03:00
Mikhail Glukhikh
8986b8a1a2 Introduce analyzeWithContent() & analyzeWithDeclarations()
These functions have more clear names & receivers.
Old analyzeFully() applied on KtElement made deprecated
because for general KtElement it's unclear what is "full analysis"
2018-02-20 20:25:38 +03:00
Mikhail Glukhikh
e78bd73ba3 LeakingThisInspection: add comment about analyzeFully 2018-02-20 20:25:38 +03:00
Mikhail Glukhikh
2038a5567d ResolveElementCache: remove dead branch 2018-02-20 20:25:38 +03:00
Mikhail Glukhikh
52166646bb Reformat: ResolveElementCache 2018-02-20 20:25:37 +03:00
Alexey Sedunov
ba71e732a9 Misc: Extract "KotlinSdkAdded" test to separate test case
This is needed due to application being initialized only once per test case,
while Kotlin SDK is configured during PluginStartupComponent initialization
2018-02-20 19:27:23 +03:00
gzoritchak
1c1fe10e12 Add samples for take* and drop* extensions (KT-20357)
- Add samples for take, takeLast, takeWhile, takeLastWhile
- Add samples for drop, dropLast, dropWhile, dropLastWhile
2018-02-20 19:24:27 +03:00
Mikhail Glukhikh
fda40723dc Downgrade LoopToCallChainInspection to INFORMATION level 2018-02-20 19:08:01 +03:00
Vyacheslav Gerasimov
9b4f1156d8 Generate dependencies.properties used by dokka build
was missing after migration to custom-build
2018-02-20 17:56:57 +03:00
Nikolay Krasko
d1eabb3e67 Wrap Kotlin exception filter call to read action (EA-116446)
See IDEA-186950 for details.
2018-02-20 17:36:54 +03:00
Sergey Igushkin
5901c2163f Add the expectedBy dependency to the compile configuration
Enable its propagation through transitive dependencies (including
POMs generated by Gradle)

Issue #KT-22824 Fixed
2018-02-20 17:24:22 +03:00
Sergey Igushkin
3836dcab85 Fix -Xmulti-platform dropped from args when freeCompilerArgs is assigned
in user build script

Issue #KT-15371 Fixed
2018-02-20 17:23:10 +03:00
Sergey Igushkin
37b34cff25 Allow multiple expectedBy dependencies in Gradle MPP support
Issue #KT-22864 Fixed
2018-02-20 17:23:10 +03:00
Mikhail Zarechenskiy
f23b5103ec Avoid non-null assertions for inline classes based on nullable types
Note that there are more places where assertions for inline classes should refined:
  - lateinit vars
  - values that come from Java
  - type casts (interfaces to inline class type)
2018-02-20 14:41:48 +03:00
Natalia Selezneva
e3c58eced1 Fix ConfigureKotlinInTempDirTest.testKotlinSdkAdded 2018-02-20 14:28:09 +03:00
Vyacheslav Gerasimov
b831b8ab92 Introduce intellijEnforceCommunitySdk flag to disable ultimate repo 2018-02-20 14:26:12 +03:00
Mikhail Glukhikh
02ee641daa Add CommonModuleResolveScopeEnlarger providing correct scope for commons
So #KT-22873 Fixed
So #KT-22858 Fixed
So #KT-22853 Fixed
2018-02-20 13:14:45 +03:00
Dmitry Savvinov
e071d054c9 Refactor DataFlowValueFactory implementation into several separate files 2018-02-20 13:11:33 +03:00
Dmitry Savvinov
0929673576 Refactor DataFlowValueFactory into proper component 2018-02-20 13:11:33 +03:00
Denis Zharkov
03567a1c01 Add @SinceKotlin("1.2") to kotlin.suspend 2018-02-20 11:59:39 +03:00
Mikhail Zarechenskiy
413e2d7fa1 Fix KotlinType of constructor call for inline classes 2018-02-20 11:58:18 +03:00
Mikhail Zarechenskiy
530dd01ca6 Fix unboxing values of inline class type from type parameters 2018-02-20 11:45:49 +03:00
Dmitry Petrov
99cea07bf4 Correctly map container element type in intrinsic for withIndex
In case of arrays, we couldn't distinguish array of boxed Ints
from array of primitive Ints.

 #KT-22904 Fixed Target versions 1.2.40
2018-02-20 09:18:25 +03:00
Ilya Gorbunov
2028ec3ce8 Minor improvements in all/any/none samples
Extract variables to make assertion expression shorter.
2018-02-19 18:44:28 +03:00
Yuta Sakata
4926b5a4c0 Add samples for any, all and none
Rewrite samples to make them working on sample generator

Move location of the class that contains samples of Aggregates.kt
2018-02-19 18:44:28 +03:00
Igor Chevdar
a2897a29b5 Added tests on default arguments of fake overridden functions 2018-02-19 18:39:08 +03:00
Igor Chevdar
a648b9676c Fixes in IR lowerings:
DeepCopyIrTree: typo fix.
Default arguments: made proper overridden descriptor selection.
Local declarations: made proper determination whether a function is locally defined.
2018-02-19 18:39:08 +03:00
Alexey Sedunov
aa4a5b75c7 UAST: Fall back to JVM platform if element doesn't have a module 2018-02-19 18:11:56 +03:00
Denis Zharkov
5edfc0f5cd Prohibit labeled returns inside kotlin.suspend argument lambdas
Probably, it would be more correct to skip such lambdas when resolving
the returns' references, but it'd be more complicated and still useless
since non-local returns are impossible in such lambdas
(relevant parameter is noinline)

 #KT-22900 Fixed
2018-02-19 17:30:26 +03:00
Mikhail Zarechenskiy
bc2e81a1e4 Improve message for exception about absence of common supertype
Relates to #KT-16253
2018-02-19 17:16:24 +03:00
Mikhael Bogdanov
cc4ab832b7 Properly calculate outermost parent class for sam wrapper
#KT-22906 Fixed
2018-02-19 13:29:56 +01:00
Ilya Gorbunov
6d035f1d28 Fix unresolved references to SortedSet in docs 2018-02-19 15:25:03 +03:00
Ilya Gorbunov
2eba8efb80 Do not refer to Cloneable in documentation
There's no source for Cloneable and it can't be resolved yet.
2018-02-19 15:14:25 +03:00
Nicolay Mitropolsky
bc543b4cdf LightAnnotations: wrapping all PsiLiterals (not only Strings) 2018-02-19 15:08:02 +03:00
Alexey Sedunov
99fca79bdc UAST: Do not create UElements in non-JVM modules 2018-02-19 13:01:38 +03:00
Ilya Chernikov
c9a0d7c624 Add missing reflect dependency to the gradle plugin
fixes #KT-22895
2018-02-19 10:20:17 +01:00
Denis Zharkov
cef7205f14 Fix CCE caused by KotlinPackageSourcesMemberNamesIndex
FileContentImpl::getPsiFile is not-nullable and at the same time
it contains an explicit case of its fileType to LanguageFileType
that leads to the following exception in case when kt-file is marked as plain text:

java.lang.ClassCastException: com.intellij.openapi.file.exclude.EnforcedPlainTextFileTypeFactory$1 cannot be cast to com.intellij.openapi.fileTypes.LanguageFileType
	at com.intellij.util.indexing.FileContentImpl.createFileFromText(FileContentImpl.java:135)
	at com.intellij.util.indexing.FileContentImpl.getPsiFile(FileContentImpl.java:104)

 #EA-114338 Fixed
2018-02-19 10:31:46 +03:00
gzoritchak
f790635b30 Add samples for joinTo
KT-20357
2018-02-18 20:12:05 +03:00
gzoritchak
40e3159463 Add samples for joinToString
KT-20357
2018-02-18 20:12:05 +03:00
Toshiaki Kameyama
a36e8c86f1 KT-22428 Create member function from usage shouldn't present type parameters as options (#1509)
* KT-22428 Create member function from usage shouldn't present type parameters as options

* Reformat & cleanup
2018-02-17 14:09:44 +03:00
Alexey Belkov
ea6582dd7d Minor: Fix typos and wording in NameResolution.adoc (#1523) 2018-02-17 13:51:08 +03:00
Alexander Udalov
96e33dabcf Fix JS stdlib file names in KotlinJpsBuildTest
Add "kotlin-experimental.js", "kotlin-experimental.meta.js" and refactor
surroundings
2018-02-16 17:09:34 +01:00
Mikhael Bogdanov
d732f0e160 Never delete types from inline functions during inline transformations
#KT-19399 Fixed
2018-02-16 16:48:53 +01:00
Mikhael Bogdanov
729c866f47 Code clean 2018-02-16 16:48:52 +01:00
Nicolay Mitropolsky
47f3a0ce0a Revert "Light annotations made strictly non-physical (KT-22565)"
This reverts commit cf6e21d
2018-02-16 16:24:15 +03:00
Mikhael Bogdanov
cc7bd80099 Enable multidex in android box tests 2018-02-16 14:22:04 +01:00
Mikhael Bogdanov
31c63dea50 Add jvm target 10 tests on jdk 10 2018-02-16 14:22:04 +01:00
Mikaël Peltier
2de0b2a9ef Cleaning into RedundantGotoMethodTransformer
- Use val when it is possible
- Use filterIsIstance
- Replace takeif + ?.let by an if instruction
2018-02-16 15:15:52 +03:00
Mikaël Peltier
9fb0f59813 KT-17110 Rewrite branches targeting other branches
- Rewrite branches targeting other branches to target directly the
final destination to avoid runtime performance penalties.

Fix of https://youtrack.jetbrains.com/issue/KT-17110
2018-02-16 15:15:52 +03:00
Mikhael Bogdanov
c9624ce0f9 Update gradle to 4.5.1 2018-02-16 12:31:18 +01:00
Alexey Sedunov
994d6ab4f9 Temporarily revert "UAST: Do not create UElements in non-JVM modules" 2018-02-16 14:05:16 +03:00
Nikolay Krasko
ae0bd9cc8c Additional diagnostic for incorrect stub type in Kotlin file (EA-111617) 2018-02-16 13:29:54 +03:00
Nikolay Krasko
866129984e Expression can be parenthesized on replace with if (KT-22874, EA-91186)
#KT-22874 Fixed
2018-02-16 13:29:53 +03:00
Nikolay Krasko
67183ad3b0 Fix class cast exception in KotlinFunctionParameterInfoHandler (EA-91186) 2018-02-16 13:29:50 +03:00
Nikolay Krasko
d868c01671 Disable outdate runtime check for developers builds
We can't update them properly anyway.
2018-02-16 13:29:49 +03:00
Nikolay Krasko
86dfc1ae2c Add internal action for reactivating post-open project activity 2018-02-16 13:29:48 +03:00
Nikolay Krasko
8a655b70e0 Fix isModified check in Kotlin compiler tab (KT-22851)
outputPostfix and outputPrefix is saved with nullize in apply, but
modification check was without it.

 #KT-22851 Fixed
2018-02-16 13:29:47 +03:00
Mikhail Glukhikh
6c328e7845 Fix IdeModuleInfoTests (related to KT-21771) 2018-02-16 13:15:02 +03:00
Alexey Sedunov
d5df8c60fc UAST: Do not create UElements in non-JVM modules 2018-02-15 20:37:44 +03:00
Alexander Udalov
a2835fe0d3 Do not report old runtime warnings for unstable API version
These warnings are technically correct but are too noisy and have little
value in case a user explicitly specifies unstable API version: it's
unlikely that seeing these warnings, the user will choose to rollback to
an earlier API version, since new API is probably one of the reasons
that user specified that unstable version to begin with.

So, in "kotlinc -language-version 1.3 -api-version 1.3 -cp
kotlin-stdlib-1.2.jar", we will no longer report a warning that the
attached stdlib has a version older than explicit API version (so long
as 1.3 remains unstable).

Note that we _could_ have reported these warnings in "kotlinc
-language-version 1.3 -cp kotlin-stdlib-1.2.jar", because in this case
the user might've not even be concerned with the new API in 1.3 and was
only looking for new language features. However, we still think that
it'd be unnecessary and one opt-in to the experimental world (with
LV=1.3 in this case) is enough

 #KT-22777 Fixed
2018-02-15 17:30:50 +01:00
Alexander Udalov
007248620c Disable API version inference when "-language-version" is specified
API version inference happens in
JvmRuntimeVersionsConsistencyChecker.checkCompilerClasspathConsistency
only in the case when API version is specified explicitly (with
"-api-version ..."). However, if the user specifies "-language-version
1.3", what's likely meant is "-language-version 1.3 -api-version 1.3",
and it would be unwise to infer API version to 1.2 (which is the version
of the attached stdlib) in this case.

Therefore, API version is now considered to be specified explicitly if
_either_ -language-version or -api-version is specified on the command
line

 #KT-22777 In Progress
2018-02-15 17:30:42 +01:00
Alexander Udalov
3f6aeb6dca Refactor API version inference/checking code
The behavior is not changed in this commit
2018-02-15 17:30:01 +01:00
Alexander Udalov
749773aa36 Remove -Xskip-runtime-version-check from error messages 2018-02-15 17:28:47 +01:00
Alexander Podkhalyuzin
d940546a10 Added optional dependency to Kotlin/Native Java plugin 2018-02-15 18:58:53 +03:00
Alexander Udalov
213df24644 Fix Java9ModulesIntegrationTest.testAutomaticModuleNames on Windows
Do not use '*' in the file name since it's forbidden on Windows
2018-02-15 18:48:08 +03:00
Mikhail Glukhikh
427d7fd1cc Fix compilation 2018-02-15 18:16:58 +03:00
Alexander Podkhalyuzin
898b31cb83 Merge pull request #1516 from JetBrains/always_fallback_to_hardcoded_plugin_id
Use hardcoded plugin ID when loaded in the main classloader
2018-02-15 17:03:29 +03:00
Dmitry Petrov
8bfbbe456f Use NoScopeRecordCliBindingTrace for codegen tests 2018-02-15 16:40:26 +03:00
Dmitry Petrov
10916b2046 Minor: reformat code 2018-02-15 16:40:13 +03:00
Alexander Udalov
f8424624ca Minor, check compiler output in ExperimentalIntegrationTest 2018-02-15 13:14:38 +01:00
Alexander Udalov
4a370e9dba Don't break the "API <= LV" rule in compiler tests
Stability of the language version is used for example to determine
whether the PRE_RELEASE_CLASS diagnostic should be reported. Now that
there are pre-release classes in the standard library (Experimental et
al.), we'd like to avoid this error on their usages in diagnostic tests
which are using the "!API_VERSION: 1.3" directive
2018-02-15 13:14:37 +01:00
Alexander Udalov
31e762c679 Move 1.3-specific part of stdlib to another source set 2018-02-15 13:14:37 +01:00
Mikaël Peltier
ef6b6cd261 Fix NPE into isArraySizeAccess 2018-02-15 12:41:33 +03:00
Mikaël Peltier
3c2f137fd5 Exclude tests from JS backend due to a bug into it 2018-02-15 12:41:33 +03:00
Mikaël Peltier
be07a348ea Reformat tests 2018-02-15 12:41:33 +03:00
Mikaël Peltier
8676ca34d7 KT-22334 Specialized loops using range such as integer..array.size-1
- Into PrimitiveNumberRangeLiteralRangeValue modifies how bounded
value are created by checking if the high bound range can be modified
to be exclusive instead of inclusive such as the generated code will
be optimized.
- Add black box tests checking that the specialization does not fail
on any kind of arrays.
- Add a bytecode test checking that the code is correctly optimized.

Fix of https://youtrack.jetbrains.com/issue/KT-22334
2018-02-15 12:41:33 +03:00
Ilya Gorbunov
8c8caa4707 kotlin-test: change actual package name for test annotation typealiases
to avoid potential split package situation
2018-02-14 23:50:30 +03:00
Ilya Gorbunov
dfa6fc7d48 IDEA settings: add pattern for upsource review links 2018-02-14 19:29:41 +03:00
Vyacheslav Gerasimov
6959f6af75 Exclude lib subdirs from inlellij module
When lib/rt is added to test runtime some tests break
2018-02-14 18:42:10 +03:00
Sergey Igushkin
14e9930f94 Apply shading/relocation to the subplugin example 2018-02-14 17:43:05 +03:00
Alexey Tsvetkov
1dadf84c40 Check Java interop in Maven IC tests 2018-02-14 16:31:30 +03:00
Alexey Tsvetkov
07c94a5586 Check output in Maven IC tests 2018-02-14 16:31:30 +03:00
Alexey Tsvetkov
42c433f950 Avoid removing target/classes dir during IC in Maven
#KT-21581 fixed
2018-02-14 16:31:30 +03:00
Sergey Igushkin
fa3ca0cddb Merge pull request #1517 from JetBrains/igushkin/gradle-it-readme
Update Readme.md for Gradle plugin IT
2018-02-14 16:28:04 +03:00
Sergey Igushkin
ad30e898c2 Create Readme.md 2018-02-14 16:27:11 +03:00
Sergey Igushkin
f9191ff210 Update ReadMe.md 2018-02-14 16:23:08 +03:00
Alexey Tsvetkov
67a5cab343 Fix IC test data
Test data was broken starting from 0954d1ab1b
2018-02-14 16:09:07 +03:00
Mikhail Glukhikh
3f500a1655 Add "expectedBy" to module descriptor and use it in checker
Now ExpectActualDeclarationChecker in IDE context
uses common module descriptors for relevant checks.
Compiler still uses own module instead (see comment in checker)
So #KT-21771 Fixed
2018-02-14 15:09:14 +03:00
Mikhail Glukhikh
78136fbb07 IDE facet refactoring, ModuleInfo.expectedBy introduced.
Part of facet classes was extracted to idea-analysis module
Related to KT-21771
2018-02-14 15:09:14 +03:00
Mikhail Zarechenskiy
694f5690f9 [NI] Improve diagnostic about unresolved receiver for many candidates 2018-02-14 14:58:05 +03:00
Mikhail Zarechenskiy
3afd4a2f4a [NI] Record all diagnostics from subcalls resolution results 2018-02-14 14:58:04 +03:00
Mikhail Zarechenskiy
6a7a07bf9d [NI] Don't forget to report about unresolved callable reference 2018-02-14 14:58:04 +03:00
Sergey Igushkin
a3aefac111 (minor) Fix testAndroidKaptChangingDependencies 2018-02-14 14:53:14 +03:00
Alexander Udalov
ecc441a642 Minor, remove obsolete JDK 6-related workaround 2018-02-14 12:50:16 +01:00
Alexander Udalov
60a551404a Refine modality of fake overrides inherited from abstract expected members
In an open expected class inheriting an expected interface, abstract
members are now inherited as _open_ fake overrides, not final. Final was
technically safer but also stricter and thus could be unexpected by the
user. In a final class, abstract members are still inherited as _final_
fake overrides. So, the general rule is now the following: the modality
of an expected fake override, which overrides only abstract members, in
a non-abstract class is equal to the modality of that class

 #KT-22031 Fixed
2018-02-14 12:45:45 +01:00
Sergey Igushkin
fe3ce1ec7c (minor) Fix testKaptKt15814, slightly modify temp dir path. 2018-02-14 14:43:23 +03:00
Natalia Selezneva
50c0c5a747 Throw exception when it's not possible to run evaluate expression with compilation 2018-02-14 14:40:38 +03:00
Natalia Selezneva
19e7002d02 Evaluate Expression: fix ClassNotFoundException for primitives and arrays 2018-02-14 14:40:31 +03:00
Natalia Selezneva
2f61bd41d5 Fix comparision of java versions during class loading in evaluate expression.
Do not catch EvaluateException during class loading to show more useful error to user.
^KT-22830 Fixed
2018-02-14 14:40:24 +03:00
Sergey Igushkin
3214fb8611 Fix testAnnotationProcessorAsFqName 2018-02-14 14:28:42 +03:00
Nikolay Krasko
71043821da Check idea with apiVersion instead of BUILD_NUMBER
BUILD_NUMBER is probably rewritten in tests from KotlinCoreEnvironment.
2018-02-14 13:27:10 +03:00
Nikolay Krasko
882913c773 Fix getting fields after introducing KotlinCommonCodeStyleSettings 2018-02-14 13:27:10 +03:00
Dmitry Savvinov
2f855a993e Update changelog for 1.2.30 2018-02-14 13:24:17 +03:00
Vyacheslav Karpukhin
cbb75d0bcd Use hardcoded plugin ID when loaded in the main classloader 2018-02-14 11:11:18 +01:00
Mikhail Glukhikh
d56902983e Add forgotten generated tests 2018-02-14 13:03:30 +03:00
Mikaël Peltier
8ab7e5c406 KT-10057 Use lcmp instead of Intrinsics.compare
Fix of https://youtrack.jetbrains.com/issue/KT-10057
2018-02-14 09:46:29 +01:00
Denis Zharkov
c47c1c5ffd Fix runtime CCE in case of out-projected SAM
Probably, when NI is there this fix will become unnecessary because
there will be no approximation applied, thus the value parameter
will remain Hello<#Captured> instead of Nothing

 #KT-17171 Fixed
2018-02-14 10:29:14 +03:00
Mikhail Zarechenskiy
6baf937a52 Update test files with dumped declarations for NI 2018-02-13 19:50:25 +03:00
Sergey Igushkin
6eaee8b250 Require no specific version for ExecutionStrategyIT 2018-02-13 17:43:11 +03:00
Sergey Igushkin
c3946d98f2 Update Gradle test version to 4.5.1, fix kapt1 multiversion and IC tests
that were not correctly tweaked for kapt1
2018-02-13 17:43:11 +03:00
Sergey Igushkin
d0416bea03 Use Gradle 3.5 for kapt1 IT because of the separate classes dirs bug in
kapt1.
2018-02-13 17:43:11 +03:00
Sergey Igushkin
b5195d36bc Use Gradle 3.4 for testCleanBuildLib because of classpath normalization 2018-02-13 17:43:11 +03:00
Sergey Igushkin
6e51ada36b Override system-wide cache, simplify version checks, 2018-02-13 17:43:11 +03:00
Sergey Igushkin
99e731f6a6 Transform the new tests after rebase; Fix issues from KOTLIN-CR-1546 2018-02-13 17:43:10 +03:00
Sergey Igushkin
f9dc892c42 Do not stop Gradle daemons with the same version as that of the build. 2018-02-13 17:43:10 +03:00
Sergey Igushkin
a223870e7a Exclude JPS tests from normal run. Log Gradle version when advancing it. 2018-02-13 17:43:10 +03:00
Sergey Igushkin
ae1ef06de2 Fix a few tests failing due to Gradle version change. 2018-02-13 17:43:10 +03:00
Sergey Igushkin
ced5bf6e2c Fix getOutputForTask for newer Gradle versions 2018-02-13 17:43:10 +03:00
Sergey Igushkin
c394b50cb8 Implement logic for classes directories in Gradle IT across versions.
Also add a workaround for console type set in user's gradle.properties.
2018-02-13 17:43:10 +03:00
Sergey Igushkin
5905b23bf9 Change existing literal Gradle versions to GradleVersionRequirement
Also add workaround for kotlin-test-common not seen in the IDE
2018-02-13 17:43:09 +03:00
Sergey Igushkin
5bd52311dc Introduce GradleVersionRequirement and logic for version for each test 2018-02-13 17:43:09 +03:00
Alexander Udalov
fd52deb9c1 Remove unneeded dependencies of module 'generators'
Previously, the classpath of this module was used to run all tests in
the project. This is why it depended on almost all modules in the
project. Now, in the Gradle build, these dependencies are no longer
needed
2018-02-13 15:42:16 +01:00
Mikhail Zarechenskiy
c4cfd07fe9 [NI] Fix infinite completion of arguments in AllCandidates mode
See AutoImports#testFactoryFunctionFromLambda for example
2018-02-13 15:06:34 +03:00
Mikhail Zarechenskiy
e017e9cb5f Support passing inline class values with spread operator 2018-02-13 13:16:45 +03:00
Mikhail Zarechenskiy
3919dc94e1 Box values of inline class types when passing to function as varargs 2018-02-13 13:16:44 +03:00
Mikhail Zarechenskiy
6687751cf5 Generate as check for inline classes using wrapper
Should be improved when inline class is based on non-null reference
2018-02-13 13:16:44 +03:00
Mikhail Zarechenskiy
a88dbefcd9 Generate is check for inline classes same as for primitives
Should be improved when inline class is based on non-null reference
2018-02-13 13:16:44 +03:00
Mikhail Zarechenskiy
d606e5bc89 Correct boxing for functional types containing inline classes 2018-02-13 13:16:43 +03:00
Mikhail Zarechenskiy
a8a9f774d0 Map inline classes in generic argument position to theirs wrap classes 2018-02-13 13:16:43 +03:00
Mikhail Zarechenskiy
1d16d21dbb Fix boxing for non-local and labeled returns with inline classes 2018-02-13 13:16:42 +03:00
Mikhail Zarechenskiy
80dd5c106e Propagate KotlinType through call generator, fix boxing on arguments 2018-02-13 13:16:42 +03:00
Mikhail Zarechenskiy
22b9c25dd0 Add KotlinType info about this inside inline class 2018-02-13 13:16:41 +03:00
Mikhail Zarechenskiy
c86d3e354b Skip call to the underlying value of inline class 2018-02-13 13:16:41 +03:00
Mikhail Zarechenskiy
2c279978c8 Fix generation of property accessor to the underlying value 2018-02-13 13:16:40 +03:00
Mikhail Zarechenskiy
ce601bebbe Fix detection of erased this for inline class 2018-02-13 13:16:40 +03:00
Mikhail Zarechenskiy
b361d0e9c0 Add test and check that iterator over UInt folds to a simple for-loop 2018-02-13 13:16:40 +03:00
Mikhail Zarechenskiy
059f1e9eed Support inline classes working with collection elements (get/set) 2018-02-13 13:16:39 +03:00
Mikhail Zarechenskiy
8015295059 Desugar constructor call of inline class to the underlying value
Also add information about KotlinType to the constant stack values
2018-02-13 13:16:39 +03:00
Mikhail Zarechenskiy
6320368609 Add KotlinType to the Coercion stack value 2018-02-13 13:16:38 +03:00
Toshiaki Kameyama
e35ec8ee08 Introduce intention 'expr.unsafeCast<Type>()' <- -> 'expr as Type'
So #KT-16382 Fixed
2018-02-13 13:05:52 +03:00
Mikhail Glukhikh
085c7d30ed Specify expl. lambda signature: derive from offset independent intention
Related to KT-22492
2018-02-13 12:28:56 +03:00
Toshiaki Kameyama
5499078fcc Make "Specify explicit lambda signature" available on whole lambda
So #KT-22492 Fixed
2018-02-13 12:28:50 +03:00
Toshiaki Kameyama
059a797e10 Don't report redundant semicolon for a call before lambda expression
So #KT-22719 Fixed
2018-02-13 11:52:04 +03:00
Toshiaki Kameyama
f9555f3f64 Join with assignment: remove comment from target range #KT-22110 Fixed 2018-02-13 11:45:31 +03:00
Dmitry Petrov
36128ba66f Don't generate primary constructor body for expect classes 2018-02-13 10:09:28 +03:00
Dmitry Petrov
839ebba157 ProperNumberComparisons is disabled by default (until LDC decision) 2018-02-13 09:26:00 +03:00
Dmitry Petrov
af79bbd247 Minor: reformat code 2018-02-13 09:25:40 +03:00
Dmitry Petrov
a790195808 Implement "proper numeric comparisons" support in JVM BE 2018-02-13 09:25:40 +03:00
Dmitry Petrov
e23a48e8d0 Minor: reformat code 2018-02-13 09:25:40 +03:00
Nikita Skvortsov
b1419e2a8c fix import of expectedBy scope dependencies inside composite builds 2018-02-12 19:29:12 +03:00
Pavel V. Talanov
8ac7f0b592 Minor: remove error marker from commented out test code 2018-02-12 16:46:16 +01:00
Pavel V. Talanov
fd4e262b1f Minor: modify test for KT-22819 to unmute it on teamcity
#KT-22819 Open
2018-02-12 16:35:56 +01:00
Pavel V. Talanov
9e69c73387 Minor: comment out test for KT-22594 to unmute it on teamcity
#KT-22594 Open
2018-02-12 16:35:51 +01:00
Vyacheslav Karpukhin
53946456cf Do not use hardcoded plugin ID for update checks
When Kotlin plugin is bundled into another plugin, there won't be a plugin with ID org.jetbrains.kotlin registered in PluginManager, which leads to runtime exceptions. To fix that let's determine the plugin ID dynamically instead.
2018-02-12 17:33:54 +03:00
Nikolay Krasko
f5e78a89bc Collect statistics of used defaults set in formatting (KT-22252)
^KT-22252 In Progress
2018-02-12 17:33:54 +03:00
Anton Bannykh
cd3a797f2a JS: fix corner case in when translation (fix crash in KT-22544) 2018-02-12 17:15:48 +03:00
Alexey Sedunov
b315e0c113 Gradle: Fix dependency import when "module per sourceset" is disabled
#KT-22360 Fixed
2018-02-12 15:10:19 +03:00
Alexey Sedunov
e1aec46300 Configuration: Set up Kotlin SDK (if necessary) on plugin startup
#KT-22590 Fixed
2018-02-12 15:10:16 +03:00
Ilya Gorbunov
99fd66137c Update the instruction how to run the stdlib generator
Use relative paths in urls
2018-02-12 14:32:51 +03:00
Yanis Batura
9c8c1cdc18 Fix a couple of typos in docs and ReadMe
* Fix a couple of typos
- In the main ReadMe.md
- In onEach template's doc

* Update generated source code
2018-02-12 14:22:47 +03:00
Simon Ogorodnik
470a4bb615 Fix Missing documentation inspection for primary ctor properties
#KT-20954 fixed
#KT-21005 fixed
2018-02-12 13:41:50 +03:00
Ilya Gorbunov
0f130a0a5a Add documentation for kotlin-test-testng artifact 2018-02-12 08:11:23 +03:00
Ilya Gorbunov
5e3edf4bd7 Select the asserter based on test framework presence in classpath
Simplify asserter lookup: enumerate all AsserterContributors when
the file class with lookupAsserter function is initialized.

It's assumed that AsserterContributor initialization should be fast.

#KT-21154 Fixed
2018-02-12 07:59:54 +03:00
Ilya Gorbunov
9dfa54eb62 Include kotlin-test-testng into dist, setup JDK 7 required to run tests 2018-02-12 07:58:29 +03:00
Ilya Gorbunov
d1f00a95e0 Minor: kotlin-test reformat sources, fix test package names 2018-02-12 07:58:28 +03:00
Valeriy Zhirnov
ad7701922c TestNG support in kotlin.test #KT-22620 2018-02-12 07:58:21 +03:00
Nikolay Krasko
1e567438a2 Store selected set of defaults in code style settings (KT-22252)
#KT-22252 In Progress
2018-02-11 16:50:20 +03:00
Nikolay Krasko
5d25b8b476 Control serialize/deserialize of CommonCodeStyleSettings 2018-02-11 16:50:19 +03:00
Mikhail Zarechenskiy
9e22761262 Fix type parameters indexes of MockClassDescriptor
Exception was thrown during mapping of arguments to parameters in `computeSupertypeProjections`

 #KT-18522 Fixed
2018-02-11 16:21:23 +03:00
Yan Zhulanow
310ee67c35 REPL, minor: Ignore empty lines (#KT-21611) 2018-02-09 19:24:57 +03:00
Yan Zhulanow
edcf0aef53 Kapt: Allow Kotlin @Repeatable annotations (KT-22451)
We don't generate a wrapper for repeatable annotations, and Javac complains to it.
2018-02-09 19:11:03 +03:00
Vyacheslav Gerasimov
a3a46fe259 Fix test runtime and set idea.home.path for sam with receiver plugin 2018-02-09 15:04:30 +03:00
Dmitry Petrov
5a85bf36a5 Check for type parameter supertypes in primitive numeric comparisons 2018-02-09 14:41:54 +03:00
Alexey Sedunov
e5e583e3e5 Configuration: Show Koltin plugin path as "home path" of Kotlin SDK
#KT-22640 Fixed
2018-02-09 14:17:40 +03:00
Alexey Sedunov
84fed8071c Create from Usage: Support target directory selection for "Create class"
#KT-22152 Fixed
2018-02-09 14:17:40 +03:00
Alexey Sedunov
695a2a4098 Rename: Support retargeting/shadowing conflict checking for functions
#KT-22564 Fixed
2018-02-09 14:17:40 +03:00
Alexey Sedunov
5c6bba9f14 Rename: Fix qualified expression replacement for the case 'invoke' <-> 'get'
#KT-22705 Fixed
2018-02-09 14:17:39 +03:00
Alexey Sedunov
fffd74f002 Refactor: Move canMoveLambdaOutsideParentheses() function to idea-core module 2018-02-09 14:17:39 +03:00
Alexey Sedunov
48705865bd J2K: KtArrayAccessReference 2018-02-09 14:17:38 +03:00
Alexey Sedunov
9150322bed J2K: KtArrayAccessReference (rename to .kt) 2018-02-09 14:17:38 +03:00
Alexey Sedunov
e88f1467eb Rename: Add quotes to declaration name if necessary
#KT-22708 Fixed
2018-02-09 14:17:38 +03:00
Alexey Sedunov
428b086458 Refactor: Move 'isIdentifier' and 'quoteIfNeeded' functions to frontend 2018-02-09 14:17:37 +03:00
Alexey Sedunov
fddfbf225f Change Signature: Support implicit calls of 'invoke' and 'get'
Also drop 'operator' keyword when necessary

 #KT-22718 Fixed
2018-02-09 14:17:37 +03:00
Ilya Chernikov
e38d5395df Pass previous dependencies to the legacy script dependency resolvers
fixes #KT-22753
2018-02-09 11:03:43 +01:00
Dmitry Jemerov
3aaad0c21d Indent default parameter values
#KT-22508 Fixed
2018-02-09 10:49:02 +01:00
Dmitry Jemerov
5bb195df9b No space between label and lambda in labeled expressions
#KT-22301 Fixed
2018-02-09 10:49:01 +01:00
Dmitry Jemerov
8f9b818e43 Do not indent closing bracket of array access expression
#KT-22641 Fixed
2018-02-09 10:49:00 +01:00
Dmitry Jemerov
36f5525b12 Call chain indentation logic that actually makes sense
#KT-22346 Fixed
2018-02-09 10:48:51 +01:00
Dmitry Jemerov
2c88b26034 Group all call chain-related tests in a single directory 2018-02-09 10:48:48 +01:00
Mikhael Bogdanov
d7e5eb24ee Update android test dependencies 2018-02-09 09:45:14 +01:00
Mikhael Bogdanov
b666a2da5f Increase android test timeout 2018-02-09 09:45:13 +01:00
Denis Zharkov
f6c6f67566 Minor. Remove irrelevant JAVAC_EXPECTED_FILE directive in tests
This change fixes these tests
2018-02-09 10:54:28 +03:00
Rodrigo B. de Oliveira
de57951b58 Make Kotlin Idea plugin aware of the Gradle initscript template
See gradle/kotlin-dsl#662
2018-02-09 08:32:14 +01:00
Mikaël Peltier
e1f44d6237 Move tests to the right place 2018-02-09 09:10:53 +03:00
Mikaël Peltier
9274241c0e KT-22714 Avoid to generate unecessary checkcast
- StackValue already avoid to generate checkcast from a type or an
array to java.lang.Object. Add a new case to avoid to generate a
checkcast from an array to an array of java.lang.Object when arrays
have the same dimensions.

Fix of https://youtrack.jetbrains.com/issue/KT-22714
2018-02-09 09:10:53 +03:00
Mikhail Zarechenskiy
0ecb3afdf7 Refactoring: rename AsmTypeAndKotlinType -> JvmKotlinType 2018-02-09 05:06:34 +03:00
Mikhail Zarechenskiy
913e4b42bb Support inline classes as last expression in lambda 2018-02-09 05:06:32 +03:00
Mikhail Zarechenskiy
396cc7d02b Support unboxing of inline classes in elvis 2018-02-09 05:06:31 +03:00
Mikhail Zarechenskiy
fefcddc803 Support boxing/unboxing for captured vars of inline class types 2018-02-09 05:06:29 +03:00
Mikhail Zarechenskiy
9f24bbd980 Support unboxing of inline classes after assertion operator 2018-02-09 05:06:27 +03:00
Mikhail Zarechenskiy
30c79ffadc Support generating computable properties inside inline classes 2018-02-09 04:57:20 +03:00
Mikhail Zarechenskiy
47aeeb36e4 Get accessors for companion object properties through wrapper class 2018-02-09 04:56:46 +03:00
Mikhail Zarechenskiy
70cd1cfcdf Fix generation of companion object inside inline classes 2018-02-09 04:56:45 +03:00
Mikhail Zarechenskiy
e1d3b21201 Skip bridge methods generation for inline classes 2018-02-09 04:56:43 +03:00
Mikhail Zarechenskiy
4eb64fb4b9 Support mapping for inline classes based on type variables 2018-02-09 04:56:41 +03:00
Mikhail Zarechenskiy
0fd80ce980 Unbox inline classes after safe calls if needed 2018-02-09 04:56:40 +03:00
Mikhail Zarechenskiy
c5c8d84719 Support boxing/unboxing for method return types 2018-02-09 04:56:36 +03:00
Mikhail Zarechenskiy
390c214943 Support boxing for inline classes on function calls 2018-02-09 04:56:08 +03:00
Mikhail Zarechenskiy
0d682879f5 Initial boxing for inline classes: local variable assignments 2018-02-09 04:55:44 +03:00
Mikhail Zarechenskiy
b0ee61620c Add KotlinType to methods coerceTo & coerceFrom 2018-02-09 02:08:11 +03:00
Mikhail Zarechenskiy
1ac4e9755a Generate synthetic unbox method for each wrapper of inline class 2018-02-09 02:08:11 +03:00
Mikhail Zarechenskiy
a59917b6f8 Generate synthetic box method for each erased inline class 2018-02-09 02:08:10 +03:00
Mikhail Zarechenskiy
f856455841 Introduce stateless methods to map types without predefined mapping 2018-02-09 02:08:10 +03:00
Mikhail Zarechenskiy
1cdad65b9b Refactoring: propagate KotlinType through hierarchy of StackValue
Mainly, this is needed to introduce boxing over inline classes
2018-02-09 02:08:10 +03:00
Mikhail Zarechenskiy
9d05fac771 Don't generate backing field for erased inline class 2018-02-09 02:08:09 +03:00
Mikhail Zarechenskiy
b08a32af2f Fix local variables table for inline classes 2018-02-09 02:08:09 +03:00
Cuihtlauac ALVARADO
35c454f53f Filter out "Picked Up" messages from stderr
KT-22340 Fixed
2018-02-08 18:48:25 +01:00
Yan Zhulanow
46c2adda4e REPL: Fix crash on trying to :load with incorrect filename (KT-12037)
(cherry picked from commit 0238575a36)
2018-02-08 20:44:15 +03:00
Yan Zhulanow
a25e93d82a Debugger: (EA-112731) Do not crash miserably if we don't know the anonymous class name
Continue to log the exception, avoid breaking UX
2018-02-08 19:36:38 +03:00
Yan Zhulanow
2a3bab0a0f Kapt: Register additional source directories without modifying the raw Gradle model
Unfortunately, this works only for the newer Android Studio versions, so we need to keep the old code until IDEA will migrate at least to AS 3.1.
2018-02-08 19:36:38 +03:00
Yan Zhulanow
6c4a2db34b Kapt: Enums inside enum values should be forbidden (KT-22582) 2018-02-08 19:36:38 +03:00
Yan Zhulanow
510d5ece0f Android Extensions: Support '.', '-' and ':' in View identifiers (KT-22700) 2018-02-08 19:36:37 +03:00
Yan Zhulanow
ba61a93dc7 Kapt: Forbid using the deprecated (original) kapt 2018-02-08 19:36:37 +03:00
Yan Zhulanow
bdd7ab3a09 Kapt: Mute Java 9 tests temporarily on Windows 2018-02-08 19:36:37 +03:00
Yan Zhulanow
03a20384ef Uast: Fix an exception while converting type alias KotlinType to PsiType (KT-21874) 2018-02-08 19:36:37 +03:00
Yan Zhulanow
1cc4744345 Kapt: Map URLs to absolute file paths properly, also add some logging 2018-02-08 19:36:37 +03:00
Ilmir Usmanov
87bbac9d43 Take coroutineContext into account in RedundantSuspendModifierInspection
#KT-22651: Fixed
2018-02-08 19:34:20 +03:00
Alexander Udalov
e19ed1e001 Add test on experimental const val in annotation argument
This test checks that a usage inside an annotation argument is a
signature usage, which may be too restricting but easier to support at
the moment (and the restriction can be lifted in the future)
2018-02-08 17:08:34 +01:00
Alexander Udalov
a4af9dd5d1 Always consider container's experimentality in ExperimentalUsageChecker
This results in more diagnostics usually, but allows library authors to
avoid annotating everything in each experimental class with the marker
(only the class needs to be annotated now)

 #KT-22759
2018-02-08 17:08:34 +01:00
Alexander Udalov
7123202670 Add getExtensionOrNull utility for protobuf messages 2018-02-08 17:08:33 +01:00
Alexander Udalov
65a6171782 Add test on Experimental in scripts 2018-02-08 17:08:33 +01:00
Alexander Udalov
21e2a3c0b4 Load module annotations in IDE
#KT-22759 Fixed
2018-02-08 17:08:33 +01:00
Alexander Udalov
890374a42a Load module annotations for JVM and JS modules in compiler
#KT-22759 In Progress
2018-02-08 17:08:33 +01:00
Alexander Udalov
396a5ab352 JS: write/read module annotation FQ names to/from metadata
#KT-22759 In Progress
2018-02-08 17:07:23 +01:00
Alexander Udalov
ff33e0bad3 Write/read module annotation FQ names to/from metadata on JVM
#KT-22759 In Progress
2018-02-08 17:07:23 +01:00
Alexander Udalov
b4ac852392 Add packageProto/nameResolver to JvmPackagePartSource
May be useful for loading platform-specific protobuf extensions (such as
package_module_name on JVM) when analyzing deserialized top level
members
2018-02-08 17:07:22 +01:00
Alexander Udalov
ec6b49b8b8 Check experimental API markers for deprecation
#KT-22759 In Progress
2018-02-08 17:07:22 +01:00
Alexander Udalov
5e78adb501 Support -Xexperimental/-Xuse-experimental in ExperimentalUsageChecker
#KT-22759 In Progress
2018-02-08 17:07:22 +01:00
Alexander Udalov
77625831f7 Support -Xexperimental and -Xuse-experimental, validate their values
#KT-22759 In Progress
2018-02-08 17:07:22 +01:00
Alexander Udalov
153c86c069 Report diagnostic on overrides of experimental members
Unless they're experimental themselves

 #KT-22759 In Progress
2018-02-08 17:07:22 +01:00
Alexander Udalov
29c35e6686 Do not require experimental propagation for body usages in same module
Unless it's a usage inside the body of an effectively public inline
function

 #KT-22759 In Progress
2018-02-08 17:07:22 +01:00
Alexander Udalov
6d4e8f3781 Add some validation for Experimental/UseExperimental usages
#KT-22759 In Progress
2018-02-08 17:07:22 +01:00
Alexander Udalov
0bf0a315ed Introduce Experimental and UseExperimental annotations
#KT-22759 In Progress
2018-02-08 17:07:21 +01:00
Simon Ogorodnik
366f630236 Fix J2K ObjectLiteral.testMyFrame by updating incorrect testData 2018-02-08 19:01:13 +03:00
Mikaël Peltier
126afbb8ac Avoid to generate unecessary checkcast
StackValue already avoid to generate checkcast from a type or an
 array to java.lang.Object. Add a new case to avoid to generate a
 checkcast from an array to an array of java.lang.Object when arrays
 have the same dimensions.

 #KT-22714 Fixed
2018-02-08 16:38:46 +01:00
Denis Zharkov
9a9452f73a Add @RequireKotlin(1.2.30) for kotlin.suspend
#KT-22562 Fixed
2018-02-08 17:47:37 +03:00
Alexander Udalov
b6a55f74f4 Support patch versions in RequireKotlin with kind=COMPILER_VERSION 2018-02-08 17:47:37 +03:00
Denis Zharkov
72222c718a Highlight callees resolved to kotlin.suspend as a keywords
#KT-22562 In Progress
2018-02-08 17:47:37 +03:00
Denis Zharkov
99c7d8d4d5 Add call checks related to suspend lambda modifier's introduction
- Prohibit non-modifier-like calls on kotlin.suspend
- Add warning on modifier-like calls to anything but kotlin.suspend

 #KT-22766 In Progress
 #KT-22562 In Progress
2018-02-08 17:47:37 +03:00
Denis Zharkov
ef01f641f3 Imitate support for suspend modifier on parameterless lambdas
#KT-22766 In Progress
2018-02-08 17:47:37 +03:00
Denis Zharkov
5c81d9fd6b Minor. Make function private 2018-02-08 17:47:37 +03:00
Denis Zharkov
342a532416 Minor. Inline parameters 2018-02-08 17:47:37 +03:00
Pavel V. Talanov
229184dd78 Dsl line marker: provide simple tooltip
Test dsl line marker
2018-02-08 15:36:42 +01:00
Pavel V. Talanov
519ea12bb2 Test, dsl highlighter: test custom highlighting applied to calls 2018-02-08 15:36:41 +01:00
Mikhail Glukhikh
d554a4234d Redundant object type check: fix problem highlighting #KT-22484 Fixed 2018-02-08 17:10:44 +03:00
Mikhail Glukhikh
901ae087bc Redundant object type check: use referential equality, forbid for when
So #KT-22538 Fixed
2018-02-08 17:10:43 +03:00
Mikhail Glukhikh
fbe6929903 Reformat: RedundantObjectTypeCheckInspection 2018-02-08 17:10:41 +03:00
Mikhail Glukhikh
c715387773 Reformat & cleanup: KotlinGradleSourceSetDataService 2018-02-08 17:10:40 +03:00
Mikhail Glukhikh
198b054a6f Detect library kind in Gradle if name looks like non-JVM
Related to KT-20971
2018-02-08 17:10:39 +03:00
Mikhail Glukhikh
dcbb29e947 Search for source of platform binary also in common sources
So #KT-20971 Fixed
2018-02-08 17:10:37 +03:00
Mikhail Glukhikh
76976f7e52 SourceNavigationHelper: reformat + style fix 2018-02-08 17:10:36 +03:00
Alexander Udalov
80a7f92309 Extract logic to get function parameters for default value generation
For some reason, this logic was a bit different in JVM (FunctionCodegen)
and JS (FunctionBodyTranslator). For example, in JS the
EXPECTED_FUNCTION_SOURCE_WITH_DEFAULT_ARGUMENTS_NOT_FOUND diagnostic was
reported even in the case when no expected function was found for the
actual function at all, which made it quite difficult to write
multiplatform sources for JS stdlib where it both should be compiled as
a part of the multiplatform project, and by itself (suppressing
NO_ACTUAL_FOR_EXPECT): in the latter case, the new error must have been
suppressed everywhere as well

 #KT-21913
2018-02-08 14:14:10 +01:00
Alexander Udalov
97314d010d Serialize default argument values presence for actual declarations correctly
When default argument value was present in the expected declaration, we
did not correctly serialize that fact to the metadata for the actual
declaration (`declaresDefaultValue` was used). Therefore, it was
impossible to use that actual declaration without passing all parameter
values in another module, where it was seen as a deserialized descriptor

 #KT-21913
2018-02-08 14:11:57 +01:00
Alexander Udalov
22595acbfd Fix AssertionError on overloading function with property in actual class
#KT-22352 Fixed
2018-02-08 14:11:56 +01:00
Alexander Udalov
56be83cdd3 Improve fake override construction for expected classes
Fake overrides for abstract members from expected classes should become
non-abstract (final, in fact) in non-abstract expected subclasses

 #KT-22031 Fixed
2018-02-08 14:11:55 +01:00
Denis Zharkov
88a23c73c7 Ignore @Nullable annotation for vararg parameter
See the comment in code for clarification

 #KT-19786 Fixed
2018-02-08 13:36:10 +03:00
Denis Zharkov
cfd612e2c1 Minor. Reformat signatureEnhancement.kt 2018-02-08 13:36:10 +03:00
Mikhail Glukhikh
8edf8b9e4d MemberInfoUtils: when no facade is available, use resolutionApi methods 2018-02-08 13:03:41 +03:00
Mikhail Glukhikh
8b8cb0abba KotlinRunConfigurationProducer: get rid of resolve via facade 2018-02-08 13:03:40 +03:00
Denis Zharkov
2ad93a0330 Use extension registry when unpacking serialized type alias
It's funny here that "extension" here means protobuf extensions
while initial issue is about extension function types

 #Fixed KT-22728
2018-02-08 12:39:26 +03:00
Denis Zharkov
fbef21bf17 Remove setting usePreciseJavaTracking in gradle.properties
It's already true by default since 9b28d1a21c
2018-02-08 12:38:19 +03:00
Alexander Udalov
bb013ec2bf Update bootstrap to 1.2.40-dev-165 2018-02-08 10:15:30 +01:00
Mikhael Bogdanov
0954d1ab1b Don't generate hash in sam wrapper class name
#KT-17091 Fixed
2018-02-08 10:11:48 +01:00
Alexander Udalov
ba5cc65792 Rename JvmPackageTable -> JvmModuleProtoBuf, PackageTable -> Module
This protobuf message is going to contain more information about the
module than just the table of package parts
2018-02-07 17:25:43 +01:00
Mikhael Bogdanov
5d6d1bf182 Explicitly specify 'idea.home.path' in android tests 2018-02-07 15:33:54 +01:00
Dmitry Petrov
5678b3d52a Handle nullable case in '==' with smart cast using safe call 2018-02-07 14:30:59 +03:00
Dmitry Petrov
00325ae539 Handle equality checks for 'when' and data classes 2018-02-07 14:30:59 +03:00
Dmitry Petrov
299eb24ca9 Minor: simplify OperatorExpressionGenerator#invokeConversionFunction 2018-02-07 14:30:59 +03:00
Dmitry Petrov
22d59bb709 Minor: include descriptor itself in exception from DependenciesCollector 2018-02-07 14:30:59 +03:00
Dmitry Petrov
4776535205 Implement IR primitives for number comparisons in JVM BE 2018-02-07 14:30:59 +03:00
Dmitry Petrov
bf18186045 More precise implicit cast generation
If an expression 'x' has a definitely non-null type 'T1',
and is used in position with an expected type 'T2',
cast 'x' to 'T2!!' (most common non-null type T*: T* <: T2).
2018-02-07 14:30:59 +03:00
Dmitry Petrov
9137e68d4e Implement special desugaring for numeric comparisons in PSI2IR
This introduces the following IR built-in functions required for proper
implementation of the number comparisons:

- ieee754Equals(T, T): Boolean,
    for each T in {Float?, Double?}

- less(T, T): Boolean
  lessOrEqual(T, T): Boolean
  greater(T, T): Boolean
  greaterOrEqual(T, T): Boolean
    for each T in {Int, Long, Float, Double}
2018-02-07 14:30:59 +03:00
Dmitry Petrov
f4ed4ec9d9 Distinguish numeric comparisons in FE, store info in BindingContext
When we an equality or comparison operator expression
with both arguments "statically known to be of primitive numeric types"
(that is, either inferred type T for an operand is a primitive numeric
type, or a smart cast to a primitive numeric type T is possible in the
corresponding context), comparisons should be performed on primitive
numbers with corresponding widening conversions.

This differs from default 'equals' and 'compareTo' implementations in
case of floating-point numbers: for Float and Double, IEEE 754
comparisons are used instead of total order implemented by j.l.Float and
j.l.Double.

Examples:

fun ex1(x: Double, y: Double) = x < y
-- will use IEEE 754 comparison for Double, because
   both 'x' and 'y' have type Double

fun ex2(x: Double, y: Any) = y is Double && x < y
-- will use IEEE 754 comparison for Double, because
   smart cast to Double is possible for 'y'

fun ex3(x: Comparable<Double>, y: Double) = x is Double && x < y
-- will use IEEE 754 comparison for Double, because
   smart cast to Double is possible for 'x',
   even though corresponding operator convention is resolved to
   'Comparable<Double>#compareTo(Double)' (which would use total order)

fun ex4(x: Any, y: Any) = x is Double && y is Int && x < y
-- will use IEEE 754 comparison for Double with 'y' promoted to Double,
   because smart cast to Double is possible for 'x',
   and smart cast to Int is possible for 'y',
   and least common primitive numeric type for Double and Int is Double.
2018-02-07 14:30:59 +03:00
Alexey Sedunov
930e51e30e Misc: Update test data due to changes in 'actual' constructor checking
Now actual class constructor is considered an implementation
only if it has 'actual' modifier itself
2018-02-07 14:13:16 +03:00
Nicolay Mitropolsky
91a4bbed2e Uast: KotlinUNestedAnnotation with light annotation (IDEA-185890) 2018-02-07 10:17:40 +03:00
Nicolay Mitropolsky
cb05baa02b LightAnnotations: wrapping nested annotations with KtLightAnnotationForSourceEntry 2018-02-07 10:17:40 +03:00
Nicolay Mitropolsky
48ea52def1 Uast: KotlinUNestedAnnotation for processing nested annotations (IDEA-185890) 2018-02-07 10:17:40 +03:00
Yan Zhulanow
1f81c0cdfe Kapt: Fix compilation errors when the referenced class has '$' in the beginning of its name (KT-22493) 2018-02-06 22:16:01 +03:00
Yan Zhulanow
5fc9c5671c Kapt: Escape nested comments in doc comments (KT-22469) 2018-02-06 22:16:01 +03:00
Yan Zhulanow
abda4bfb57 Kapt: Remove comments inside enum values (KT-22350) 2018-02-06 22:16:01 +03:00
Yan Zhulanow
a171874b2f Fix "Illegal Android Identifier" inspection reports non-instrumentation unit tests (KT-22168) 2018-02-06 22:16:00 +03:00
Yan Zhulanow
4e8969e1c2 Kapt: Fix array of anonymous type handling (KT-22468) 2018-02-06 22:16:00 +03:00
Yan Zhulanow
144ec9285f Minor: Get rid of duplicating option descriptions in Kapt plugin 2018-02-06 22:16:00 +03:00
Yan Zhulanow
e38a41d2f2 Evaluate: Fix compiling evaluator issues led to improper expression caching
1. Do not save a ClassLoader reference inside the context, as we don't use it anyway after evaluation.
This is to avoid custom ClassLoader nesting.

2. Do not use 'findClass()' as it caches the loaded classes and always returns the first evaluated class if it's in cache.
2018-02-06 22:16:00 +03:00
Yan Zhulanow
da74bcbcc0 Evaluate: Support dex in newer Android build tools 2018-02-06 22:16:00 +03:00
Yan Zhulanow
7c7c929b0e Kapt: Disable location mapping by default, allow to enable it manually 2018-02-06 22:16:00 +03:00
Yan Zhulanow
5668a7af92 Kapt: Replace original Javac diagnostic messages with those with Kotlin location mapped
There is no Messages dialog in newer versions of IDEA/Android Studio in which the error messages were mapped before. The new Build window shows only the original locations, so now we need to replace Java file diagnostics with ones mapped to Kotlin source files.

The side effect is that diagnostics on the same locations are automatically merged.
2018-02-06 22:16:00 +03:00
Yan Zhulanow
b0e97de8a8 Kapt: Move line metadata to .kaptMetadata external files (KT-22386)
Placing location table inside .java file triggers annotation processor to run on each line table modification (even when the stub declarations themselves are the same). So we move it to the separate file.
2018-02-06 22:16:00 +03:00
Yan Zhulanow
bf9eed931b Parcelable: Fix 'Simple' test (new boolean serializer) 2018-02-06 22:15:59 +03:00
Yan Zhulanow
145ddf3b1f Parcelable: Add CREATOR field (and other generated declarations) in light classes (KT-19300, KT-19853) 2018-02-06 22:15:59 +03:00
Ilya Gorbunov
90dff281ba Actualize ReadMe files
- Actualize build requirements and steps
- Extract Gradle plugin readme to the corresponding folder
- Rewrite Libraries and Maven Tools readme

#KT-20995 Fixed
2018-02-06 21:17:58 +03:00
Ilya Gorbunov
aa74f163f7 Minor: improve table formatting 2018-02-06 21:17:57 +03:00
Ilmir Usmanov
ad385f42a9 Fix continuaion retrieval on generated coroutineContext intrinsic code
Use fake continuation instead on real one in JVM BE.
Pass continuation parameter to closure generator in JS BE.

 #KT-22577: Fixed
2018-02-06 21:14:37 +03:00
Sergey Igushkin
e8cd8b566e Delay kapt dependencies resolution from configuration phase
Store kapt configurations instead of classpath files in the tasks
Delay wrapping kapt subplugin options to task execution (when the
classpath can be safely resovled)

Issue #KT-18821 Fixed
2018-02-06 21:01:57 +03:00
Nicolay Mitropolsky
8ac95b54a2 Uast: support for Kotlin array literals 2018-02-06 17:53:17 +03:00
Alexey Sedunov
358bc62fc1 Minor: Regenerate tests 2018-02-06 17:06:03 +03:00
Alexander Udalov
12e31cedfd Write lambdaClassOriginName for lambdas copied during inline
Similarly to anonymousObjectOriginName which is written for copied
anonymous objects

 #KT-21320
2018-02-06 13:05:22 +01:00
Alexander Udalov
6da3f37fc3 Write anonymousObjectOriginName for classes copied during inline
#KT-21320
2018-02-06 13:05:22 +01:00
Mikhail Glukhikh
81122ed236 Fix a pack of broken IDE action tests
Related to KT-20281.
For Java resolve we can use also resolve with 'null' platform,
which is possible situation in tests.
2018-02-06 15:02:38 +03:00
Alexander Podkhalyuzin
09d167eafb Ask just extensions, not in some area #KT-21978 Fixed 2018-02-06 14:58:18 +03:00
Alexey Sedunov
c602c51642 Slicer: Sort tree nodes to produce stable test data 2018-02-06 14:23:20 +03:00
Alexey Sedunov
adca8eb7f1 Rename: Substitute synthetic expression parent before analysis
This fixes rename conflicts test
2018-02-06 14:23:20 +03:00
Alexey Sedunov
049439ce1d Rename: Update test data (follow-up for unnecessary reformatting fix) 2018-02-06 14:23:20 +03:00
Alexey Sedunov
d51da8bafd Misc: Fix Android SDK path in Gradle import tests 2018-02-06 14:23:19 +03:00
Mikhail Glukhikh
7995ae05c5 Introduce inspection for redundant not-null extension receiver of inline
Related to KT-22303
2018-02-06 14:17:01 +03:00
Mikhael Bogdanov
ad48099ca6 Move java 8 tests to java8 folder 2018-02-06 10:32:14 +01:00
Dmitry Savvinov
7e512ba018 Enable contracts in the 'compiler' module 2018-02-06 10:58:47 +03:00
Mikhail Glukhikh
19beaf57a7 JVM facade: for Java resolve, always use JvmPlatform resolver
So #KT-20281 Fixed
2018-02-06 09:50:10 +03:00
Mikhail Glukhikh
c90056f8c4 Introduce inspection for nullable extension receiver of inline function
So #KT-22303 Fixed
2018-02-06 09:50:09 +03:00
Mikhail Glukhikh
08d3f20e09 Reformat: AbstractMultiModuleHighlightingTest 2018-02-06 09:50:08 +03:00
Mikhail Glukhikh
3ba6b70f73 Show expect / actual gutter even for incomplete compatibility
So #KT-18445 Fixed
So #KT-21115 Fixed
2018-02-06 09:50:00 +03:00
Mikaël Peltier
a2a3043607 KT-18731 Use reference equality to compare enums
Fix of https://youtrack.jetbrains.com/issue/KT-18731
2018-02-05 18:34:44 +03:00
Pavel V. Talanov
bc54c95bc3 JavaResolveExtension: create facade by original element
Fixes semantic difference erroneously introduced in c030a047aa
 #KT-22593 Fixed
2018-02-05 16:26:47 +01:00
Pavel V. Talanov
7b8d501670 Dsl highlighting: Provide gutter for marker annotation definition
Allows to jump to corresponding page in 'color and font' settings
2018-02-05 16:22:23 +01:00
Pavel V. Talanov
0d5d826bc5 Dsl highlighting: reasonable default colors 2018-02-05 16:22:22 +01:00
Pavel V. Talanov
b9c832a952 Implement custom highlighting for dsls
A declaration is considered a part of dsl if it's marked with
    a marker annotation (which is in turn must be marked as @DslMarker)
Highlighting attributes are then chosen randomly from a preset list
    based on marker annotation fqname
2018-02-05 16:22:20 +01:00
Pavel V. Talanov
5ab00ee9f7 HighlighterExtension can provide custom highlighting for calls 2018-02-05 16:22:19 +01:00
Alexander Udalov
91a9038b2f Regenerate Gradle options
After f9e195351a
2018-02-05 16:17:30 +01:00
kenji tomita
1875d129ea Inspection to get rid of unnecessary ticks in references #KT-18124 Fixed 2018-02-05 17:31:08 +03:00
Alexander Udalov
9e500831dd Allow expect/actual annotation constructors to have default values
When a parameter has a default argument value both in the expected
annotation and in the actual annotation, they must be equal. This check
has been only implemented for the case when actual annotation is Kotlin
source code, and NOT a Java class coming from an actual typealias. The
latter case would require a bit more work in passing a platform-specific
annotation-value-reading component to ExpectedActualDeclarationChecker,
and is therefore postponed.

For now, Java annotations that are visible through actual type aliases
cannot have default argument values for parameters which already have
default values in the expected annotation declaration

 #KT-22703 Fixed
 #KT-22704 Open
2018-02-05 14:13:32 +01:00
Alexander Udalov
71fe8c02a3 Fix rendering of type aliases
- render 'actual' modifier if it's present
- do not render a space after type parameter list
2018-02-05 13:38:06 +01:00
Zalim Bashorov
e0245a9dc7 KJS: support default arguments for expected declarations 2018-02-05 13:38:06 +01:00
Alexander Udalov
db4ce703a6 Support default arguments for expected declarations
#KT-21913 Fixed
2018-02-05 13:38:05 +01:00
Alexander Udalov
d356f52873 JS: remove MULTIPLATFORM directive from box tests
Move all sources into one module and use "!LANGUAGE:
+MultiPlatformProjects" instead
2018-02-05 13:38:05 +01:00
Alexander Udalov
d465f5fd8e Extract ExpectedActualResolver out of ExpectedActualDeclarationChecker
The point is that it's placed in module 'resolution' where it can be
accessed for example in ArgumentsToParametersMapper to load default
argument values from expected function
2018-02-05 13:38:05 +01:00
Alexander Udalov
ea30388ae5 Minor, use another way to check that descriptor is from sources
This way this function can be moved to module 'resolution', where
DescriptorToSourceUtils is not available
2018-02-05 13:38:04 +01:00
Alexander Udalov
ac5444ef7c Add declaresOrInheritsDefaultValue, move hasDefaultValue to 'resolution'
'hasDefaultValue' needs to be adapted to support locating default values
in 'expect' functions, and this is not possible in module 'descriptors',
where it was originally declared. Therefore, move it to module
'resolution' and copy its current logic to a separate function
'declaresOrInheritsDefaultValue' which is used in 5 places.
'hasDefaultValue' itself is updated in subsequent commits.

Besides changing imports, also use a simpler declaresDefaultValue in
some places, which does not include default values inherited from
supertypes: this is OK for constructors, and in LazyJavaClassMemberScope
for functions from built-ins which do not have default argument values
at all
2018-02-05 13:38:04 +01:00
Alexander Udalov
7eb66f2579 Minor, support 'expect'-only files in codegen tests 2018-02-05 13:38:04 +01:00
Alexander Udalov
f75b774d80 Do not report unused parameters for actual constructors
Extract common part for functions and constructors in
processUnusedParameter
2018-02-05 13:38:04 +01:00
Alexander Udalov
1bdec829ea Treat constructors as actual only if the 'actual' modifier is present
Exactly as this is done for functions in
FunctionDescriptorResolver.initializeFunctionDescriptorAndExplicitReturnType

 #KT-21906 Fixed
2018-02-05 13:38:04 +01:00
Alexander Udalov
f198a28276 Fix type parameter bound check in expect-actual checker
Also make TypeParameterUpperBounds a "strong" incompatibility, meaning
that non-actual members from platform module are _not_ going to be
matched to the expected members if this incompatibility exists between
them, and therefore NO_ACTUAL_FOR_EXPECT will be reported on the
expected declaration, instead of ACTUAL_MISSING on the platform member.
This is needed because the difference in type parameter upper bounds can
have effect on the function signature on the platform (e.g. on JVM,
Array<T> -> T[], but Array<T> -> Comparable[] if T : Comparable<T>), and
it would be incorrect to report ACTUAL_MISSING on the member that has
nothing to do with the expected declaration that happens to coincide
with it in everything except type parameter bounds

 #KT-21864 Fixed
2018-02-05 13:38:04 +01:00
Alexander Udalov
8c6b140865 Simplify diagnostic message for ACTUAL_MISSING
#KT-21939 Fixed
2018-02-05 13:38:03 +01:00
Mikhael Bogdanov
1530fbee1b Fix ir test execution 2018-02-05 12:07:36 +01:00
Mikhail Zarechenskiy
5dacfae793 Support calling inline functions inside inline classes 2018-02-05 12:07:41 +03:00
Mikhail Zarechenskiy
2536eb4d45 Generate argument expression instead of constructor for inline classes 2018-02-05 12:07:40 +03:00
Mikhail Zarechenskiy
928a342ace Initial version of codegen for inline classes 2018-02-05 12:07:40 +03:00
Mikhail Zarechenskiy
fbc02dee58 Refactoring: extract method to generate suspend method out 2018-02-05 12:07:40 +03:00
Mikhail Zarechenskiy
d1049e5553 Refine type mapping for nullable inline class types 2018-02-05 12:07:39 +03:00
Mikhail Zarechenskiy
d5400f11a3 Basic inline class mapping to the underlying representation 2018-02-05 12:07:39 +03:00
Mikhail Zarechenskiy
4b4525ec17 Support !LANGUAGE directive in signature tests 2018-02-05 12:07:39 +03:00
Mikhail Zarechenskiy
d1a8ec06dd Reformat typeSignatureMapping.kt file 2018-02-05 12:07:38 +03:00
Mikhail Zarechenskiy
a463fb1d5e Add basic declaration checker for inline classes 2018-02-05 12:07:38 +03:00
Mikhail Zarechenskiy
915455ebe9 Introduce InlineClasses language feature
Allow to write `inline` modifier in front of class declaration
2018-02-05 12:07:38 +03:00
Denis Zharkov
9b28d1a21c Make precise java classes tracking in Gradle enabled by default
#KT-22192 Fixed
2018-02-05 11:54:53 +03:00
Natalia Selezneva
74a9881e9d Fix "Virtual pointer hasn't been disposed" exception in tests. Add sdk to ProjectJdkTable. 2018-02-05 09:46:57 +03:00
Nikolay Krasko
f05e926670 Update idea to 173.3.4 (173.4548.28) 2018-02-03 00:15:45 +03:00
Nikolay Krasko
5a9ea89e9c Collect statistics about used Kotlin formatter 2018-02-03 00:15:45 +03:00
Nikolay Krasko
d1e6a61197 Fix testInGlobalPropertyWithGetter test in 173 branch
Workaround for IDEA-185462. It was introduced in 173 idea and
fixed in 181.
2018-02-03 00:15:45 +03:00
Vyacheslav Gerasimov
5b0d908d85 Add log4j & jdom to tests-common testCompile
Fixes NCDFEs in IrBlackBoxCodegenTestGenerated
2018-02-02 19:54:27 +03:00
Ilya Gorbunov
c06204d0d4 Remove obsolete test classpath helpers 2018-02-02 17:59:29 +03:00
Ilya Gorbunov
381344141f Drop StdlibTest from compiler tests
Reason: stdlib built with the fresh compiler is going to be tested in Compiler Bootstrap Test configuration.
2018-02-02 17:59:27 +03:00
Ilya Gorbunov
8f78d73cd7 Use fqnames for SortedSet and TreeSet from java.util
Remove internal typealiases for SortedSet and TreeSet
2018-02-02 17:56:56 +03:00
Ilya Gorbunov
b456c52902 Import kotlin.coroutines.experimental for generated sequences on all platforms
This will add import to common generated sources
2018-02-02 17:56:56 +03:00
Natalia Selezneva
cdbe0b8fa9 Scratch tests: delete scratch file after creation 2018-02-02 17:44:42 +03:00
Natalia Selezneva
6ca1b10f41 Use correct logger for debugging scratch files 2018-02-02 17:44:35 +03:00
Natalia Selezneva
847990a4f6 Tests: call super.teardown from finally block in android tests 2018-02-02 17:44:28 +03:00
Vyacheslav Gerasimov
36167c7b8f Add annotations to lint plugin dependencies
Fixes `warning: unknown enum constant` during lint plugin build
2018-02-02 16:58:43 +03:00
Alexey Tsvetkov
6c4f3df851 Remove intellij-core usages from kotlin-gradle-plugin-integration-tests
We can use only relocated intellij-core from kotlin-compiler-embeddable.
Non-source usages do not resolve in IDE (which also breaks debugger).
2018-02-02 15:40:11 +03:00
Alexey Tsvetkov
8f144fc57a Fix red code in IDE in kotlin-gradle-plugin-integration-tests 2018-02-02 15:40:10 +03:00
Alexey Tsvetkov
7c329b59b6 Shade test jars from compiler used in Gradle tests
This fixes `VerifyError` for all integration tests calling
`KotlinTestUtils.findAndroidSdk()`.
The exception was thrown because `:kotlin-gradle-plugin-integration-tests`
was depending on both relocated intellij-core (from kotlin-compiler-embeddable)
and non-relocated intellij-core (transitevely through tests jars from compiler).

A call to `findAndroidSdk()` was triggering classloading
for `KotlinTestUtils` which had bytecode references to
`org.jetbrains.kotlin.idea.KotlinLanguage` loaded from the embeddable compiler
and to `com.intellij.lang.Language` loaded from non-relocated intellij-core.

`KotlinLanguage` from the embeddable compiler was a subclass of relocated
`org.jetbrains.kotlin.com.intellij.lang.Language` thus it was not
assignable to `com.intellij.lang.Language` causing `VerifyError`.

The solution is to create relocated jar combining the necessary test jars
from the compiler.
2018-02-02 15:40:10 +03:00
Alexey Tsvetkov
7cba035f80 Ensure tasks using android sdk or android jar have proper dependencies
A test task, that uses android dependency but does not depend on
a corresponding configuration, would fail when it was run after
'clean' task.
I've extracted 'useAndroidSdk', 'useAndroidJar' extensions
making it harder for a developer to forget to set up task dependencies.
2018-02-02 15:40:10 +03:00
Anton Bannykh
3ead464671 JS: fix callable reference with implicit extension receiver (KT-22638 fixed) 2018-02-02 14:34:34 +03:00
Alexander Udalov
f4e2102787 Minor, remove extra empty lines from -X arguments help 2018-02-01 19:38:32 +01:00
Alexander Udalov
5338df6960 Do not depend on Shadow plugin in subprojects
Since buildSrc depends on the Shadow plugin, it's already in the
classpath of all build scripts
2018-02-01 19:38:31 +01:00
Alexander Udalov
ad0cd7c176 Use the same JVM args for buildSrc as for main project 2018-02-01 19:38:30 +01:00
Alexander Udalov
f9e195351a Minor, rephrase usage help for -no-stdlib/-no-reflect compiler arguments 2018-02-01 19:38:30 +01:00
Alexander Udalov
28c77bfb01 Fix kotlin.annotation.Target's kdoc
The original sentence was incorrect because it did not exclude type
aliases
2018-02-01 19:27:43 +01:00
Alexander Udalov
616ba1fbe4 Minor, remove obsolete JDK 9 EA version guard 2018-02-01 19:27:43 +01:00
Alexander Udalov
efd92547ef Remove unused description file 2018-02-01 19:26:39 +01:00
Vyacheslav Gerasimov
dd9ea0bc87 Remove unnecessary dependencies on :prepare:idea-plugin:idea-plugin 2018-02-01 18:11:25 +03:00
Vyacheslav Gerasimov
ec511f7a78 Use dependsOn for dependencies on dist & ideaPlugin tasks
instead `shouldRunAfter`
2018-02-01 18:11:25 +03:00
Vyacheslav Gerasimov
a595fdd312 Make root dist & ideaPlugin depend on all corresponding tasks in child projects 2018-02-01 18:11:25 +03:00
Alexey Tsvetkov
74e47e024f Replace testCompile with testRuntime dependencies
Compile dependencies broke incremental compilation
because packed compiler was present in idea
test compile classpath (we do not track changes in
fat jars)
2018-02-01 17:39:55 +03:00
Alexey Tsvetkov
4ee34fc355 Avoid building kotlin-compiler-embeddable before running idea tests
kotlin-compiler-embeddable is a runtimeOnly dependency of
kotlin-compiler-runner, so embeddable jar was built
before idea tests execution.
Building the jar takes ~20s on my machine, which is a waste
of time since idea does not use embeddable compiler.
2018-02-01 17:39:55 +03:00
Alexey Tsvetkov
29d2679e8d Do not configure dist task for every published module
This change avoids compiling kotlin-compiler-embeddable,
kotlin-gradle-plugin, and other gradle plugins,
when running `./gradlew dist`
2018-02-01 17:39:55 +03:00
Alexey Tsvetkov
d5ee77eb07 Avoid exception when listing configuration contents 2018-02-01 17:39:54 +03:00
Alexey Sedunov
f35af11423 Rename: Make improvements for "by-convention" calls
- Convert between conventions call for 'get' and 'invoke'
- Drop 'operator' when converting 'get'/'invoke' to something other than
  'invoke'/'get' respectively

 #KT-12365 Fixed
2018-02-01 15:41:09 +03:00
Alexey Sedunov
caeb594e09 Rename: Replace name identifiers via AST to prevent unwanted reformatting
#KT-8563 Fixed
2018-02-01 15:41:06 +03:00
Alexey Sedunov
58bf42c1dd Rename: Support KtTypeAlias in RenameKotlinClassProcessor
#KT-21719 Fixed
2018-02-01 15:41:04 +03:00
Alexey Sedunov
90392a8d8a Loop to Call Chain: Do not generate lambda with double wrapping block
#KT-22476 Fixed
2018-02-01 15:41:03 +03:00
Alexey Sedunov
8c9c1609c0 Move Class to Top Leve: Suggest file name based on new class name
#KT-17977 Fixed
2018-02-01 15:41:01 +03:00
Alexey Sedunov
4d52bf04fe Kotlin Ultimate: Support NodeJS CLI run configuration
#KT-16710 Fixed
2018-02-01 15:35:35 +03:00
Alexey Sedunov
1f7fab837f Gradle: Import production output path for JavaScript modules 2018-02-01 15:35:34 +03:00
Alexey Sedunov
80887a84ca Kotlin Ultimate: Add "Build" action to JS run configurations
#KT-20522 Fixed
2018-02-01 15:35:34 +03:00
Ilmir Usmanov
8ffb205f1c Reformat coroutineContext related code 2018-02-01 13:18:43 +03:00
Ilmir Usmanov
18c03f94f8 Move coroutineContext to correct package
from kotlin.coroutines.experimental.instrinsics to kotlin.coroutines.experimental

 #KT-22400
2018-02-01 13:18:32 +03:00
Natalia Selezneva
efabf80d37 Scratch: do not store psiFile in ScratchFile 2018-02-01 11:07:54 +03:00
Natalia Selezneva
c32a7dd852 Scratch: add logging 2018-02-01 10:21:55 +03:00
Natalia Selezneva
2140b9457d Minor: fix formatting 2018-02-01 10:21:55 +03:00
Natalia Selezneva
ac7beb41f3 Rearrange checkboxes in scratch panel 2018-02-01 10:21:55 +03:00
Natalia Selezneva
d6d2d4271b Scratch: restore information about module in scratch panel after ide restart 2018-02-01 10:21:55 +03:00
Natalia Selezneva
0a274a7e61 Align output in scratch file 2018-02-01 10:21:55 +03:00
Natalia Selezneva
8e98f703ac Change colors for scratch output 2018-02-01 10:21:55 +03:00
Natalia Selezneva
dc71ac09b2 Scratch: do not report errors from generated file to editor 2018-02-01 10:21:55 +03:00
Natalia Selezneva
ad90095dc7 Show multple errors in scratch toolwindow 2018-02-01 10:21:55 +03:00
Natalia Selezneva
d7c6dacc86 Temporary workaround: rename scratch files with kt extension to kts before additional api will be added in IDEA 2018-02-01 10:21:55 +03:00
Natalia Selezneva
c4971de7c1 Scratch: add Make before Run checkbox 2018-02-01 10:21:55 +03:00
Natalia Selezneva
a96cf147fc Scratch: add multifile tests 2018-02-01 10:21:55 +03:00
Natalia Selezneva
23ef50203e Use correct check for isRepl checkbox in scratch panel 2018-02-01 10:21:55 +03:00
Natalia Selezneva
654890fac3 Scratch: implement compiling executor 2018-02-01 10:21:55 +03:00
Natalia Selezneva
dda0b38fb9 Scratch: tests for repl execution 2018-02-01 10:21:55 +03:00
Natalia Selezneva
1a84c05db2 Scratch: implement output handlers for displaying execution results 2018-02-01 10:21:55 +03:00
Natalia Selezneva
01e62c9bdb Scratch: implement run action with repl 2018-02-01 10:21:55 +03:00
Natalia Selezneva
2ccf4b7d7f Initial support for scratch files 2018-02-01 10:21:55 +03:00
Alexey Sedunov
82a997e0a2 Kotlin Ultimate: Support Jest run configurations for Kotlin sources
#KT-21531 Fixed
2018-02-01 04:40:31 +03:00
Alexey Sedunov
2c0af794ea JS: Drop obsolete "Kotlin (JavaScript)" run configuration
#KT-21312 Fixed
2018-02-01 04:40:30 +03:00
Vyacheslav Gerasimov
bb6ab6309a Fix runIdeTask dependencies for communiti and ultimate 2018-01-31 21:36:03 +03:00
Vyacheslav Gerasimov
3e67bfd9b3 Exclude Kotlin plugin when unzipping intellij sdk 2018-01-31 20:10:25 +03:00
Vyacheslav Gerasimov
e20b6738f6 Extract removing bundled Kotlin plugin to separate task 2018-01-31 18:53:59 +03:00
Vyacheslav Gerasimov
59effef423 Delete bundled Kotlin plugin
Idea fails to start with two Kotlin plugins
2018-01-31 17:49:52 +03:00
Vyacheslav Gerasimov
527bdef447 Fix runIdeTask plugin path 2018-01-31 17:49:52 +03:00
Mikhail Glukhikh
babcea9edc Fix completion test (companion object is allowed in annotation scope) 2018-01-31 14:44:33 +03:00
Nicolay Mitropolsky
cf6e21daad Light annotations made strictly non-physical (KT-22565) 2018-01-31 14:31:35 +03:00
Mikhail Glukhikh
00ceac54fc Fix "create enum constant" test (create type alias is no longer here) 2018-01-31 13:56:07 +03:00
Nikolay Krasko
209c66ca1b Set better defaults on Imports tab in Code Style -> Kotlin (KT-22575)
"Top level symbols" and "Java Statics and Enum Members" are always
returned to 2 after saving to not-number option

 #KT-22575 Fixed
2018-01-31 13:27:30 +03:00
Nikolay Krasko
607fa30c5a Can't add import for using with '*' in settings (KT-22570)
#KT-22570 Fixed
2018-01-31 13:27:29 +03:00
Nikolay Krasko
894db730b2 Fix modification check for Kotlin import settings (KT-22557)
#KT-22557 Fixed
2018-01-31 13:27:29 +03:00
Nikolay Krasko
c0aa2c5469 Lost IF_RPAREN_ON_NEW_LINE settings from Kotlin code style 2018-01-31 13:27:29 +03:00
Nikolay Krasko
17da150bc2 Add ability to customize and save IF_RPAREN_ON_NEW_LINE setting 2018-01-31 13:27:29 +03:00
Ilya Chernikov
d70b9c1d76 Detect new activity after delayed shutdown correctly
fixes #KT-22549, test

(cherry picked from commit 50f34db)
2018-01-31 10:25:29 +01:00
Mikhail Glukhikh
98b0f91d84 Fix parcelize delete creator field test (companion is retained now) 2018-01-31 11:48:03 +03:00
Mikhail Glukhikh
294dcf36e8 Fix J2K 'testAnnotationInterface3' (annotation diagnostic changed) 2018-01-31 11:24:40 +03:00
Toshiaki Kameyama
677b05cc8c KT-22167 "Add annotation target" quick fix does nothing and disappears from menu 2018-01-30 20:25:08 +03:00
Mikhail Glukhikh
6fbf5a8904 Reverts commit 2472966
(Remove unused function parameter: minor improvement)
Transformation was not equivalent due to change signature in between
This revert fixes broken quick-fix tests (remove parameter based)
2018-01-30 18:43:25 +03:00
Vyacheslav Gerasimov
d0b232c172 Update readme part about dependencies 2018-01-30 17:06:18 +03:00
Vyacheslav Gerasimov
68b5dc756c Remove intellij-core from testRuntime if full idea is already there
Looks like it makes tests flacky
2018-01-30 17:06:18 +03:00
Vyacheslav Gerasimov
29caa00f23 Add asm-all to jps-plugin dependencies 2018-01-30 17:06:18 +03:00
Vyacheslav Gerasimov
bc86f40fd8 Update kotlinx-coroutines version to 0.20 2018-01-30 17:06:18 +03:00
Vyacheslav Gerasimov
89a07ded1c Extract versions and remove unnecessary '.jar' extensions 2018-01-30 17:06:18 +03:00
Vyacheslav Gerasimov
3e34b95610 Use KotlinTestUtils.findAndroidSdk() in BuildCacheRelocationIT 2018-01-30 17:06:18 +03:00
Vyacheslav Gerasimov
052be93c97 Add some logging to intellij-sdk build script 2018-01-30 17:06:17 +03:00
Vyacheslav Gerasimov
558a2cb8a8 Explicit intellijUltimateEnabled should override teamcity build 2018-01-30 17:06:17 +03:00
Vyacheslav Gerasimov
3d1e0c3b39 Add dependency versions for 171, 181, AS 2018-01-30 17:06:17 +03:00
Vyacheslav Gerasimov
ca6889b4c6 Fix build script for kotlin-gradle-subplugin-example 2018-01-30 17:06:17 +03:00
Vyacheslav Gerasimov
07b191f460 Update dependency versions after migration to 173 2018-01-30 17:06:17 +03:00
Ilya Chernikov
8ab121b373 Exclude new dependencies locations from CodeConformanceTest 2018-01-30 17:06:17 +03:00
Ilya Chernikov
555e9674b2 Fix dependencies to the cross-project tasks 2018-01-30 17:06:17 +03:00
Ilya Chernikov
434bbafe58 Implement runners without intellij plugin, share common part 2018-01-30 17:06:16 +03:00
Ilya Chernikov
0a95e7b20f Fix dependencies and artifacts contents after review 2018-01-30 17:06:16 +03:00
Ilya Chernikov
058ef31d7a Fixes after review 2018-01-30 17:06:16 +03:00
Ilya Chernikov
14e586d5a5 Refactor android sdk preparation project after review 2018-01-30 17:06:16 +03:00
Dmitry Jemerov
e83845ea72 Build changes to support Android Studio 2018-01-30 17:06:16 +03:00
Dmitry Jemerov
b2ca302bf7 Support downloading Android Studio 2018-01-30 17:06:16 +03:00
Dmitry Jemerov
f4feb71ad2 Extract repeated versions to a single location 2018-01-30 17:06:16 +03:00
Dmitry Jemerov
df17f20ec7 Fix project sync when intelliUltimateEnabled is not set 2018-01-30 17:06:16 +03:00
Dmitry Jemerov
a58a6290cc Fix typo 2018-01-30 17:06:15 +03:00
Ilya Chernikov
5dc094d290 Implement correct and fast ultimate/community sdks handling 2018-01-30 17:06:15 +03:00
Ilya Chernikov
6f1e6f1f1b Fix tests after rebasing and messing with the dependencies 2018-01-30 17:06:15 +03:00
Ilya Chernikov
246f73c879 Cleanup unused ant-related bits and script constants 2018-01-30 17:06:15 +03:00
Ilya Chernikov
0c35e79283 Fix idea home path usages 2018-01-30 17:06:15 +03:00
Ilya Chernikov
2dc4769c0a Fixes after rebase 2018-01-30 17:06:15 +03:00
Ilya Chernikov
172a29ba04 Implement NodeJS plugin downloading 2018-01-30 17:06:15 +03:00
Ilya Chernikov
48cbcbc496 Switch jsr305 usages to the maven version
since it is not available in the intellij ultimate SDK
2018-01-30 17:06:14 +03:00
Ilya Chernikov
acc84d2524 Rollback incorrect tests fix 2018-01-30 17:06:14 +03:00
Ilya Chernikov
7218bd536c Implement single idea sdk scheme, some refactoring 2018-01-30 17:06:14 +03:00
Ilya Chernikov
5f7c783bb2 Stop using com.intellij.openapi.components.service functions:
they are getting obfuscated in the ultimate SDK, which prevents us
from using ultimate sdk for all modules.
Could probably be rolled back after fixing KT-18563
2018-01-30 17:06:14 +03:00
Ilya Chernikov
d38b1c361a Add ultimate sdk 2018-01-30 17:06:14 +03:00
Ilya Chernikov
1219572aa0 Extract intellij params to buildSrc's build script 2018-01-30 17:06:14 +03:00
Ilya Chernikov
05f0978865 Fix after review 2018-01-30 17:06:14 +03:00
Ilya Chernikov
fbbece3c86 Fix publishing problem 2018-01-30 17:06:13 +03:00
Ilya Chernikov
7e21573cf4 Convert the rest of the project to intellij repo prepared in buildSrc 2018-01-30 17:06:13 +03:00
Ilya Chernikov
e23b1529b3 Convert intellij usages in the groovy build scripts 2018-01-30 17:06:13 +03:00
Ilya Chernikov
4eb557724c Convert compiler projects to the new intellij deps 2018-01-30 17:06:13 +03:00
Ilya Chernikov
a418a3ac49 Renaming for easier conversion, some more manual conversion 2018-01-30 17:06:13 +03:00
Ilya Chernikov
6f21c36d68 Switch first project to the new custom dependencies schema 2018-01-30 17:06:13 +03:00
Ilya Chernikov
47507ad694 Switch all usages of dx.jar to the new mechanism, cleanup and refactoring 2018-01-30 17:06:13 +03:00
Ilya Chernikov
eabbebd458 Prepare intellij sdk deps in buildSrc 2018-01-30 17:06:13 +03:00
Yan Zhulanow
59c8f33450 Fix jps android test 2018-01-30 17:06:12 +03:00
Ilya Chernikov
46be5e25be Rewrite android sdk dependencies to avoid config-time tasks execution 2018-01-30 17:06:12 +03:00
Ilya Chernikov
febab82c7e Switch jps android test to platform 26 2018-01-30 17:06:12 +03:00
Ilya Chernikov
7120fe190a Fix overrides of the findViewById in android tests for platform 26 2018-01-30 17:06:12 +03:00
Ilya Chernikov
587f76251e Fix os-specific downloads in android sdk 2018-01-30 17:06:12 +03:00
Ilya Chernikov
e8494a5371 Fix uast-kotlin dependencies and tests 2018-01-30 17:06:12 +03:00
Ilya Chernikov
a6f8db5d02 Fix script-util tests 2018-01-30 17:06:12 +03:00
Ilya Gorbunov
7710cc455c Refactor helper tasks for TeamCity builds
Invoke them properly from TeamCityBuild.xml acting as a temporary adapter.
Remove obsolete tasks from TeamCityBuild.xml.

Patch plugin version with regex replacement in plugin.xml.
2018-01-30 17:06:12 +03:00
Ilya Chernikov
b5db681e06 Switch tests to android sdk 26 2018-01-30 17:06:11 +03:00
Ilya Chernikov
c153a386ab Fix tests 2018-01-30 17:06:11 +03:00
Ilya Chernikov
a4f28cd94f Make all dependencies to idea sdk intransitive 2018-01-30 17:06:11 +03:00
Ilya Chernikov
e76cd802d8 Fix jps tests 2018-01-30 17:06:11 +03:00
Ilya Chernikov
b2926a9322 Add classpath printing tasks to all relevant projects 2018-01-30 17:06:11 +03:00
Ilya Chernikov
0b63e11ea8 Replace android sdk dependencies with custom project build, cleanup update_dependencies.xml 2018-01-30 17:06:11 +03:00
Ilya Chernikov
98204aa2d3 Move jflex download out from update_dependencies, add lexer (ant) tasks to frontend project 2018-01-30 17:06:11 +03:00
Ilya Chernikov
90e5558704 Re-add node.js tests, switch to direct usage of node_utils.xml, remove node parts from update_dependencies.xml 2018-01-30 17:06:10 +03:00
Ilya Chernikov
7f86fb9343 Switch to idea NodeJS plugin usage via intellij gradle plugin 2018-01-30 17:06:10 +03:00
Ilya Chernikov
69787bd0d1 Switch spring usages to regular dependency 2018-01-30 17:06:10 +03:00
Ilya Chernikov
d301938d23 Rewrite TeamCityBuild.xml tasks in gradle, finally drop build.xml files
also:
  proxying previous tasks from TeamCityBuild.xml to gradle,
  cleaning update_dependencies.xml from ant dependencies
2018-01-30 17:06:10 +03:00
Ilya Chernikov
12f0f019da Switch robolectric usages to regular dependency 2018-01-30 17:06:10 +03:00
Ilya Chernikov
361d8536ac Switch ant usages to regular dependency 2018-01-30 17:06:10 +03:00
Ilya Chernikov
486c3a2aff Do not depende on the ideaSdk location in integration tests
assume that tests are always run from the project's root
2018-01-30 17:06:10 +03:00
Ilya Chernikov
f96153693e Make tools.jar search non-throwing 2018-01-30 17:06:09 +03:00
Ilya Chernikov
80ad969f7b Switch markdown usages to regular (teamcity) dependency 2018-01-30 17:06:09 +03:00
Ilya Chernikov
78d2c655d5 Switch native-platform usages to regular dependency 2018-01-30 17:06:09 +03:00
Ilya Chernikov
4a47fb3ffb Switch protobuf usages to regular dependency 2018-01-30 17:06:09 +03:00
Ilya Chernikov
a952d797f1 Switch org.json:json usages to regular dependency 2018-01-30 17:06:09 +03:00
Ilya Chernikov
8f96157d7f Switch kotlinx-coroutines usages to regular dependency 2018-01-30 17:06:09 +03:00
Ilya Chernikov
8bc95295eb Drop other references to ideaSdk 2018-01-30 17:06:09 +03:00
Ilya Chernikov
9766508512 Drop drop lib folder and all (arguably obsolete) dependent usages 2018-01-30 17:06:09 +03:00
Ilya Chernikov
713fb9a0e7 Drop ideaSdk downloading in update_dependencies 2018-01-30 17:06:08 +03:00
Ilya Chernikov
b490a79d95 Replace direct usages of ideaSdk in tests with property passed from build scripts 2018-01-30 17:06:08 +03:00
Ilya Chernikov
eb8ef6e803 Drop unused sources 2018-01-30 17:06:08 +03:00
Ilya Chernikov
d39d2883e2 Ignore local data dir in idea and git 2018-01-30 17:06:08 +03:00
Ilya Chernikov
26369c3cca Cleanup obsolete ideaSdk helpers 2018-01-30 17:06:08 +03:00
Ilya Chernikov
28689f631c Convert instrumentation 2018-01-30 17:06:08 +03:00
Ilya Chernikov
10732a1bdd Convert ultimate runner to intellij plugin 2018-01-30 17:06:08 +03:00
Ilya Chernikov
5d3579c079 Convert idea ultimate module to intellij plugin 2018-01-30 17:06:08 +03:00
Ilya Chernikov
f0edb602da Convert ide-runner to intellij plugin 2018-01-30 17:06:07 +03:00
Ilya Chernikov
556287f9bb Move idea plugin artifacts one dir deeper to simplify runIde task
Running idea via specifying plugins dir (instead of plugin.path property
allow idea to select proper plugin version without a need to remove a bundled
plugin. But in order to make it work, the regular and ultimate plugins
should have separate parent dirs.
2018-01-30 17:06:07 +03:00
Ilya Chernikov
06c8cbf7d6 Convert all remaining plugin modules to intellij plugin 2018-01-30 17:06:07 +03:00
Ilya Chernikov
9b51a547d8 Convert generators to intellij plugin, clean up dependencies 2018-01-30 17:06:07 +03:00
Ilya Chernikov
0d264793ce Convert idea plugin modules to intellij plugin 2018-01-30 17:06:07 +03:00
Ilya Chernikov
3912025e14 Convert jps module to intellij plugin 2018-01-30 17:06:07 +03:00
Ilya Chernikov
8266777bd5 Convert js modules to intellij plugin 2018-01-30 17:06:07 +03:00
Ilya Chernikov
74411d9b9c Convert all compiler modules to intellij plugin 2018-01-30 17:06:06 +03:00
Ilya Chernikov
6614695616 Convert more projects 2018-01-30 17:06:06 +03:00
Ilya Chernikov
743f599262 Add infrastructure and helpers for using intellij plugin, convert first project 2018-01-30 17:06:06 +03:00
Mikhail Glukhikh
a0d0bc074b Cleanup: KotlinPullUpHelper 2018-01-30 16:32:20 +03:00
Mikhail Glukhikh
cefa17f877 Reformat: KotlinPullUpHelper 2018-01-30 16:30:08 +03:00
Mikhail Glukhikh
d88b5746c7 Delete companion manually during pull up 2018-01-30 16:29:22 +03:00
Mikhail Glukhikh
7c6a217579 Reformat: KotlinInlineCallableProcessor 2018-01-30 16:03:14 +03:00
Mikhail Glukhikh
6181ba47c8 Delete companion manually during callable inlining 2018-01-30 16:02:32 +03:00
Mikhail Glukhikh
9b1f323118 Retain empty companion in KtNamedDeclarationStub.remove 2018-01-30 15:41:38 +03:00
Mikhail Glukhikh
5abb9dd23e Create actual fix: handle companions correctly #KT-21114 Fixed 2018-01-30 15:41:37 +03:00
Mikhail Glukhikh
f46fa263ef Fix two psi checker tests (related to annotation diagnostic / parsing) 2018-01-30 15:41:06 +03:00
Mikhail Glukhikh
86f25bff63 KtVisitor: delegate constructors to KtNamedDeclaration
In particular, enables back "Unused symbol" on constructors
2018-01-30 15:24:39 +03:00
Mikhail Glukhikh
460688526d Fix testAnnotationInterface3 in J2K (error message) 2018-01-30 15:23:41 +03:00
Mikhail Glukhikh
899da99232 Fix testAnnotation in "member visibility can be private" 2018-01-30 14:59:47 +03:00
Dmitry Savvinov
404122654f Advance bootstrap version to 1.2.30-dev-672 2018-01-30 13:32:07 +03:00
Mikhail Zarechenskiy
c80beea6fd [NI] Refactoring: extract method to create resolution result out 2018-01-30 13:01:21 +03:00
Mikhail Zarechenskiy
0e31162df4 [NI] Fix substitution for receiver when resolving constructor super call 2018-01-30 13:00:44 +03:00
Mikhail Zarechenskiy
2a0bb68e1c [NI] Fix substitution of NotNullTypeParameter 2018-01-30 13:00:43 +03:00
Mikhail Zarechenskiy
4cd07f59a0 [NI] Don't fail on captured type that contains type variable 2018-01-30 13:00:42 +03:00
Mikhail Zarechenskiy
145c04e7e2 [NI] Fix substitution of incorporation constraint type 2018-01-30 13:00:40 +03:00
Mikhail Glukhikh
725704e70f ExclExclCallFixes: reformat 2018-01-30 11:23:18 +03:00
Mikhail Glukhikh
2472966749 Remove unused function parameter: minor improvement 2018-01-30 11:23:18 +03:00
Mikhail Glukhikh
1298ef7fed Redundant Unit expression: simplify code a bit 2018-01-30 11:18:01 +03:00
Mikhail Glukhikh
cd9e298e53 getParentOfTypesAndPredicate: Class<T> -> Class<out T> 2018-01-30 11:17:27 +03:00
Toshiaki Kameyama
18de0f75ab Redundant Unit inspection: fix false positive for single expression
So #KT-22097 Fixed
2018-01-30 10:03:36 +03:00
Mikhail Glukhikh
30acc224ec Reformat: redundant setter 2018-01-30 10:00:02 +03:00
Toshiaki Kameyama
69f3f04fe4 Correct report of "redundant setter" for override & empty block cases
So #KT-22364 Fixed
2018-01-30 09:59:55 +03:00
Alexander Udalov
0ad3872d1b Remove unneeded constructor parameters in CallCheckerContext 2018-01-29 19:38:03 +01:00
Dmitry Savvinov
1171fdb14d Add draft of changelog for 1.2.30 2018-01-29 19:50:04 +03:00
Dmitry Savvinov
a39aba4269 Revert "Add changelog for 1.2.30"
This reverts commit 4b70654c7e.
2018-01-29 19:45:08 +03:00
Dmitry Savvinov
4b70654c7e Add changelog for 1.2.30 2018-01-29 19:42:26 +03:00
Toshiaki Kameyama
28123eaf7b Add intention for changing setter accessibility #KT-22409 Fixed 2018-01-29 19:09:19 +03:00
Alexey Sedunov
7f97d58970 Type Hierarchy: Do not use JVM class mapping in non-JVM modules
#KT-21424 In Progress
2018-01-29 18:56:29 +03:00
Alexey Sedunov
089b34a8a9 Minor: Regenerate tests 2018-01-29 18:56:28 +03:00
Mikhail Glukhikh
1f8e2a1057 Reformat: unfold return to ... 2018-01-29 18:01:10 +03:00
Toshiaki Kameyama
3a81be6cfb Do not insert returns before Nothing in "Replace return with 'if'"
So #KT-22159 Fixed
2018-01-29 17:56:26 +03:00
Mikhail Glukhikh
f28bec0db1 Reformat: if-then utilities 2018-01-29 17:49:34 +03:00
Mikhail Glukhikh
3b8f5bce41 Reformat: "if then to safe access" inspection 2018-01-29 17:44:19 +03:00
Toshiaki Kameyama
fad7818bf0 Fix "if to safe access" false positive for check on incorrect type
So #KT-21881 Fixed
2018-01-29 17:43:01 +03:00
Mikhail Glukhikh
5798595206 Cleanup: IntentionDescriptionTest 2018-01-29 16:28:45 +03:00
kenji tomita
a28bc830f5 Add Intention for single character substring #KT-22171 Fixed 2018-01-29 16:23:01 +03:00
Mikhail Glukhikh
29eb594309 Inspection to replace Java Collections methods: simplify type check
Related to KT-22038
2018-01-29 15:52:45 +03:00
Mikhail Glukhikh
068f520c01 Inspection to replace Java Collections methods: fix formatting 2018-01-29 15:52:45 +03:00
Toshiaki Kameyama
be4739e65e Inspection to replace Java Collections methods: extend set of types
So #KT-22038 Fixed
2018-01-29 15:52:44 +03:00
Alexey Sedunov
bd8a4d78fa Line Markers: Don't show test run line markers for top-level functions
#KT-13509 Fixed
2018-01-29 14:48:41 +03:00
Mikhail Glukhikh
8cbf364457 Remove braces: add parentheses to if-else in more general case
Related to KT-18308
2018-01-29 14:32:36 +03:00
Toshiaki Kameyama
44c15d8311 Remove braces: add parentheses to if-else inside expression
So #KT-18308 Fixed
2018-01-29 14:32:36 +03:00
Alexander Udalov
19e38bbc72 Do not run annotation checkers for every non-annotated element 2018-01-29 12:22:41 +01:00
Alexander Udalov
46b8deedf7 Run classifier usage checkers on constructor calls
In some cases, REFERENCE_TARGET for annotation entries is the annotation
class descriptor, and in others -- the constructor of that class
2018-01-29 12:22:41 +01:00
Alexander Udalov
8cd7686535 Introduce DeclarationCheckerContext, remove SimpleDeclarationChecker 2018-01-29 12:22:40 +01:00
Alexander Udalov
4cb5483c13 Introduce CheckerContext and ClassifierUsageCheckerContext
To reduce the number of parameters in classifier usage checker
implementations, and to unify the API with call checkers
2018-01-29 12:20:36 +01:00
Alexander Udalov
e2def0c60e Do not report "invalid type of annotation member" on error types
In case the referred type is actually an enum that is not found in
dependencies due to a configuration problem, this usage could be valid.
So we can avoid reporting an error here, to reduce the number of
diagnostics.

Also do not report "default value of annotation parameter must be a
compile-time constant" in the same case for the same reason
2018-01-29 12:20:36 +01:00
Natalia Selezneva
c251386fc3 Rearrange script templates in GradleScriptTemplateProvider
#KT-22473 Fixed
2018-01-29 11:16:29 +03:00
Alexey Sedunov
b091500adc Rename: Wrap facade class when renaming file
This prevents assertion error (introduced in IDEA 181)
caused by facade light class invalidation
and fixes failing test
2018-01-29 01:34:48 +03:00
Alexey Sedunov
80643c5603 Rename: Fix processing of functions without light methods
#KT-22461 Fixed
2018-01-29 01:34:48 +03:00
Alexander Udalov
245d1de2a2 Remove runtime dependency on projectDist(":kotlin-compiler")
This dependency makes IDEA reindex kotlin-compiler.jar after every
Gradle build, which takes time and breaks some key IDE features
2018-01-28 10:14:24 +01:00
Dmitry Savvinov
4d951de616 Propagate nullability changes to enhancement for JSR-305 types
Fix TypeUtils.makeNullableAsSpecified for SimpleTypeWithEnhancement and
FlexibleTypeWithEnhancement: change nullability of enhancement too. This
fixes several false-positive warnings, like in KT-20855 and KT-20466.

Note that it removes warning in some cases (see testdata change for
uselessElvisRightIsNull.kt). However, this removes warning about
*unnecessary* elvis, i.e. this fixed introduces weak false-negatives, which
is acceptable for the moment.

#KT-20855 Fixed Target versions 1.2.30
#KT-20466 Fixed Target versions 1.2.30
#KT-21238 Fixed Target versions 1.2.30
2018-01-26 12:49:14 +03:00
Nikolay Krasko
4c76dc7287 Forbid modification for KtLambdaExpression in JavaCodeBlockModificationListener
See IDEA-185462 for details
2018-01-26 12:42:17 +03:00
Nikolay Krasko
4d2061d836 Minor: reformat coverage 2018-01-26 12:42:17 +03:00
Nikolay Krasko
6d7c779df2 Better diagnostic for file absence in updateJar (KT-22272)
#EA-96117 Fixed
 #KT-22272 Fixed
2018-01-26 12:42:16 +03:00
Toshiaki Kameyama
7e417272b2 "Join lines" works incorrectly in case of line containing more than one string literal (KT-22374)
#KT-22374 Fixed
2018-01-26 12:42:16 +03:00
Mikhael Bogdanov
cc346aef64 Support @JvmStatic for interface companion objects in backend 2018-01-26 10:09:21 +01:00
Mikhael Bogdanov
8bfd6d7404 Support JVM_TARGET in diagnostic tests 2018-01-26 10:09:20 +01:00
Mikhael Bogdanov
c4da370b0b Allow to use @JvmStatic in interface companion object 2018-01-26 10:09:20 +01:00
Mikhael Bogdanov
2340756b88 Minor. Reformat 2018-01-26 10:09:20 +01:00
Dmitry Savvinov
253cd3871b Support effect system-related args in platform 2018-01-26 11:30:44 +03:00
Dmitry Savvinov
b29a6e48fb Refactor language features, which control effect system
- Introduce new language feature 'ReadDeserializedContracts', which
allows to deserialize contracts from metadata.

- Introduce new language feature 'AllowContractsForCustomFunctions',
which allows reading contracts from sources.

- Use new features instead of combination 'CallsInPlaceEffect ||
ReturnsEffect'

- Rename 'CallsInPlaceEffect' -> 'UseCallsInPlaceEffect',
'ReturnsEffect' -> 'UseReturnsEffect'. As names suggest, they control
if it is allowed to use corresponding effect in analysis.

We have to introduce separate 'ReadDeserializedContracts' to enable
contracts only in some modules of the project, because libraries are
read with project-wide settings (see KT-20692).
2018-01-26 11:30:44 +03:00
Dmitry Savvinov
78850087be Revert reformatting for OperationsMapGenerated.kt 2018-01-26 11:00:28 +03:00
Dmitry Petrov
5e34f290ce Reified 'as?' produces nullable result
Previously, this was treated as a regular CHECKCAST, causing KT-22410.

 #Fixed KT-22410 Target versions 1.2.30
2018-01-26 10:22:59 +03:00
Dmitry Petrov
bd25bf14df Minor: reformat code in org.jetbrains.kotlin.codegen.optimization 2018-01-26 10:18:17 +03:00
Yan Zhulanow
e12deb54d6 Android Extensions: Fix "Inconsistent file tree" exception on Activity creation (KT-22349) 2018-01-25 22:03:30 +03:00
Yan Zhulanow
7b055c2172 Kapt: Prefer non-aliased imports over aliased. Make sure the imported short names are unique (KT-22083) 2018-01-25 22:03:29 +03:00
Ilya Gorbunov
233376eef0 Improve min/max specialization for longs and 3-arg overloads in JS 2018-01-25 21:41:18 +03:00
Ilya Gorbunov
2da9f12bc5 Inline findAnyOf(chars) into indexOfAny/lastIndexOfAny
This helps to reduce allocation count

#KT-22042
2018-01-25 21:37:22 +03:00
Cuihtlauac ALVARADO
923d9f03fc Update test results
Separated issue reported: KT-22522

#KT-22369 Fixed
2018-01-25 21:15:08 +03:00
Denis Zharkov
31e73e90d6 Explicitly state that PluginDeclarationProviderFactory is source-only
Before this change `filesScope` was effectively empty in cases when
module info is a library, thus looking
into PackageIndexUtil.packageExists(name, indexedFilesScope, project)
was kind of redundant since it always returns false for empty scopes

The initial motivation was run by 1716720604
that made PackageIndexUtil::packageExists calls much more frequent
2018-01-25 14:41:28 +03:00
Denis Zharkov
2224f95294 Minor. Avoid wrapping GlobalSearchScope.EMPTY_SCOPE 2018-01-25 14:41:28 +03:00
Denis Zharkov
4d378912bf Minor. Reformat JVM/JS analyzer facades 2018-01-25 14:41:28 +03:00
Toshiaki Kameyama
4232ad8dfe "Join lines" works incorrectly in case of line with more than one string literal (KT-22374)
#KT-22374 Fixed
2018-01-24 20:09:32 +03:00
Toshiaki Kameyama
c06aaf6128 Some Live Templates should probably be enabled also for "expressions" not only "statements" (KT-19194)
Consider if-then, if-else, do-while, while positions without block as
statement position.

 #KT-19194 Fixed
2018-01-24 20:09:32 +03:00
Alexander Udalov
543db380d2 Use isJvmInterface in JVM back-end instead of isInterface
To support const vals and proper initialization order for companions of
annotations (since 1.3+) as well as interfaces

 #KT-16962 Fixed
2018-01-24 15:54:35 +01:00
Alexander Udalov
a46a2b9b1c Support nested classes in annotation classes
#KT-16962 In Progress
2018-01-24 15:54:35 +01:00
Alexey Sedunov
5947b4eb8e Minor: Fix Maven server url 2018-01-24 17:52:41 +03:00
Alexey Sedunov
c96eb8df85 Minor: Fix test data for ConvertFunctionTypeParameterToReceiverIntention 2018-01-24 17:28:34 +03:00
Sergey Igushkin
a59fd3bc85 Remove the usage of repository.jetbrains.com 2018-01-24 17:12:45 +03:00
Ilya Gorbunov
32b68ae1d5 Rearrange platform specialized functions
Place them according to their operation to ArrayOps and Filtering.
2018-01-24 02:10:05 +03:00
Ilya Gorbunov
eda8bbacb3 Remove obsolete JvmVersion annotation from generated functions
These functions are already generated in jvm-only file
2018-01-24 02:10:01 +03:00
Sergey Igushkin
20c4775da0 Remove repository.jetbrains.com mirror of Maven Central in libraries. 2018-01-23 23:41:39 +03:00
Sergey Igushkin
0c78a2c026 Remove some of the remaining mentions of repository.jetbrains.com 2018-01-23 23:35:50 +03:00
Alexander Udalov
f516667640 Exclude META-INF/services from kotlin-reflect-sources.jar 2018-01-23 17:11:20 +01:00
Alexander Udalov
3bf5f44b9d Exclude .proto files from kotlin-reflect.jar
#KT-22459 Fixed
2018-01-23 17:11:09 +01:00
Vyacheslav Gerasimov
399282234e Add changelog for 1.2.21 2018-01-23 17:47:17 +03:00
Ilya Gorbunov
6b9520ec73 KT-16661 Simplify String.split a bit more
Check that limit is reached only once in a loop, move nextIndex check to the end of loop.
2018-01-23 13:29:35 +03:00
Vsevolod
510e17246f KT-16661 Simplify Strings#split
Do not search for next occurrence if limit is reached.
2018-01-23 13:29:29 +03:00
Vsevolod
2805371bdc KT-16661 Provide fast-path for Strings#split with single delimiter
Optimize single delimiter split when no matches is found:
Return listOf() of single element instead of adding 'this' to result
because underlying array in ArrayList is created lazily and
by default its size is 16.

Pre-size resulting list in split when limit is known.
2018-01-23 13:29:05 +03:00
Dmitry Petrov
72ffbb9825 Add test for array modification within for-in-array-withIndex loop body 2018-01-23 10:55:24 +03:00
Dmitry Petrov
40d1925e19 Provide optimized code generation for for-in-withIndex for sequences
#KT-5177 In Progress
2018-01-23 10:55:24 +03:00
Dmitry Petrov
2399a39414 Provide optimized code generation for for-in-withIndex for CharSequences
#KT-5177 In Progress
2018-01-23 10:55:24 +03:00
Dmitry Petrov
9c9e507172 Provide optimized code generation for for-in-withIndex for iterables
#KT-5177 In Progress
2018-01-23 10:55:24 +03:00
Dmitry Petrov
08622b0953 Provide optimized code generation for for-in-withIndex for arrays
#KT-5177 In Progress
2018-01-23 10:55:24 +03:00
Dmitry Petrov
e07e9c0ea5 Refactor RangeCodegenUtil: introduce isTopLevelExtensionOnType 2018-01-23 10:55:24 +03:00
Dmitry Petrov
fb487b31ba Minor: format code in RangeCodegenUtil 2018-01-23 10:55:24 +03:00
Dmitry Petrov
5c1321a29f Minor: format code in org.jetbrains.kotlin.codegen.range 2018-01-23 10:55:24 +03:00
Alexey Tsvetkov
f77586574f Always sort files in K2JSCompiler
Previously files were sorted only when IncrementalDataProvider
was not null to normalize js output in case of incremental compilation.
Because of that an output js file could be different after rebuild
in IC tests.
The issue could be reproduced anywhere, but the tests failed only on
Windows, and it seems tests were not run on Windows for some time.
2018-01-22 18:34:17 +03:00
Alexey Tsvetkov
21f2b68357 Fix BuildLogParserParametrizedTest on Windows: normalize line separators 2018-01-22 18:34:17 +03:00
Alexey Tsvetkov
6fc5c3325c Minor: rename file to match class name 2018-01-22 18:34:17 +03:00
Alexey Sedunov
737d7dcc2f Kotlin Facet: Use Kotlin SDK for non-JVM imported modules 2018-01-22 12:21:13 +03:00
Alexey Sedunov
70cb08bfdb Misc: Update test data (new 'allopen' Spring annotations added) 2018-01-22 12:21:12 +03:00
Denis Zharkov
2e933a165a Avoid retaining all protobuf objects in DeserializedMemberScope
Object model for deserialized protobuf isn't very cheap, so
loading just our stdlib's packages several times (as we do in the IDE)
might lead to ~ 96 MB of retained memory just by these objects.

While in fact many of them remain unused

 #KT-21517 Fixed
2018-01-22 10:48:25 +03:00
Nikolay Krasko
b701117ffb Minor: reformat, and warning fixes in outdated notification subsystem 2018-01-19 22:41:52 +03:00
Nikolay Krasko
2386cfbd07 Do not spell check overridden declaration names (KT-15000)
#KT-15000 Fixed
2018-01-19 22:41:51 +03:00
Anton Bannykh
ff00831109 JS: minor fixes in kotlin-test-js-it
Jasmine version 2.6.0 doesn't support Promise-based
asynchronous tests.
Also the error message for an unexpected test result was incorrect.
2018-01-19 20:16:31 +03:00
Ilmir Usmanov
f4ad5182b8 Fix OOM error in ReturnUnitMethodTransformer
#KT-22345: Fixed
2018-01-19 20:13:23 +03:00
Ilya Gorbunov
40aa2280a5 Replace .. with until or indices where appropriate
Replace indices.reversed() with lastIndex..0 as it is not optimized in JS yet
2018-01-19 19:53:09 +03:00
Alexander Udalov
513f50785e Use processResources task to copy compiler.xml to IDEA plugin
This fixes tests broken in 4b2d281bba and 95f9884799
2018-01-19 17:26:33 +01:00
Alexander Udalov
4b2d281bba Include META-INF/extensions/compiler.xml into IDEA plugin
This fixes tests and IDEA run configurations broken in 95f9884799
2018-01-19 15:13:40 +01:00
Mikhail Glukhikh
577c6cde82 KtInvokeFunctionReference: protect from KNPE in getLambdaExpression
So EA-114887 Fixed
2018-01-19 16:16:33 +03:00
Mikhail Glukhikh
26c1673da0 J2K: KtInvokeFunctionReference 2018-01-19 16:16:31 +03:00
Mikhail Glukhikh
117c5a29fb KtInvokeFunctionReference.java -> kt 2018-01-19 16:16:22 +03:00
Mikhail Glukhikh
b1bff24cde Move lambda inside: protect from KNPE in getLambdaExpression
So EA-114888 Fixed
2018-01-19 16:16:21 +03:00
Mikhail Glukhikh
f675d9fd81 Convert reference to lambda: protect from root fq name EA-114907 Fixed 2018-01-19 16:16:19 +03:00
Mikhail Glukhikh
3c19af3645 Convert reference to lambda: reformat 2018-01-19 16:16:18 +03:00
Mikhail Glukhikh
9d9b2b2a58 Fix stub inconsistency in "inline type parameter fix"
Fixes one quick-fix test
2018-01-19 16:16:17 +03:00
Mikhail Glukhikh
1924172189 Inline type parameter fix: reformat 2018-01-19 16:16:16 +03:00
Mikhail Glukhikh
ee3f89df87 Remove unused function parameter: delete empty constructor accurately
So #KT-22221 Fixed
Fixes also some quick-fix tests
2018-01-19 16:16:15 +03:00
Mikhail Glukhikh
c4ef95dbf7 Remove empty primary constructor: reformat 2018-01-19 16:16:13 +03:00
Mikhail Glukhikh
ac1c40c0e6 Add function to supertype fix: get rid of incorrect type comparator
So EA-100297 Fixed
2018-01-19 16:16:12 +03:00
Mikhail Glukhikh
7f947bed1e Add function to supertype fix: reformat 2018-01-19 16:16:11 +03:00
Mikhail Glukhikh
925e4e0a67 KotlinUnusedImportInspection: use LocalQuickFixOnPsiElement 2018-01-19 16:16:10 +03:00
Mikhail Glukhikh
a3dda258c8 KotlinUnusedImportInspection (minor): specify platform type 2018-01-19 16:16:09 +03:00
Mikhail Glukhikh
dade8deea6 KotlinUnusedImportInspection: reformat 2018-01-19 16:16:07 +03:00
Mikhail Glukhikh
c54dd6385c KotlinUnusedImportInspection: check for disposal of progress indicator
So #KT-22335 Fixed
2018-01-19 16:16:06 +03:00
Mikhail Glukhikh
c52fcdde70 Remove explicit type: reformat 2018-01-19 16:16:05 +03:00
Mikhail Glukhikh
512e287f3a Remove setter parameter type: do not suggest if type is empty
So #KT-22339 Fixed
2018-01-19 16:16:04 +03:00
Mikhail Glukhikh
f0b172ca35 Remove setter parameter type: reformat 2018-01-19 16:16:02 +03:00
Sergey Igushkin
c8900d672f Update Gradle plugins build instructions 2018-01-19 12:58:39 +03:00
Mikhael Bogdanov
4c1eb21805 Minor. Add assertion message 2018-01-19 10:42:02 +01:00
Nicolay Mitropolsky
2623ae714c Uast: consistency updates for ULambdaExpression 2018-01-19 10:45:58 +03:00
Nicolay Mitropolsky
25cd54713b Uast: consistency for imports-expressions 2018-01-19 10:45:58 +03:00
Nicolay Mitropolsky
d5d49c65b4 Uast: tests for UClass.uastSuperTypes 2018-01-19 10:45:58 +03:00
Mikhael Bogdanov
7b212c5650 Add support for android MPP
#KT-18462 Fixed
2018-01-18 15:21:19 +01:00
Toshiaki Kameyama
2a10d8e837 KT-15176 Remove "Create type alias" intention when called on java class 2018-01-18 16:23:40 +03:00
Dmitry Savvinov
44920f42d8 [NI] Fix unit coercion
Consider following case:

fun foo(): Unit = run { "hello" }

Previously, NI would analyze lambda body without expected type, because
it is a type variable 'R' from 'run', which hasn't been fixed yet. This
leads to treating "hello" as lambda-return argument and adding bogus
'String' constraint on 'R', and, consequently, type mismatch.

Now, we peek into current constraint system and check if return-type of
lambda is type variable with upper-Unit constraint (which is exactly
condition for its body to be Unit-coerced). If so, then we provide
expected Unit-type for body explicitly, and the rest will be done
automatically (in particular, in aforementioned example "hello" wouldn't
be treated as lambda return argument).
2018-01-18 15:13:45 +03:00
Alexander Udalov
b3eeb2f735 Remove unneeded members of ConstantValueFactory 2018-01-18 12:49:38 +01:00
Alexander Udalov
82574cb570 Do not store ClassDescriptor in EnumValue
Only store the ClassId of the enum class and the Name of the entry, and
resolve the needed descriptor in getType() instead, which now takes the
module instance where that descriptor should be resolved
2018-01-18 12:49:38 +01:00
Alexander Udalov
9290d58ed0 Improve "firstArgumentValue" and "argumentValue" extension functions
Using the argument value, which is of type "Any?", is more implicit and
thus difficult to read than using the ConstantValue instance and casting
it to the needed constant value implementation before taking the value
2018-01-18 12:49:38 +01:00
Alexander Udalov
899002b681 Refactor JavaEnumValueAnnotationArgument and implementations
Only require implementations to be able to compute the enum class name
and the corresponding entry name. Only this should be necessary to
correctly resolve the argument; the resolvers will find the
corresponding class descriptor if necessary
2018-01-18 12:49:38 +01:00
Alexander Udalov
907f53e539 Refactor ConstantValue implementations
Remove KotlinBuiltIns and take a ModuleDescriptor instance in getType
instead. This will allow to create constant values in contexts where
there's no module or built-ins accessible (such as, deserialization of
module annotations during indexing of .kotlin_module files in IDE).

Note that some values (KClassValue, EnumValue, AnnotationValue) still
take module-dependent objects (KotlinType, ClassDescriptor and
AnnotationDescriptor respectively). This is to be refactored later
2018-01-18 12:49:38 +01:00
Alexander Udalov
5e97517c8b Fix bug in StringValue.equals
Also simplify equals() implementations of other constant values
2018-01-18 12:49:38 +01:00
Alexander Udalov
95f9884799 Move META-INF/extensions/compiler.xml to module 'cli' 2018-01-18 12:48:04 +01:00
Alexander Udalov
02857dbfdb JS: support "LANGUAGE" directives in box tests 2018-01-18 12:46:27 +01:00
Alexander Udalov
8b3d439d5b JS: minor, simplify code locating default argument values
At the only call site of getDefaultArgument it is checked that the
parameter actually _declares_ default value, so it's not necessary to
try to load that value from supertypes
2018-01-18 12:46:27 +01:00
Nikolay Krasko
ae2d67a5b1 Update "Kotlin configured but no stdlib" status on file update (KT-22356)
Provide feedback before project re-import is finished.

 #KT-22356 Fixed
2018-01-18 12:13:54 +03:00
Nikolay Krasko
2637a36e22 Inspection doesn't suggest Maven Plugin for kotlin-stdlib-jre8 (KT-18007)
#KT-18007 Fixed
2018-01-18 12:13:53 +03:00
Nikolay Krasko
4a2440ea0f Reformat and cleanup idea-maven_main module 2018-01-18 12:13:53 +03:00
Mikhael Bogdanov
7f1cc81d39 Support test directives in android tests 2018-01-18 10:08:58 +01:00
Mikhael Bogdanov
ef1a3ec32d Convert CodegenTestsOnAndroidGenerator to Kotlin 2018-01-18 10:08:58 +01:00
Mikhael Bogdanov
7e6542b8c8 Renema CodegenTestsOnAndroidGenerator.java to CodegenTestsOnAndroidGenerator.kt 2018-01-18 10:08:57 +01:00
Denis Zharkov
1716720604 Optimize declaration providers for case of non-existing packages
Avoid creating memoized function nodes when the value is obviously null
Otherwise, it may lead to about 25M retained by empty concurrent hashmap
nodes
2018-01-18 11:40:26 +03:00
Denis Zharkov
0f74bb4a7a Get rid of compile dependency to 'compiler-embeddable' from :idea
Previously, it's been added transitively from :kotlin-compiler-runner
as a compile dependency instead of runtime as it's declared in compiler-runner
2018-01-18 11:39:34 +03:00
Alexey Tsvetkov
72f2406083 Turn IC on by default for MPP projects 2018-01-17 21:23:43 +03:00
Sergey Igushkin
5deb20543f Get rid of gradle-api artifacts uploaded to and used from JB repo
Remove redundant Maven dependency to `gradle-api` scoped as provided
2018-01-17 18:45:26 +03:00
Vyacheslav Gerasimov
d16883deaa Build: Clean previous output before instrumentation
Otherwise it may lead to unnecessary classes (left from previous plugin build) being packed to plugin
2018-01-17 16:57:56 +03:00
Dmitry Savvinov
c704f2de9a Reformat 'resolution' module according to new codestyle 2018-01-17 16:47:45 +03:00
Vyacheslav Gerasimov
e2b83aecd7 Fix publishing to Gradle plugin portal 2018-01-17 15:33:15 +03:00
Anton Bannykh
7b0070ea62 Promise-based async integration test for kotlin-test-js 2018-01-17 14:46:13 +03:00
Dmitry Jemerov
ca57309374 Temp revert fix for KT-10591 as it causes non-obvious test breakage 2018-01-17 11:39:35 +01:00
Alexey Sedunov
a752f3f38e Misc: Rename class 2018-01-17 12:54:39 +03:00
Alexey Sedunov
62580a47dc Misc: Add test for KT-7316
#KT-7316 Fixed
2018-01-17 12:53:57 +03:00
Alexey Sedunov
54f4f5ff24 Configuration: Add Kotlin SDK for non-JVM projects
#KT-16976 Fixed
2018-01-17 12:52:51 +03:00
Alexey Sedunov
af1d6124ce JS: Do not specify NodeJS path in Gradle projects
We rely on node_modules directory content which must be populated
by the build script itself
2018-01-17 12:45:45 +03:00
Alexey Sedunov
c6a9c36275 Analyze Data Flow: Support cross-language analysis
#KT-16833 Fixed
2018-01-17 12:40:34 +03:00
Dmitry Petrov
6cb68531ae Minor: add missing "'" 2018-01-17 12:31:07 +03:00
Dmitry Petrov
bba8168150 Add test for extension properties declaration in IR 2018-01-17 12:31:07 +03:00
Dmitry Petrov
1f841e35bc Formatting: psi2ir 2018-01-17 12:31:07 +03:00
Dmitry Petrov
432c743771 Formatting: ir.tree and some common code 2018-01-17 12:31:07 +03:00
Dmitry Petrov
fdd000c94f Update testData to new format 2018-01-17 12:31:07 +03:00
Dmitry Petrov
4d54036d21 Use declaration properties in RenderIrElementVisitor 2018-01-17 12:31:07 +03:00
Dmitry Petrov
7dc15b15bb Add basic properties to IR declarations 2018-01-17 12:31:07 +03:00
Dmitry Petrov
2f09c51dca Formatting: IR test classes 2018-01-17 12:31:07 +03:00
Nikolay Krasko
704ce121bc Use other property name in Java with Kotlin static import tests 2018-01-17 12:05:06 +03:00
Nikolay Krasko
1c7e42f1d4 Collapsed comments containing * get removed in the summary line (KT-21994)
#KT-21994 Fixed
2018-01-17 12:05:05 +03:00
Nikolay Krasko
a1b20535b2 Search same place for it usages in rainbow highlighter (KT-22242)
Reuse KotlinTargetElementEvaluator for getting same declaration
context for implicit 'it' parameter.

 #KT-22242 Fixed
2018-01-17 12:05:04 +03:00
Vyacheslav Gerasimov
f86b77083f Add sources and javadoc to kotlin-annotations-android 2018-01-16 21:19:46 +03:00
Alexey Tsvetkov
d1d786dffa Fix lookup tracking in JPS with enabled daemon
#KT-21962 fixed
2018-01-16 21:09:57 +03:00
Alexey Tsvetkov
220fab0d3f Test JPS with Daemon and IC 2018-01-16 21:09:57 +03:00
Alexey Tsvetkov
ca09be1411 Minor: move 'KotlinJpsBuildTestIncremental' to separate file 2018-01-16 21:09:57 +03:00
Nicolay Mitropolsky
b4db744a9b Uast: KotlinStringULiteralExpression.getExpressionType() made always return String 2018-01-16 20:38:00 +03:00
Dmitry Jemerov
e46f69bb36 Disable "Decompile" button if bytecode generation threw exception
#KT-13791 Fixed
2018-01-16 17:54:49 +01:00
Dmitry Jemerov
404f9cc7d8 KotlinBytecodeToolWindow: convert to .kt 2018-01-16 17:54:48 +01:00
Dmitry Jemerov
bad76eb5c2 KotlinBytecodeToolWindow: rename to .kt 2018-01-16 17:54:47 +01:00
Dmitry Jemerov
5b3ab97b4e Highlight 'var' primary constructor parameters as mutable
#KT-11467 Fixed
2018-01-16 17:54:45 +01:00
Dmitry Jemerov
571b424b33 Use DescriptorToSourceUtilsIde.getAnyDeclaration in super navigation
#KT-16333 Fixed
2018-01-16 17:54:44 +01:00
Dmitry Jemerov
cc90dfa65b GotoSuperActionHandler: convert to .kt 2018-01-16 17:54:43 +01:00
Dmitry Jemerov
690c3433d6 GotoSuperActionHandler: rename to .kt 2018-01-16 17:54:42 +01:00
Dmitry Jemerov
106e1b8661 Don't include unindented comments preceding a function into its text range
#KT-10591 Fixed
2018-01-16 17:54:29 +01:00
Dmitry Jemerov
075541da21 Show location info for members defined in object literals
#KT-22179 Fixed
2018-01-16 17:54:27 +01:00
Dmitry Jemerov
564490c9d4 Don't require presence of PropertiesComponent
#KT-22214 Fixed
2018-01-16 17:54:19 +01:00
Dmitry Jemerov
1b6f6e8bf7 Don't indent block comments of typealiases
#KT-22230 Fixed
2018-01-16 17:54:16 +01:00
Dmitry Savvinov
c2b532b167 Reformat the rest of 'frontend'-module according to new codestyle 2018-01-16 18:26:21 +03:00
Dmitry Savvinov
e5f0ffb0c2 Reformat 'frontend' module according to new codestyle 2018-01-16 17:51:51 +03:00
Kirill Rakhman
b567817d1f Make completion for overriding functions respect suspend modifier
Fixes #KT-22200
2018-01-16 15:42:03 +01:00
Kirill Rakhman
8bc020f31b Fix modifier order in generated overriden functions
Fixes #KT-21600
2018-01-16 15:42:02 +01:00
Alexey Sedunov
99be75cbfc Refactoring: Use modifier list in CallableInfo where possible 2018-01-16 17:06:53 +03:00
Alexey Sedunov
ba0a91d74c Quick Fixes: Drop deprecated KotlinCommonIntentionActionsFactory
Also update relevant test to use new action factory API
2018-01-16 17:06:53 +03:00
Alexey Sedunov
908bf71ae6 Quick Fixes: Support cross-language "Create from Usage" with Kotlin target 2018-01-16 17:06:53 +03:00
Alexey Sedunov
d44313876c Create from Usage: Support primary constructor insertion 2018-01-16 17:06:52 +03:00
Alexey Sedunov
877874978f Misc: Add action text assertions to CommonIntentionActionsTest 2018-01-16 17:06:52 +03:00
Toshiaki Kameyama
113e9f496e Add quickfix for UnsafeCastFromDynamicInspection #KT-20915 Fixed 2018-01-16 17:06:51 +03:00
Vyacheslav Gerasimov
f709a382ae Update changelog for 1.2.20 2018-01-16 16:13:54 +03:00
Alexey Sedunov
05b618eec8 Gradle: Use copyable user data for compiler plugin options
#KT-22227 Fixed
2018-01-16 16:09:18 +03:00
Alexey Sedunov
5892944bfc Convert Enum to Sealed Class: Support expect/actual classes 2018-01-16 16:09:17 +03:00
Alexey Sedunov
9d5d85a1c5 Convert Sealed Class to Enum: Support expect/actual classes
#KT-18912 Fixed
2018-01-16 16:09:17 +03:00
Natalia Selezneva
dbd7ceb5fd Fix Evaluate Expression for inline functions from multifile package class.
Find main class generated for debugger by its name instead of relativePath length.
 #KT-22311 Fixed
2018-01-16 16:00:32 +03:00
Cuihtlauac Alvarado
c5982e7ff5 Avoid pick environement variables test failures (#1467)
Remove all lines containing a "Picked up <ENVIRONMENT_VARIALBE>: ..."

Remove empty ERR: section

FIX: KT-22241
2018-01-16 12:33:19 +01:00
Mikhael Bogdanov
b539adf105 Support simple capturing in IR inliner 2018-01-16 11:53:25 +01:00
Mikhael Bogdanov
ca22bc57fd Don't capture primary constructor variables 2018-01-16 11:53:25 +01:00
Mikhael Bogdanov
28f4cc5b18 Generate parameter name in assertion for lateinit properties 2018-01-16 11:53:24 +01:00
Mikhael Bogdanov
e58558dffd Support mapped companions 2018-01-16 11:53:24 +01:00
Mikhael Bogdanov
e57efc7233 Support external functions 2018-01-16 11:53:23 +01:00
Mikhael Bogdanov
c1a1a7f9fb Code clean 2018-01-16 11:53:22 +01:00
Mikhael Bogdanov
9d7eca1376 Support throwNpe intrinsic 2018-01-16 11:53:22 +01:00
Mikhael Bogdanov
d62a7cc9d1 Unwrap fake override on field access 2018-01-16 11:53:21 +01:00
Mikhael Bogdanov
dfbe92344f Skip setter accessors for val 2018-01-16 11:53:21 +01:00
Mikhael Bogdanov
2b95e6bc0d Generate proper vararg array 2018-01-16 11:53:20 +01:00
Mikhael Bogdanov
724f3bf714 Return proper type after coercion 2018-01-16 11:53:20 +01:00
Mikhael Bogdanov
77b93ab7ad Add classType property in IrClassReference, support class references in codegen 2018-01-16 11:53:19 +01:00
Mikhael Bogdanov
b2970ef771 Skip noinline lambdas during inline 2018-01-16 11:53:19 +01:00
Mikhael Bogdanov
ab96e0102a Support IrGetClass 2018-01-16 11:53:18 +01:00
Mikhael Bogdanov
9a1f484771 Fix equals 2018-01-16 11:53:18 +01:00
Nicolay Mitropolsky
d7f0695a51 Uast: KotlinNullabilityUAnnotation.javaPsi type set to PsiAnnotation? 2018-01-16 13:26:22 +03:00
Ilya Chernikov
c7f8312e1b Shade kotlinx.coroutines in embeddable artefacts
fixes #KT-22196
2018-01-16 09:03:53 +01:00
Sergey Igushkin
3ed7df506b Bump bootstrap to 1.2.30-dev-441 2018-01-15 22:38:28 +03:00
Nicolay Mitropolsky
9ce9b434fe Uast: testdata fix for KotlinUastTypesTest.testEa101715 2018-01-15 20:58:18 +03:00
Denis Zharkov
886d3ef3a6 Optimize KotlinScriptDefinitionFromAnnotatedTemplate::isScript
Avoid multiple pattern compilation for script file regex
2018-01-15 18:20:27 +03:00
Denis Zharkov
b4e5f8cf1c Optimize collecting module info in IDE
The problem was that there is no special entity for libraries
in the IntelliJ model, and when we have an element for a library
we have to search through all of its dependencies
(see getOrderEntriesForFile call in collectInfosByVirtualFile)

But for popular library there could be quite a lot of dependencies,
while in most cases we need only the first one to obtain module
info for library itself (see changed usage in resolverForElement).

So it's worth replacing List with Sequence here
2018-01-15 18:20:27 +03:00
Denis Zharkov
d848238a46 Add cache for Module::languageVersionSettings
It might be useful because getExtraLanguageFeatures might be
rather expensive to compute

 #KT-21450 Fixed
2018-01-15 18:20:27 +03:00
Dmitry Jemerov
60874f29fe Inspection for scope functions conversion
#KT-17047 Fixed
2018-01-15 15:37:36 +01:00
Dmitry Jemerov
0b24be9460 Don't enclose 'this' in braces inside string templates 2018-01-15 15:03:39 +01:00
Dmitry Jemerov
560dc920e4 Don't increase nesting level if we aren't processing current expression 2018-01-15 15:03:39 +01:00
Dmitry Jemerov
3a7e4acf22 Reformat and cleanup 2018-01-15 15:03:39 +01:00
Dmitry Jemerov
d15fa83749 API for building visitors from lambdas 2018-01-15 15:03:39 +01:00
Nikolay Krasko
46ac14198c Don't try to cast light element to KtElement (EA-114820) 2018-01-15 14:05:51 +03:00
Nikolay Krasko
adf6ad6283 Check file before cast in KotlinCompletionContributor (EA-101984) 2018-01-15 14:05:50 +03:00
Nikolay Krasko
eae79e96ee Fix NPE in PlainTextPasteImportResolver.tryResolveReferences (EA-10589) 2018-01-15 14:05:50 +03:00
Nikolay Krasko
93d40b0492 Fix NPE in SourceNavigationHelper.findFirstMatchingInIndex (EA-91517) 2018-01-15 14:05:50 +03:00
Nikolay Krasko
2ca7045228 Rewrite KotlinNameSuggesterTest test with KotlinLightCodeInsightFixtureTestCase
Use proper project descriptors and avoid reconfigure for test project.
2018-01-15 14:05:50 +03:00
Ilmir Usmanov
ed11528664 Ignore unreachable code on tail call optimization
#KT-21759: Fixed
2018-01-15 12:57:10 +03:00
Ilmir Usmanov
25998c1f9b Reformat tail call optimization related code 2018-01-15 12:56:54 +03:00
Yan Zhulanow
2ee23ddd02 EA-101715: Handle also case with IntegerValueTypeConstructor 2018-01-15 12:39:35 +09:00
Yan Zhulanow
108e91f2a2 Kapt: Be less strict when it's impossible to add a generated Kotlin source directory for Android project (KT-22056, EA-114271) 2018-01-15 12:39:34 +09:00
Yan Zhulanow
283c762b8b Kapt: Remove laziness from diagnosticFactory and javacMessages, use factory from supertype (KT-22189)
writeDiagnostic() may be invoked after the 'context' is cleared, and lazy implementations will fail.
2018-01-15 12:39:34 +09:00
Yan Zhulanow
192489ae66 Minor: Remove bulk class added by mistake 2018-01-15 12:39:33 +09:00
Yan Zhulanow
1c5cd1b3a0 Minor: Fix problem in IDE with @TestOnly annotation resolution 2018-01-15 12:39:32 +09:00
Yan Zhulanow
81aae03b57 Use Gradle API to import annotations from compiler plugins instead of nasty data storage tasks
Tasks itself will be left for some time until all users migrate to the newer IDE plugin versions.
2018-01-15 12:39:31 +09:00
Yan Zhulanow
e7c1d94c0f Minor: Fix red code in IDE 2018-01-15 12:39:30 +09:00
Yan Zhulanow
e978c42e52 SamWithReceiver: Add Maven/Gradle importers for SamWithReceiver 2018-01-15 12:39:30 +09:00
Yan Zhulanow
0a3a493f25 AllOpen: Fix incorrect 'accessing non-final property in constructor' warning (KT-16619) 2018-01-15 12:39:29 +09:00
Yan Zhulanow
df19162c8c Kapt: Store line information in a file doc comment, instead of annotations (KT-21936) 2018-01-15 12:39:28 +09:00
Yan Zhulanow
c66947ba40 NoArg: Parse 'invokeInitializers' option in Maven importer (KT-19900) 2018-01-15 12:39:27 +09:00
Yan Zhulanow
3512675d96 Compiler plugins: Refactor Maven import handlers in order to support other plugin options 2018-01-15 12:39:26 +09:00
Yan Zhulanow
a85b4ddb0f Kapt: Clear stubs directory on non-incremental stub generation (KT-21735) 2018-01-15 12:39:25 +09:00
Nicolay Mitropolsky
f4a7ecc1bb Uast: Fix for missing local variables in ctor-s bodies
similar to how it is done in `KotlinUBlockExpression`
2018-01-12 22:32:52 +03:00
Dmitry Jemerov
322ac6340a Fix GradleConfigureProjectByChangingFileTestGenerated 2018-01-12 18:58:04 +01:00
Anton Bannykh
c6d7ffb3eb JS DCE: drop unknown file report severity to WARNING
*.kjsm and other files might be received when FileCollection is
used in Gradle as a dependency.

Example: `testCompile project(":$coroutines_core").sourceSets.test.output`
(a popular-ish solution to introduce dependencies between tests)
2018-01-12 20:00:34 +03:00
Anton Bannykh
5d6d321fb2 Reformat K2JSDce.kt 2018-01-12 20:00:34 +03:00
Dmitry Jemerov
ce5b1acfa7 Regenerate tests 2018-01-12 16:59:31 +01:00
Alexander Podkhalyuzin
b8dded2685 Simple implementation for kt paste into project view #KT-8352 Fixed 2018-01-12 15:57:34 +03:00
Alexander Udalov
b925b6ef9f Add test for obsolete issue
#KT-10494
2018-01-12 12:50:38 +01:00
Nikolay Krasko
aee7329b89 Modify incremental test in 173 branch - files are not created anymore 2018-01-12 13:54:45 +03:00
Nikolay Krasko
5a6d58a799 Update to 2017.3.2 (173.4127.27) 2018-01-12 13:54:43 +03:00
Nikolay Krasko
4c09a6cf06 Allow different diagnostics in Javac tests - workaround for IDEA-184289 2018-01-12 13:54:42 +03:00
Nicolay Mitropolsky
27b3cdf1fa Uast: KotlinAccessorCallExpression made implement JvmDeclarationUElement 2018-01-12 13:54:41 +03:00
Nicolay Mitropolsky
254caef0e6 Idea version set to 173.3942.27 2018-01-12 13:54:39 +03:00
Nicolay Mitropolsky
f8601479de Uast: handling @receiver annotations 2018-01-12 13:54:38 +03:00
Nicolay Mitropolsky
f91f42c253 Uast: Constructors.kt testdata fixes 2018-01-12 13:54:36 +03:00
Nicolay Mitropolsky
2c81362ce1 Uast: uastParent made final in KotlinAbstractUElement 2018-01-12 13:54:35 +03:00
Nicolay Mitropolsky
e7200d16c3 Uast: no more need to exclude UIdentifier from JvmDeclarationUElement check 2018-01-12 13:54:33 +03:00
Nicolay Mitropolsky
e22e466485 Uast: making AbstractKotlinUClass not inherit from AbstractJavaUClass 2018-01-12 13:54:32 +03:00
Nicolay Mitropolsky
084da3665a Uast: removing java-uast usage from KotlinUastLanguagePlugin and KotlinEnumConstantClassReference 2018-01-12 13:54:31 +03:00
Nicolay Mitropolsky
260c549cd7 Uast: AbstractKotlinUVariable annotations now are retrieved from Kotlin Psi, not from compiled (KT-21025)
and `KotlinNullabilityUAnnotation` now is created for every `AbstractKotlinUVariable`
2018-01-12 13:54:29 +03:00
Nicolay Mitropolsky
f0723a5c07 Uast: WrappedUAnnotation as replacement for usage of JavaUAnnotation (KT-21025) 2018-01-12 13:54:28 +03:00
Vyacheslav Gerasimov
53d6c17417 Set correct until-build for Idea 173 plugin 2018-01-12 13:54:26 +03:00
Nicolay Mitropolsky
a278e4ccef Fixing non-running tests, that used MockApplication environment 2018-01-12 13:54:25 +03:00
Alexey Sedunov
c1cf03d89c Data Inflow: Support grouping by expression nullability 2018-01-12 13:54:23 +03:00
Nicolay Mitropolsky
0a1580159f Uast: Constructors.kt testData fixes 2018-01-12 13:54:22 +03:00
Alexey Sedunov
683bbe396d Data Inflow: Support grouping by leaf expressions 2018-01-12 13:54:20 +03:00
Alexey Sedunov
b46784ab86 Safe Delete: Suppress walking through light field initializer
This fixes some tests failing in 173 branch

 #KT-21508 Fixed
2018-01-12 13:54:19 +03:00
Nikolay Krasko
cbfd7088bf Fix inAnnotation test in 173 branch 2018-01-12 13:54:17 +03:00
Nikolay Krasko
c0582ed732 Update file name replace in QuickFix tests 2018-01-12 13:54:16 +03:00
Nicolay Mitropolsky
502a6fa9f1 Uast: SuperCalls.render.txt testdata fix 2018-01-12 13:54:14 +03:00
Nicolay Mitropolsky
5f6e5c5779 Uast: AbstractKotlinUClass compilation fix 2018-01-12 13:54:13 +03:00
Nicolay Mitropolsky
b51a7c6957 Spring: fix for package-completion tests
because otherwise `java` package name interfere with `java` directory name completion from somewhere
2018-01-12 13:54:12 +03:00
Nicolay Mitropolsky
1fd8abb0bb Spring: removing needless EP-s because they ported to UAST in platform 2018-01-12 13:54:10 +03:00
Nicolay Mitropolsky
79abc8743e KotlinSpringComponentScanInspection made to support platform JamReferenceContributor 2018-01-12 13:54:09 +03:00
Vyacheslav Gerasimov
0cad41bb0c Drop missing gradle extensions from gradle.xml 2018-01-12 13:54:07 +03:00
Nikolay Krasko
23bd0b3db5 Update test data because of changed action name in 173 2018-01-12 13:54:06 +03:00
Nicolay Mitropolsky
29fd34d1de Idea version set to 173.3727.22(RC1) 2018-01-12 13:54:05 +03:00
Nicolay Mitropolsky
8c27bf98f4 UAST: StringTemplateComplex testdata fix 2018-01-12 13:54:03 +03:00
Alexey Sedunov
f3dad53ad4 Line Markers: Respect subclass module when filtering out duplicates
#KT-21010 Fixed
2018-01-12 13:54:02 +03:00
Alexey Sedunov
d37c8397f5 Move: Fix applicability check in IDEA 173 2018-01-12 13:54:00 +03:00
Vyacheslav Gerasimov
ab50ccf995 Fix formatting for new kotlin dsl gradle project build script 2018-01-12 13:53:59 +03:00
Vyacheslav Gerasimov
560e2d1ced Drop new Kotlin Dsl gradle project wizard which has been merged to idea 2018-01-12 13:53:58 +03:00
Nicolay Mitropolsky
aa43bebbf1 SpringTestFixtureExtension: option to forbid facet autoconfigure added 2018-01-12 13:53:56 +03:00
Nicolay Mitropolsky
3a06b8fe3b SpringKotlinAutowiringInspection: getting rid of SpringJavaInjectionPointsAutowiringInspection 2018-01-12 13:53:55 +03:00
Nicolay Mitropolsky
bef100b46e AbstractIntentionTest: isApplicableOnPooled made run under ProgressIndicator 2018-01-12 13:53:53 +03:00
Vyacheslav Gerasimov
09f31076e6 Update ideaVersion to 173.3415.22 2018-01-12 13:53:52 +03:00
Nicolay Mitropolsky
2f30ca3fac Ultimate-plugin: UAST added as dependency 2018-01-12 13:53:51 +03:00
Nicolay Mitropolsky
f4a8a98157 Ultimate-plugin: multiplePropertiesAnnotationConfig.kt test data fixes
`@Qualifier` should not be there. It was a bug in platform
2018-01-12 13:53:49 +03:00
Nicolay Mitropolsky
6cb556dd6b AbstractQuickFixTest: FORCE_PACKAGE_FOLDER directive added
It was added as workaround for IDEA-176033 (IDEA-176032 in particular)
2018-01-12 13:53:48 +03:00
Nicolay Mitropolsky
ab0c081897 AbstractExtractionTest: fix for invalid files
`configureByFile` should be run after other configurations (like `configureKotlinRuntimeAndSdk`) because they could make configured file invalid
2018-01-12 13:53:46 +03:00
Nicolay Mitropolsky
dd45780de9 RecursiveMethodCallMarkerInfo and SuspendCallMarkerInfo forced to target Leaf-elements
because of restriction added in IDEA 173
2018-01-12 13:53:45 +03:00
Nicolay Mitropolsky
34bdc04fbe AbstractNavigateToLibraryTest: fix for invalid files
otherwise current file is invalidated by `configureAs` and `additionalConfig`
2018-01-12 13:53:44 +03:00
Nicolay Mitropolsky
7758875955 EdtTestUtil.runInEdtAndWait fix for proper user action emulation
changed because `com.intellij.ide.IdeEventQueue` doesn't consider events from `SwingUtilities.invokeAndWait` as user interaction
2018-01-12 13:53:42 +03:00
Nicolay Mitropolsky
0acfce55a8 KotlinCoreEnvironment: set ideaCompatibleBuildNumber = "173.1" 2018-01-12 13:53:41 +03:00
Nicolay Mitropolsky
6bfe168dd7 UAST: SimpleKotlinRenderLogTest.testWhenAndDestructing testdata fix 2018-01-12 13:53:39 +03:00
Nicolay Mitropolsky
8a23a62c90 AbstractJavaToKotlinConverterForWebDemoTest: setup fix: JvmElementProvider and JavaModuleSystem added 2018-01-12 13:53:38 +03:00
Mikhail Glukhikh
8810e15f08 ExpressionOfTypeProcessor: get member name in read action 2018-01-12 13:53:36 +03:00
Mikhail Glukhikh
3f9054b28b Fix find usages tests in 173 (run via ProgressIndicator) 2018-01-12 13:53:35 +03:00
Nicolay Mitropolsky
cfcee0a1fe Workaround for CoreEnvironment initialization: explicitly setting versions for extensions 2018-01-12 13:53:34 +03:00
Nicolay Mitropolsky
6b656d4da5 Spring gutter icons SpringApiIcons -> SpringApiIcons.Gutter fix.
Following the patch in idea https://upsource.jetbrains.com/IDEA/revision/ultimate-527b9189219f191b62eed59d699f57acccda05c3
2018-01-12 13:53:32 +03:00
Nicolay Mitropolsky
099c1a84ec Idea version set to 173.3302.8 2018-01-12 13:53:31 +03:00
Nikolay Krasko
60149e3021 Update file structure tests as FileStructurePopup api was changed in 173 2018-01-12 13:53:29 +03:00
Nicolay Mitropolsky
f5e3a5faa4 Spring-Kotlin: Gutter repaired (KT-20550, KT-20566)
Platform now allows Gutter to be placed only on leafs elements, this patch fixes it for `KotlinSpringClassAnnotator`.
2018-01-12 13:53:28 +03:00
Ilya Gorbunov
9e21744bf5 streamex version was changed in 173-snapshot to 0.6.5 2018-01-12 13:53:27 +03:00
Nicolay Mitropolsky
208a986eab UAST: support for JvmDeclarationUElement 2018-01-12 13:53:25 +03:00
Nicolay Mitropolsky
f1579d01af UAST test data fixes: LocalVariableWithAnnotationKt fix for variable type
it is not clear for me why it was not `String`
2018-01-12 13:53:24 +03:00
Nicolay Mitropolsky
7c3c59de00 UAST test data fixes: @null in render
as a "nullability" annotation for primitive types
2018-01-12 13:53:22 +03:00
Nicolay Mitropolsky
9fed8f1d24 idea-version set to since-build="173.1" until-build="181.*" 2018-01-12 13:53:21 +03:00
Vyacheslav Gerasimov
ceaa34201e Fix GradleNoduleBuilder use qualified names check 2018-01-12 13:53:19 +03:00
Nicolay Mitropolsky
4c775a9516 JvmFacade-related tests repair 2018-01-12 13:53:18 +03:00
Simon Ogorodnik
7da9268e10 Fix proguard settings for 173 (ignore com.intellij.util.io.TarUtil) 2018-01-12 13:53:16 +03:00
Simon Ogorodnik
f940c0b86f Fix compilation in 173 (GradleModuleBuilder.java) 2018-01-12 13:53:15 +03:00
Anton Bannykh
4f97040ce5 Fix compilation (MockParameterInfoUIContext.java)
(cherry picked from commit 21b0956)
2018-01-12 13:53:14 +03:00
Nicolay Mitropolsky
7eb2d0d185 KotlinLanguageInjector using Registry to enable annotation injections
(cherry picked from commit 8bdfeb7)
2018-01-12 13:53:12 +03:00
Simon Ogorodnik
12daf4389e Fix compilation in 173 (MockParameterInfoUIContext.java) 2018-01-12 13:53:11 +03:00
Dmitry Jemerov
53a3d08a0e Fix compatibility with BuildScriptDataBuilder API changes 2018-01-12 13:53:09 +03:00
Nicolay Mitropolsky
d7fcc69315 KotlinLanguageInjector#injectInAnnotationCall optimization: using PsiClassNamePatternCondition to avoid calling getResolvedCall 2018-01-12 13:53:08 +03:00
Nicolay Mitropolsky
81b6a61edf KotlinLanguageInjector can inject into files modified for autocompletion 2018-01-12 13:53:07 +03:00
Nicolay Mitropolsky
1435911437 KotlinLanguageInjector understands patterns-injections into Java annotations 2018-01-12 13:53:05 +03:00
xiexed
743dc80b4d KtLightAbstractAnnotation build fix for 173 (#1283) 2018-01-12 13:53:04 +03:00
Dmitry Jemerov
70caae4c6f Register new service and EPs added in 173 2018-01-12 13:53:02 +03:00
xiexed
defb5a9d10 Fixes for 173 after 28.08.17 changes in IDEA (#1271)
* `JarFileSystem.getJarRootForLocalFile` now is nullable in IDEA

* Spring-related renamings following ones in IDEA
2018-01-12 13:53:01 +03:00
Nicolay Mitropolsky
6690f9f1da Build fix for KotlinSpringClassAnnotator after collectNavigationMarkers nullability changes in IDEA 173 2018-01-12 13:52:59 +03:00
Vyacheslav Gerasimov
3f15f7a394 UAST: Fix testPropertyWithAnnotation 2018-01-12 13:52:58 +03:00
Vyacheslav Gerasimov
e6efaaf752 UAST: Add testConvertTypeInAnnotation 2018-01-12 13:52:56 +03:00
Vyacheslav Gerasimov
92c23aa0ed UAST: override getFunctionalInterfaceType + test 2018-01-12 13:52:55 +03:00
Vyacheslav Gerasimov
8eddb10870 UAST: Properly handle annotations on local variables 2018-01-12 13:52:54 +03:00
Vyacheslav Gerasimov
35fa8efbf3 Fix compilation after moving to idea 173 2018-01-12 13:52:52 +03:00
Vyacheslav Gerasimov
8f7a354592 Download IDEA 173.3188.16 2018-01-12 13:52:51 +03:00
Nikolay Krasko
2a0b7e293f Minor: KotlinCodeFragmentFactory.kt cleanup 2018-01-11 22:08:18 +03:00
Natalia Selezneva
4d6c83b5b9 Debugger: do not fail if j2k couldn't convert expression creating codeFragment from text 2018-01-11 22:08:17 +03:00
Ilmir Usmanov
c023831a00 Ignore open modifier on top-level suspend function when generating light classes
#KT-21642: Fixed
2018-01-11 19:33:47 +03:00
Nikolay Krasko
5da156e93c Setup modules before test configuration in NavigateToStdlibSourceTest.kt 2018-01-11 15:03:03 +03:00
Nikolay Krasko
91a9d3cf80 Search class after full test configuration in AbstractHierarchyWithLibTest 2018-01-11 15:02:14 +03:00
Nikolay Krasko
2f817662d5 Process only project scope in AbstractHierarchyWithLibTest 2018-01-11 15:01:47 +03:00
Nikolay Krasko
8ade03ac0b Avoid using mock JDK because of bad cast in ProjectJdkTableImpl.getState
com.intellij.openapi.projectRoots.impl.MockSdk cannot be cast to com.intellij.openapi.projectRoots.impl.ProjectJdkImpl
2018-01-11 15:00:57 +03:00
Nikolay Krasko
e710cbb0bb Don't fail during error reporting on invalid elements 2018-01-11 14:56:32 +03:00
Alexander Udalov
2593ce73f1 Update copyright in generated sources
To fix tests that are checking that the generated data is up to date
2018-01-11 12:45:36 +01:00
Nicolay Mitropolsky
9cb62d66cb KtLightAnnotation: handling vararg with single arg (EA-114679)
It is deprecated but yet possible form of usage
2018-01-11 14:05:15 +03:00
Ilya Gorbunov
6197c5bf7f Add sample for coerceIn with floating point range
#KT-20357
2018-01-11 09:05:28 +03:00
Ilya Gorbunov
8fc83e3ff5 Add samples for coerceIn, coerceAtLeast, coerceAtMost for comparable types
#KT-20357
2018-01-11 09:05:28 +03:00
shiraji
17573a3c21 Add samples for coerceIn
#KT-20357
2018-01-11 09:05:28 +03:00
shiraji
4559da9848 Add samples for coerceAtMost
#KT-20357
2018-01-11 09:05:28 +03:00
shiraji
db607e231c Add samples for coerceAtLeast
#KT-20357
2018-01-11 09:05:27 +03:00
kenji tomita
1db0e5c23e Add samples for reversed list views
#KT-20357
2018-01-11 09:05:27 +03:00
AdamMc331
2fc26ba08f Added samples for property delegates as part of KT-20357. 2018-01-11 09:05:27 +03:00
Vyacheslav Gerasimov
892e901f35 Update changelog for 1.2.20 2018-01-10 20:32:05 +03:00
Ilmir Usmanov
32a94c70e9 Use tail call optimization if ARETURN has multiple sources
#KT-21977: Fixed
2018-01-10 20:14:32 +03:00
Ilmir Usmanov
5dbab2f907 Disable tail call optimization, if the call is inside try block
#KT-21165: Fixed
2018-01-10 20:13:55 +03:00
Denis Zharkov
3cfe43f83a Add -Xsupport-compatqual-checker-framework-annotations flag
It's implemented through Jsr305State while it's not related
to jsr-305 becasue currently it's the most convenient way
to introduce the flag.

Probably, it's worth renaming Jsr305State to something more abstract
like NullabilityAnnotationsConfiguration

 #KT-21982 Fixed
2018-01-10 17:02:46 +03:00
Simon Ogorodnik
40706de3db Add ability to resolve kdoc links from package view 2018-01-10 16:37:07 +03:00
Alexey Sedunov
75ce68197f Configuration: Fix API version UI update on language version change
#KT-21979 Fixed
 #KT-21980 Fixed
2018-01-10 16:24:30 +03:00
Alexey Sedunov
9d1fbbd1c6 Move: Correctly determine target module for deferred files 2018-01-10 16:24:28 +03:00
Alexey Sedunov
253c5f2d9b Gradle: Compile Gradle models/model builders for plugins under JVM 1.6
This prevents imports failure in projects using older versions of Gradle
2018-01-10 16:24:27 +03:00
Alexey Sedunov
258bd1e8c0 Maven: Fix <args> parsing on import to the Kotlin facet
#KT-22153 Fixed
2018-01-10 16:24:25 +03:00
Ilya Chernikov
6f135e89d7 Make daemon starting more tolerant to the failures - retry
(cherry picked from commit 386cfec)
2018-01-10 13:38:20 +01:00
Ilya Gorbunov
c8bd623d69 Samples: add some operations to do with the constructed ranges 2018-01-10 15:32:51 +03:00
kenji tomita
4cb2b12f01 Add samples for range construction operators 2018-01-10 15:32:50 +03:00
Andre Perkins
31d650a041 Add sample for emptySet 2018-01-10 15:32:50 +03:00
Jake Wharton
11696ac4c0 Implement String.toBoolean() for JS.
#KT-16348
2018-01-10 15:32:49 +03:00
Dmitry Jemerov
86c10b635a Initial implementation of method separators
#KT-13029 Fixed
2018-01-10 13:17:33 +01:00
Dmitry Jemerov
fd01351740 Implement display of code construct start for Kotlin
#KT-20470 Fixed
2018-01-10 13:17:33 +01:00
Dmitry Jemerov
968e6ecde4 KotlinPairMatcher: convert to .kt
(cherry picked from commit 0bc4f26)
2018-01-10 13:17:33 +01:00
Dmitry Jemerov
0c429857de KotlinPairMatcher: rename to .kt
(cherry picked from commit e386c35)
2018-01-10 13:17:33 +01:00
Nicolay Mitropolsky
4a4bf5635d Uast: KtLightAnnotation converting support (KT-21702) 2018-01-10 15:12:12 +03:00
Dmitry Jemerov
99a9634609 Don't generate references to eap-1.1 and eap-1.2 repositories
Now all Kotlin EAP releases are published only to kotlin-eap on Bintray
2018-01-10 12:13:02 +01:00
Dmitry Petrov
5ffd6a737e Closures in scripts have outer expression
#KT-22029 Fixed Target versions 1.2.30
2018-01-10 14:08:56 +03:00
Dmitry Petrov
d25ebadf53 Minor: formatting 2018-01-10 14:08:56 +03:00
Dmitry Jemerov
e80dae1802 Update copyright in generated tests 2018-01-10 11:55:28 +01:00
Dmitry Jemerov
5ec5807399 TestGenerator: J2K 2018-01-10 11:20:57 +01:00
Dmitry Jemerov
993db696ec TestGenerator: rename to .kt 2018-01-10 11:19:25 +01:00
Dmitry Jemerov
da678a4be2 Use new JRE chooser in Kotlin script run configuration 2018-01-09 18:43:21 +01:00
Dmitry Jemerov
ebc9c217c1 Get rid of PluginJetFilesProvider, use a more sane impl instead 2018-01-09 18:43:20 +01:00
Dmitry Jemerov
685d38218d Extension point for detecting build system type used in project
Now we use a non-deprecated way to detect Maven modules
2018-01-09 18:43:19 +01:00
Dmitry Jemerov
0ca2117ac7 Remove the usages of some of the deprecated APIs 2018-01-09 18:43:11 +01:00
Dmitry Jemerov
361824e170 Fix HighlightingTestGenerated and LambdaImplicitHintsTest 2018-01-09 18:04:39 +01:00
Dmitry Jemerov
8c7f57ca83 Honor "Use continuation indent in argument lists" for indent by Enter
#KT-22121 Fixed
2018-01-09 15:41:21 +01:00
Dmitry Jemerov
d79ac58340 Refactoring: replace WrappingStrategy interface with lambda 2018-01-09 15:41:20 +01:00
Dmitry Jemerov
67897d9b3d Don't wrap argument list containing anonymous functions
Just like for objects and lambdas, don't consider line breaks inside
anonymous functions as line breaks inside argument list
2018-01-09 15:41:18 +01:00
Dmitry Jemerov
a5cc9809ac Improved logic for chained lambda indentation
#KT-22071 Fixed
2018-01-09 15:41:17 +01:00
Dmitry Jemerov
54c262c505 Use receiver type of extension members as qualifier in Goto Symbol
#KT-17217 Fixed
2018-01-09 15:41:15 +01:00
Dmitry Jemerov
0104ed7d44 Show line marker navigation actions in Alt-Enter menu
#KT-14951 Fixed
2018-01-09 15:41:09 +01:00
Dmitry Jemerov
63af3c8e03 Delegate Ctrl-Shift-Enter to plain handler if needed
#KT-11503 Fixed
2018-01-09 15:32:22 +01:00
Dmitry Jemerov
f36f85f55c Don't require documentation in test sources
#KT-21837 Fixed
2018-01-09 13:54:56 +01:00
Dmitry Jemerov
165ac97c4b SortModifiersInspection detects modifiers before annotations
#KT-22013 Fixed
2018-01-09 13:54:56 +01:00
Dmitry Jemerov
408c753837 Check that a file with .kt extension is actually a KtFile
#KT-22111 Fixed
2018-01-09 13:54:56 +01:00
Dmitry Jemerov
69c8da7403 Cleanup: apply all inspection quickfixes 2018-01-09 13:54:56 +01:00
Dmitry Jemerov
6f722d647f Reformat 2018-01-09 13:54:56 +01:00
Dmitry Jemerov
6299e0e941 Check correct element to determine if 'if' rbrace needs wrapping
#KT-22093 Fixed
2018-01-09 13:54:56 +01:00
Dmitry Jemerov
e9ca6a6038 Call arguments should not affect parameter names returned in MethodInfo
The parameter names are only used for blacklist filtering, and should
correspond only to the function being called; the order and number of
actually provided arguments does not matter.
2018-01-09 13:49:03 +01:00
Dmitry Jemerov
599bb878f1 Rename test to correspond to the name of code under test 2018-01-09 13:49:02 +01:00
Dmitry Jemerov
78682ac493 Respect imports when rendering class names in type hints
#KT-19524 Fixed
2018-01-09 13:49:01 +01:00
Dmitry Jemerov
45282af38b Prototype of inlay hints for suspending calls (KT-20187) 2018-01-09 13:48:31 +01:00
Dmitry Jemerov
d060203896 Don't show type hints for SAM constructors
#KT-22050 Fixed
2018-01-09 13:34:11 +01:00
Dmitry Jemerov
0991dba626 Better position of argument name hint for multiline varargs
#KT-20614 Fixed
2018-01-09 13:34:10 +01:00
Dmitry Jemerov
6c23d3a220 Show inlay hints for implicit parameters and receivers of lambdas
#KT-20533 Fixed
2018-01-09 13:34:09 +01:00
Dmitry Jemerov
da157fafdc Add inlay hints for values returned from lambdas
#KT-20067 Fixed
2018-01-09 13:34:01 +01:00
Dmitry Jemerov
e558837214 Cleanup: better function name 2018-01-08 14:41:49 +01:00
Toshiaki Kameyama
3b212558e2 KT-21949 Please add a separate Color Scheme settings for properties synthesized from Java accessors (#1458) 2018-01-08 13:04:43 +01:00
Toshiaki Kameyama
19c35ef48c KT-21213 multiline kdoc - intellij joins lines together without space (#1459)
* KT-21213 multiline kdoc - intellij joins lines together without space

* Use \n directly as a line separator #KT-21213

* Remove unused import #KT-21213
2018-01-05 15:29:11 +01:00
Dmitry Jemerov
d51dd97156 Avoid exception from DocumentImpl.setInBulkUpdate in reformat inspection
#KT-21036 Fixed
2018-01-04 19:03:55 +01:00
Toshiaki Kameyama
266b40b654 KT-21974 Editor color scheme option for Kotlin typealias names (#1457) 2018-01-04 17:39:39 +01:00
Sergey Igushkin
06903f803b (minor) Separate the Gradle annotations from CompilerArgumentAware 2018-01-03 22:14:23 +03:00
Sergey Igushkin
d881efdeb1 Improve disambiguation of subplugin option inputs
The original approach required evaluating the existing input properties
of the task. This led to evaluation of the property values, and could
execute incorrectly if the task was not properly initialized at that
moment.
The new approach fixes that by first grouping options from each
subplugin by key and then adding disambiguating index suffixes.
2018-01-03 22:14:23 +03:00
Sergey Igushkin
1be9e04797 Move conditional task caching setup into the task constructors;
Add 'kotlin.caching.enabled' flag to switch the caching for all tasks;
Rename and change semantics of cache support checks: make two instead
    of one, `isBuildCacheSupported` and `isBuildCacheEnabledForKotlin`;
Remove FileOptionKind entries that are redundant at the moment;
Improvements in BuildCacheIT.kt and other refactoring  suggestions from
    the review
    https://upsource.jetbrains.com/kotlin/review/KOTLIN-CR-1647
2018-01-03 22:14:22 +03:00
Sergey Igushkin
fd066ea4d5 Fix top-level property of an API-level-dependent class: move to the body 2018-01-03 22:14:22 +03:00
Sergey Igushkin
c5a88c5fb7 Add BuildCacheRelocationIT, remove same files testing as redundant. 2018-01-03 22:14:22 +03:00
Sergey Igushkin
6bea643176 Fix JS DCE classpath duplicated in two input properties
* Do not add the classpath elements to source to avoid them being
  treated as task inputs without proper classpath normalization
* Move resolution of the classpath configuration to execution time
2018-01-03 22:14:22 +03:00
Sergey Igushkin
67b5527c68 Fix Kotlin destination dir added to Java task without normalization.
Issue #KT-20604 Fixed
2018-01-03 22:14:22 +03:00
Sergey Igushkin
97edda44c8 Turn on relocatable build cache -- change PathSensitivity to RELATIVE 2018-01-03 22:14:22 +03:00
Sergey Igushkin
c852d0b6cb Subplugin options refactoring & Gradle input improvements
Introduce FilesSubpluginOption Special kind of SubpluginOption that
holds a list of files together with the kind of these files with respect
to the task.

Add a logic for handling such options and converting them into
task inputs.

Refactor CompilerPluginOptions: make it store subplugin options to be
able to add options from KotlinCompile to the kapt tasks.

Introduce WrapperSubpluginOption for encoded and complex options.

Remove pluginOptions from the Gradle inputs built from the
compiler args.

Do not cache Kotlin compilation with kapt1 enabled: since we are going
to drop kapt1 it anyway, there's no point in implementing
proper cache for it, so just disable the caching of the task in case
kapt1 is used.
2018-01-03 22:14:22 +03:00
Sergey Igushkin
93097014a0 Add integration tests for Gralde build cache support.
Add an up-to-date'ness test for subplugin options.
2018-01-03 22:14:21 +03:00
Sergey Igushkin
57f710c931 Explicit opt-in switch for Kapt caching. 2018-01-03 22:14:21 +03:00
Sergey Igushkin
7ee3b81939 Add Kotlin sources output as a separate output directory for kapt. 2018-01-03 22:14:21 +03:00
Sergey Igushkin
4a69d1545b Disable IC when IC cache is missing
Check task build directory for any files
2018-01-03 22:14:21 +03:00
Sergey Igushkin
14c80baec8 Make the tasks cacheable, add logic that decides whether to cache them 2018-01-03 22:14:21 +03:00
Sergey Igushkin
26c158cbae Annotate the properties with @PathSensitive (+ override source) 2018-01-03 22:14:21 +03:00
Sergey Igushkin
e46b56acbc Add @LocalState of buildServicesWorkingDir to KotlinCompile 2018-01-03 22:14:21 +03:00
Sergey Igushkin
627fe52858 Map compiler arguments to Gradle inputs. 2018-01-03 22:14:20 +03:00
Sergey Igushkin
a8ba8fbf77 Make pluginOptions.classpath a separate input in the Gradle tasks
(cherry picked from commit b03e758)
2018-01-03 22:14:20 +03:00
Sergey Igushkin
a752d30f12 Move CompilerArgumentAware to the <...>.internal package. 2018-01-03 22:14:20 +03:00
Sergey Igushkin
62f2876230 Refactor compiler arguments in Gradle tasks:
Pull create/setup args functions up to CompilerArgumentsAware interface
Remove diamond-shaped CompilerArgumentsAware inheritance
Provide the default implementation for serialization in the interface
Make KotlinJsDce implement CompilerArgumentsAware
Implement the compiler args logic for Kapt & GenerateStubs tasks
2018-01-03 22:14:20 +03:00
Toshiaki Kameyama
6b2c22aff1 Add intention to specify all types explicitly in destructuring assignment
#KT-16260 Fixed
2018-01-03 17:23:31 +01:00
Dmitry Jemerov
3529d61a7d Exclude generated test classes from language statistics 2018-01-03 14:57:01 +01:00
Toshiaki Kameyama
eb12cfd444 KT-18674 Join Lines should join strings (#1305)
* Join Lines should join strings #KT-18674 Fixed

* #KT-18674 Fixed
2018-01-03 11:27:16 +01:00
Toshiaki Kameyama
16695c1af5 KT-21929 Inappropriate quick fix for a sealed class instantiation (#1444) 2018-01-03 11:20:58 +01:00
Toshiaki Kameyama
de185b79d0 KT-21780 Wrong redundant setter inspection (#1453) 2018-01-03 11:14:23 +01:00
Toshiaki Kameyama
640c28ceaf KT-14670 Support kotlinPackageName() macro in live templates (#1455)
* KT-14670 Support kotlinPackageName() macro in live templates

* Use context.psiElementAtStartOffset.containingFile #KT-14670
2018-01-03 10:41:28 +01:00
Dmitry Jemerov
84d63051f9 Add a rule for invalid characters in names 2018-01-02 13:17:31 +01:00
Dmitry Jemerov
f83c5344d7 Apply same style for top-level and object properties
#KT-20437 Fixed
2018-01-02 12:46:03 +01:00
Dmitry Jemerov
1c7d97289b Naming convention inspection for test functions
#KT-21547 Fixed
2018-01-02 12:46:02 +01:00
Dmitry Jemerov
37d2ff2d4d Report more friendly messages from naming conventions inspection
#KT-19736 Fixed
2018-01-02 12:46:01 +01:00
Dmitry Jemerov
429bf5bb98 Reformat 2018-01-02 12:46:00 +01:00
Toshiaki Kameyama
79ff36592d KT-15320 Live templates: please add function which returns the "outer" class name 2018-01-02 12:35:20 +01:00
Ilya Gorbunov
e2306ecf94 Keep exception primary constructors for binary compatibility in JS
Resort to a workaround for KT-22053 in direct Throwable inheritors.
2017-12-29 21:21:20 +03:00
Ilya Gorbunov
3825187e93 Update expected reachable node count 2017-12-29 21:20:59 +03:00
Ilya Gorbunov
a1f67e347f Relax nullability of UninitializedPropertyAccessException constructor parameters
To make it consistent with other exception types
2017-12-29 21:16:17 +03:00
Ilya Gorbunov
4e26ca5659 Add missing exception constructors to common and JS declarations
Add test to validate exception properties after calling various constructors.

Make NumberFormatException a descendant of IllegalArgumentException in all platforms.

#KT-21861 Fixed
#KT-21191 Fixed
2017-12-29 21:16:17 +03:00
Ilya Gorbunov
496df371f4 Provide the guide for sample authoring 2017-12-29 20:42:46 +03:00
Pavel V. Talanov
03a8ce63b2 Scripts: fix any file deletion potentially leading to reindex 2017-12-29 20:14:59 +03:00
Dmitry Jemerov
25ea53457e Send source code in exceptions as attachments, not text (common cases)
#KT-17678 In Progress
2017-12-29 15:35:53 +01:00
Toshiaki Kameyama
817dadc120 Specify type: do not suggest nullable type if not null is overridden
So #KT-12814 Fixed
2017-12-29 17:28:44 +03:00
Mikhail Glukhikh
50eaca1ac4 Add modifier fix: improve style a bit 2017-12-29 17:17:38 +03:00
Toshiaki Kameyama
184651d366 Do not suggest "add inner" quick fix for interfaces etc. #KT-18396 Fixed 2017-12-29 16:43:47 +03:00
Toshiaki Kameyama
84a6ef6ac4 Add inspection to detect is checks for object types #KT-21741 Fixed 2017-12-29 16:24:18 +03:00
Dmitry Jemerov
247881baf9 Apply style guide and enable reformat inspection 2017-12-29 13:51:53 +01:00
Mikhail Glukhikh
0df3ffbe36 Build fix: convert reference to lambda
Related to KT-19283 (fixes mistake in 3f005924)
2017-12-29 14:36:10 +03:00
Dmitry Jemerov
896246a7f5 More cleanup after J2K 2017-12-29 10:19:50 +01:00
Dmitry Jemerov
d0e8e176c4 Catch exceptions from decompiler service
EA-108937 - RE: InvocationExprent.toJava
2017-12-29 10:19:50 +01:00
Dmitry Jemerov
9a61abfb9f Don't add null module info to list
EA-113650 - TCE: LazyModuleDependencies.getModulesWhoseInternalsAreVisible
2017-12-29 10:19:50 +01:00
Dmitry Jemerov
2c4180222a Check if containing file is KtFile
EA-109460 - CCE: KtElementImplStub.getContainingKtFile
2017-12-29 10:19:50 +01:00
Dmitry Jemerov
4b6efe3eb0 Take read action in KtLightParameter.isEquivalentTo()
EA-109775 - (OperatorReferencesSearcher) assert: PsiFileImpl.getStubTree
2017-12-29 10:19:50 +01:00
Dmitry Jemerov
7f1dd88600 KtLightParameter: convert to .kt and cleanup 2017-12-29 10:19:50 +01:00
Dmitry Jemerov
98d26ae59f KtLightElementParameter: rename to .kt 2017-12-29 10:19:50 +01:00
Dmitry Jemerov
cde84a7923 Handle I/O exceptions when updating library jars
EA-101940 - FNFE: FileUtil.openOutputStream
2017-12-29 10:19:50 +01:00
Dmitry Jemerov
254f766aaf Take longer read action in forEachKotlinOverride()
EA-114124 - assert: CompositeElement.getChildrenAsPsiElements
2017-12-29 10:19:50 +01:00
Dmitry Jemerov
768fce4722 Check for project disposed when reporting outdated libraries
EA-106858 - assert: ComponentManagerImpl.getPicoContainer
2017-12-29 10:19:50 +01:00
Dmitry Jemerov
cc2faa67f9 Don't pass null element to RefactoringFactory.createRename()
EA-114286 - IAE: RenameProcessor.$$$reportNull$$$
2017-12-29 10:19:50 +01:00
Dmitry Jemerov
9a156541c1 Don't try to read attribute for files with no ID
(EA-114351 - CCE: PersistentFSImpl.getFileId)
2017-12-29 10:19:50 +01:00
Toshiaki Kameyama
5e765c525e Do not suggest quickfix 'Specify type explicitly' with existing type
So #KT-15180 Fixed
2017-12-28 21:06:48 +03:00
Mikhail Glukhikh
5475f99cec Elvis -> if-then: handle case with safe cast separately #KT-17816 Fixed 2017-12-28 20:31:55 +03:00
Mikhail Glukhikh
ec60c92fe9 Lambda -> reference: build bound reference for complex qualified
So #KT-19073 Fixed
2017-12-28 20:31:53 +03:00
Mikhail Glukhikh
73bca21f94 Allow using add modifier quick-fixes in batch mode #KT-21950 Fixed 2017-12-28 20:31:47 +03:00
Mikhail Glukhikh
2e71691ab2 Fix potential leak in "unused lambda expression body" fix 2017-12-28 20:31:45 +03:00
Mikhail Glukhikh
8e23ca597d Add extra tests for KT-20429, simplify code a bit 2017-12-28 20:31:44 +03:00
Toshiaki Kameyama
a65304556c CFG: provide "used as expression" in enum constant constructor
This allows to avoid
"unused return value of a function with lambda expression body"
for such a situation
So #KT-20429 Fixed
2017-12-28 20:31:42 +03:00
Mikhail Glukhikh
e10fa218f5 Extend range of "use expression body" to left brace..end of return
Range is extended iff we are in DO_NOT_SHOW case,
otherwise just return is highlighted to avoid ugly highlighting
So #KT-19771 Fixed
2017-12-28 20:31:41 +03:00
Mikhail Glukhikh
95e7d29743 Minor: improve style in "operator to function" 2017-12-28 20:31:40 +03:00
Toshiaki Kameyama
52df70a576 Do not suggest replacing comparison to null with function call
So #KT-20620 Fixed
2017-12-28 20:31:38 +03:00
Mikhail Glukhikh
d7807b5ae3 Do not report "redundant Unit return type" on expression bodies
So #KT-21983 Fixed
2017-12-28 20:31:37 +03:00
Mikhail Glukhikh
232ec63121 Inline dialog: handle case with unknown occurrence number correctly
So #KT-21963 Fixed
2017-12-28 20:31:36 +03:00
Mikhail Glukhikh
947e853d9e Inline dialog: show "inline all and keep" for occurred once declarations
So #KT-21964 Fixed
2017-12-28 20:31:35 +03:00
Mikhail Glukhikh
d5bb7e457e Inline dialog: unify messages with each other #KT-21965 Fixed 2017-12-28 20:31:33 +03:00
Mikhail Glukhikh
3f00592443 Do not suggest "convert ref to lambda" for reflect types #KT-19283 Fixed 2017-12-28 20:31:27 +03:00
Mikhail Glukhikh
fc93e7a727 Do not report "redundant suspend" on override / open #KT-21938 Fixed 2017-12-28 20:31:24 +03:00
Sergey Igushkin
276a6acc3e Use .withDependencies { ... } to set up default versions with Gradle 4.4
+ Improve the test for omitted Kotlin module versions.

Issues: #KT-21806 Fixed, #KT-21203 Fixed
2017-12-28 19:47:02 +03:00
Vyacheslav Gerasimov
8b7a8f7bef Update changelog for 1.2.20 2017-12-28 16:15:54 +03:00
Dmitry Jemerov
fc51673c83 Update copyright profile 2017-12-28 10:47:43 +01:00
Ilya Chernikov
efc470df2b Reading KOTLIN_HOME only once
may fix #KT-21145, or at least make it less flaky
2017-12-28 09:43:44 +01:00
Ilya Chernikov
945da50b61 Add kotlin-compiler-client-embeddable to the plugin's lib since...
it's used in the `KotlinJsr223JvmScriptEngine4Idea`
Fixes #KT-18613
2017-12-28 09:43:43 +01:00
Vyacheslav Gerasimov
6116b5c497 Update coroutines version to 0.20 2017-12-28 00:35:15 +03:00
Ilya Gorbunov
042f81f23b Fix Volatile usages in common and JS code 2017-12-27 21:55:24 +03:00
Ilya Gorbunov
a33a3867b8 JS: Move declaration to match their packages in JVM and Common stdlib
Mostly internal, but also two public annotations
2017-12-27 21:55:24 +03:00
Ilya Gorbunov
d2eb8b4a3f Do not compile SynchronizedLazyImpl for platforms other than JVM 2017-12-27 21:55:24 +03:00
Ilya Gorbunov
b6595d661d Improve expect declarations in kotlin.text
- Replace overloads with default parameters in expect declarations by suppressing errors
- Remove meaningless inline modifier
2017-12-27 21:55:24 +03:00
Ilya Gorbunov
824b506abe Remove inheritance between LinkedHashSet/Map and HashSet/Map 2017-12-27 21:55:24 +03:00
Ilya Gorbunov
c5c6eed170 Make common ArrayList declaration not open and implementing RandomAccess 2017-12-27 21:55:24 +03:00
Ilya Gorbunov
fb13347864 Extract kotlin.collections expect classes into separate files
Add missing expect declarations for AbstractMutableMap/Set.
2017-12-27 21:55:24 +03:00
Ilya Gorbunov
93ef16deaf Move expect declarations to the appropriate packages
So that they match actual declarations in Kotlin/JVM stdlib.
2017-12-27 21:55:24 +03:00
Pavel V. Talanov
dd32c4e66a Revert minor semantic differences introduced in c030a047aa
Fix 'pull members up' and 'kotlin injected into kotlin' tests
2017-12-27 20:24:26 +03:00
Anton Bannykh
2df85ae4a9 kotlin-test-js: pass test function result to test framework (e.g. Promise) 2017-12-27 19:57:49 +03:00
Anton Bannykh
3e0d83b7d1 Make :js:npm a separate project to avoid calling update_dependencies 2017-12-27 17:35:34 +03:00
Alexander Udalov
129fad6ade Minor, merge two KotlinCoreEnvironment-creating functions 2017-12-27 14:50:04 +01:00
Alexander Udalov
613297ad60 Rename ModuleScriptData -> ModuleChunk and refactor related code
Use the term "build file" instead of the old "module"/"module script"
2017-12-27 14:50:03 +01:00
Alexander Udalov
f3f8db989a Fix test data for annotations on DefaultImpls members
After ea5505f80c, the annotations are now generated correctly
2017-12-27 14:12:14 +01:00
Chris Povirk
ac87ad422d Recognize Checker Framework declaration annotations.
We are migrating Guava to use these annotations rather than jsr305's
@Nullable. We can't use the Checker Framework's _@Nullable_ yet because
we promise compatibility with Java 7, which doesn't support type
annotations. This is related to but distinct from
https://youtrack.jetbrains.com/issue/KT-21408, which is about a
different jsr305 annotation we use, @ParametersAreNonnullByDefault.

I've also updated some docs to mention Kotlin's existing support for the
Checker Framework _@NonNull_.
2017-12-27 13:23:06 +01:00
Anton Bannykh
79359b7bc2 JS: test kotlin-test as box tests, support nested, fix mpp
Support tests inside nested classes and companion objects (KT-21850
fixed).
Don't launch multiplatform tests twice (KT-21567 fixed).
2017-12-27 15:22:26 +03:00
Nikolay Krasko
3bf8436895 Fix licence check after "jetbrains/kotlin/idea/copyright" package move 2017-12-27 13:44:55 +03:00
Nikolay Krasko
b7ff00ec34 Remove author tag from JavaSdkUtil to fix CodeConformanceTest 2017-12-27 13:27:59 +03:00
Nikolay Krasko
419abadcda Search for Kotlin sources in project too in fallback scope
When debugging in Gradle or Maven we may miss debug scope completely,
but still want to be responsible for building source positions for all
Kotlin source files (other PositionManagers may produce unexpected
results).
2017-12-27 01:09:53 +03:00
Ilya Gorbunov
f468990f97 Add racing version of each Lazy test
Run several concurrent accesses to a lazy value
many times and validate invariants.
2017-12-26 23:14:11 +03:00
Ilya Gorbunov
4827aadcfd Improve stability of lazy test, make some tests take less time 2017-12-26 23:14:09 +03:00
Ilya Gorbunov
934b3cc54e Do not read volatile _value field second time it is already initialized 2017-12-26 23:14:07 +03:00
Ilya Gorbunov
5d62277fa5 Make SafePublicationLazyImpl.initializer volatile
This establishes happens-before relation between nulling out the initializer and
checking whether it is null. This will prevent the subsequent _value reads
being reordered before the initializer reads.

#KT-21868 Fixed
2017-12-26 23:13:14 +03:00
Sergey Igushkin
685b138f79 (minor) Fix testAndroidExtensionsIncremental() ambiguous file operation 2017-12-26 21:38:15 +03:00
Sergey Igushkin
01931c2ae6 Fix Kotlin internal files created in 'build/' ignoring custom buildDir
Issue #KT-10537 Fixed
2017-12-26 21:38:15 +03:00
Ilya Chernikov
953a485fe7 Increment repl line generation on compilation error
fixes #KT-17921 and #KT-21141
Tests added to the JSR223 local eval example
2017-12-26 19:27:32 +01:00
Ilya Chernikov
2d8e73f3f6 Make JSR 223 examples compatible with embeddable compiler, strip ...
some dependencies.
Fixes #KT-17561 and related issues
Warning: API changed slightly
2017-12-26 19:27:31 +01:00
Sergey Igushkin
d51b17c1b2 Fix @OutputFile annotation on a String property outputFile. 2017-12-26 20:29:45 +03:00
Sergey Igushkin
9d1091cdaa Add java-gradle-plugin for kotlin-gradle-plugin tasks validation;
Make task properties validation fail on warnings; run it during IT
2017-12-26 20:29:45 +03:00
Sergey Igushkin
7031087a93 Mark Gradle task properties with input/output annotations. 2017-12-26 20:29:45 +03:00
Sergey Igushkin
d62ced3a82 Compile against gradleApi() 2017-12-26 20:29:45 +03:00
Mikhail Glukhikh
72ec55769b Improve wording for "change package" fix for source root case 2017-12-26 18:39:51 +03:00
Mikhail Glukhikh
429c31c010 Improve wording in some inspections 2017-12-26 18:39:51 +03:00
Mikhail Glukhikh
1534488dd1 Test minor: output all available fixes in local inspection tests 2017-12-26 18:39:51 +03:00
Mikhail Glukhikh
2f987f08fa Forbid word 'can' in local inspections with level > INFORMATION
Inspection texts were changed accordingly
2017-12-26 18:39:51 +03:00
Mikhail Glukhikh
56230420f8 AbstractApplicabilityBasedInspection: move visitor inside base class 2017-12-26 18:39:51 +03:00
Mikhail Glukhikh
3268189215 Cache intention inside IntentionBasedInspection
So intention is created only once.
Case with multiple intentions is no more allowed.
So #KT-21137 Fixed
2017-12-26 18:39:50 +03:00
Mikhail Glukhikh
5affb9a25c Refactoring: "package matching directory" is now an inspection 2017-12-26 18:39:50 +03:00
Mikhail Glukhikh
3f1a3dfeb2 Refactoring: make "loop to call chain" AbstractKotlinInspection 2017-12-26 18:39:50 +03:00
Mikhail Glukhikh
f44fba746e Refactoring: make "unnecessary variable" inspection applicability-based 2017-12-26 18:39:50 +03:00
Mikhail Glukhikh
221aac9820 J2K registerInspectionBasedProcessing: use correct target for applyTo 2017-12-26 18:39:50 +03:00
Mikhail Glukhikh
5a1a35bb35 Refactoring: "replace put with assignment" is now applicability-based 2017-12-26 18:39:49 +03:00
Mikhail Glukhikh
9e919829c8 Refactoring: "simplify assert not null" is now an inspection 2017-12-26 18:39:49 +03:00
Mikhail Glukhikh
8ebe16c9b2 Minor: reformat XML 2017-12-26 18:39:49 +03:00
Mikhail Glukhikh
bc361363d5 Refactoring: "simplify negated binary expression" is now an inspection 2017-12-26 18:39:49 +03:00
Mikhail Glukhikh
35d85ddd1f Refactoring: "replace with operator assignment" is now an inspection 2017-12-26 18:39:49 +03:00
Mikhail Glukhikh
c995f70631 J2K processing: simplify (minor) 2017-12-26 18:39:48 +03:00
Mikhail Glukhikh
6b5aeaa9a6 J2K inspection-based processing: use more accurate isApplicable
Information level is taken into account in both base and pre-fix
isApplicable calls
2017-12-26 18:39:48 +03:00
Mikhail Glukhikh
ada7287c66 Refactoring: make "replace call with binary operator" an inspection 2017-12-26 18:39:48 +03:00
Mikhail Glukhikh
6d4b5bc48f Refactoring: "introduce when subject" is now an inspection 2017-12-26 18:39:48 +03:00
Mikhail Glukhikh
a8b01a6b00 Refactoring: make "if-then to safe access" an inspection 2017-12-26 18:39:47 +03:00
Mikhail Glukhikh
91bcfb97c6 Refactoring: make "replace get or set" an inspection 2017-12-26 18:39:47 +03:00
Mikhail Glukhikh
756cb32eaf Refactoring: make "replace array equality ..." an inspection 2017-12-26 18:39:47 +03:00
Mikhail Glukhikh
33d94cd5e1 J2kPostProcessing: add inspection-based processing #KT-21635 Fixed 2017-12-26 18:39:46 +03:00
Mikhail Glukhikh
67b78bce39 Introduce AbstractApplicabilityBasedInspection
Related to KT-21635, KT-21137
2017-12-26 18:39:46 +03:00
Nikolay Krasko
bf393505a9 More nullability update in selectors for compatibility in 181 2017-12-26 17:37:38 +03:00
Nikolay Krasko
e66e8bcd07 Use platform types to prepare for nullability check in 181 2017-12-26 17:08:11 +03:00
Joscha Alisch
809cc220ed Select lambda after other args when it's outside argument list (KT-21214)
#KT-21214 Fixed
2017-12-26 13:09:17 +03:00
Nikolay Krasko
976a158ce1 Support alternative source popup for Kotlin files (KT-21958)
#KT-21958 Fixed
2017-12-26 12:49:27 +03:00
Nikolay Krasko
449fee74e8 Skip all same line locations when stepping over inline call (KT-20351)
#KT-20351
2017-12-26 12:46:45 +03:00
Nikolay Krasko
f39250c9a2 Fix irrelevant additional stops on breakpoint on line with inlines (KT-21945)
#KT-21945 Fixed
2017-12-26 12:46:45 +03:00
Nikolay Krasko
f38a4f509d Minor: code rearrange 2017-12-26 12:46:45 +03:00
Nikolay Krasko
c5886bc7a2 Remove sleep() from soSuspendableCallInEndOfFun and guarantee suspending 2017-12-26 12:46:45 +03:00
Ilya Gorbunov
10639eaf6a Add pattern and options properties to common Regex
And add a test that accesses them and checks they work as expected.
2017-12-26 05:40:37 +03:00
Ilya Gorbunov
d9edc5f221 Replace Regex constructor-like functions with secondary constructors
Historically secondary constructors were not supported in Kotlin/JS, so they had to
be emulated with constructor-like top level functions, now they can be rewritten
as true secondary constructors.

#KT-22003 Fixed
2017-12-26 05:40:35 +03:00
Ilya Gorbunov
053f3b6ac0 Tests: use helper function to assert compile-time and run-time type check
To cleanup warnings about useless cast or type check that is always true.
2017-12-26 04:55:44 +03:00
Ilya Gorbunov
ecd42f14b3 Compile common stdlib tests against common stdlib
Declare platform-specific test utilities as expect.
2017-12-26 04:55:40 +03:00
Pavel V. Talanov
c030a047aa Fix getting ModuleResolver by element for script files
Fixes EA-105435 (some isntances)
JavaResolveExtension: refactor API
2017-12-25 20:12:51 +03:00
Pavel V. Talanov
2af0bf4c71 Drop JsProjectDetector
It leads to undesired behaviour
    such as returning library source when only binaries are queried
It is redundant since js libraries do not include kotlin source files
    (real binary format is used for this purpose for along time now)
2017-12-25 20:12:48 +03:00
Pavel V. Talanov
6551ee5403 Test completion in script files
Test for 'JavaResolutionUtils.getJavaDescriptorResolver' failing with AE
Tests ebd3ac6dc8
See EA-105435
2017-12-25 20:12:46 +03:00
Sergey Igushkin
149b197b24 Fix unconditional warning in JS compilation with sourceMap disabled. 2017-12-25 15:30:01 +03:00
Sergey Igushkin
66d3c94193 Fix both moduleFile and destination passed to the compiler
when it is run not in daemon from Gradle; don't pass the destination in
such case.

Issue #KT-21637 Fixed
2017-12-25 15:29:34 +03:00
Sergey Igushkin
00d7150944 Fix warning check in tests:
* Fix the regex that could not actually find warnings
* Suppress an unused parameter warning in the test project
* Add allWarningsAsErrors to ExecutionStrategyIT
2017-12-25 15:28:33 +03:00
Sergey Igushkin
41086f26ae Fix duplicate classpath entry in JS Gradle compilation causing warnings
Issue #KT-21943 Fixed
2017-12-25 15:15:54 +03:00
Nikolay Krasko
93e7e9b28c Minor: regenerate tests 2017-12-22 17:06:12 +03:00
Alexey Tsvetkov
d7edbb8dfc Track changes in inline function when friend paths are disabled in JS 2017-12-22 16:12:20 +03:00
Alexey Tsvetkov
a4d122478b Replace testCancelLongKotlinCompilation with less flaky test 2017-12-22 16:12:20 +03:00
Alexey Tsvetkov
ee94a64718 Explicitly request rebuild when untracked java file is removed
Previously a rebuild was happenning because FileNotFoundException
was thrown when getting psiFile of removed file.
2017-12-22 16:12:20 +03:00
Alexey Tsvetkov
61cb39a600 Include tests from incremental-compilation-impl in compiler tests 2017-12-22 16:12:20 +03:00
Alexey Tsvetkov
50bf74b909 Turn off class redeclaration test for JS IC temporarily
So the tests could be run on TC.
Turn on after KT-19846 is fixed.
2017-12-22 16:12:20 +03:00
Alexey Tsvetkov
5b646ba4fa Generate source maps in JS IC tests
#KT-21700 fixed
2017-12-22 16:12:20 +03:00
Alexey Tsvetkov
0fee7883ed Recompile only files from last iteration after compile error 2017-12-22 16:12:20 +03:00
Alexey Tsvetkov
3914c1b0e9 Allow to edit non-JPS build logs in "Show difference" window for non-JPS IC tests 2017-12-22 16:12:20 +03:00
Alexey Tsvetkov
ff2e3ecfc4 Add JS specific IC build log in test
JS IC compares proto using a source file path as a key,
so moving file causes recompilation of its usages
unlike JVM IC that uses a class file path as a key.
2017-12-22 16:12:20 +03:00
Alexey Tsvetkov
7712044146 Fix IC test build log diverged from JPS
JPS marks dirty direct usages of removed classes since 172.* before a build.
Generic IC also marks dirty all subclasses and their usages.
That is necessary because a method from a removed class could be used
through a subclass.
JPS and generic IC logs diverged in 172 branch, but non-JPS tests
were not run on CI.
2017-12-22 16:12:20 +03:00
Alexey Tsvetkov
ad1978940b Recompile inline function usages in JS when offset is changed
Otherwise source maps would differ after rebuild
2017-12-22 16:12:20 +03:00
Alexey Tsvetkov
a31f503fa5 Recompile all subclasses of removed classes 2017-12-22 16:12:19 +03:00
Alexey Tsvetkov
e8162cd99d Unify processing of removed files for JS and JVM IC 2017-12-22 16:12:19 +03:00
Alexey Tsvetkov
d0ca0dca2b Avoid processing incremental changes after first build for JVM 2017-12-22 16:12:19 +03:00
Alexey Tsvetkov
91bb57c5a3 Make general IC logs similar to JPS IC logs 2017-12-22 16:12:19 +03:00
Alexey Tsvetkov
fec2d08d22 Compile actual and expected declarations together
#KT-20840 fixed
2017-12-22 16:12:19 +03:00
Alexey Tsvetkov
123fd64a34 Fix stdlib usages in IC tests
* Use stdlib from dist
* Check that stdlib exists
* Don't add stdlib for JS, because compiler adds one by default
(stdlib would be read twice which is slow)
2017-12-22 16:12:19 +03:00
Alexey Tsvetkov
e3a9ad5a74 Minor: remove unused variable 2017-12-22 16:12:19 +03:00
Alexey Tsvetkov
dfe176efca Avoid computing source files changes in IC for Gradle 2017-12-22 16:12:19 +03:00
Nikolay Krasko
5a8c0f8f42 Minor: fix compile error in test data 2017-12-22 15:27:11 +03:00
Toshiaki Kameyama
9fad40b586 KT-21928 Structure view doesn't show default constructor 2017-12-22 15:27:10 +03:00
Dmitry Jemerov
3178dee759 Insert line break before elvis when converting if to elvis
This ensures correct indentation
2017-12-22 10:35:23 +01:00
Dmitry Jemerov
6208c69c72 Add option for wrapping closing paren in multiline if conditions 2017-12-22 10:35:23 +01:00
Dmitry Jemerov
7711f8e3a7 Add predefined code style for Kotlin style guide 2017-12-22 10:35:23 +01:00
Dmitry Jemerov
d69382f129 Don't apply indent on Enter after modifier list
#KT-9562 Fixed
2017-12-22 10:35:23 +01:00
Dmitry Jemerov
43ef113b7a Correctly apply annotation wrap before modifier keyword
#KT-20314 Fixed
2017-12-22 10:35:22 +01:00
Dmitry Jemerov
fa19bd6d9b Apply indent of continuation call start to its children
#KT-15099 Fixed
2017-12-22 10:35:22 +01:00
Dmitry Jemerov
5652fa762f Force no line break after dot in chained calls
#KT-20362 Fixed
2017-12-22 10:35:22 +01:00
Dmitry Jemerov
06fa61bb6f Line breaks in objects and lambdas don't trigger call paren wrapping
#KT-19727 Fixed
2017-12-22 10:35:22 +01:00
Dmitry Jemerov
79a509df7b Option to apply normal indent to children of 'if' expressions 2017-12-22 10:35:21 +01:00
Dmitry Jemerov
640bf22e4f Refactoring: extract 'continuationIf' method 2017-12-22 10:35:21 +01:00
Dmitry Jemerov
44ee228ac9 Don't wrap parentheses in long argument list containing only object 2017-12-22 10:35:21 +01:00
Dmitry Jemerov
a2175c2ef5 KotlinFormattingModelBuilder: J2K 2017-12-22 10:35:21 +01:00
Dmitry Jemerov
57844968b0 KotlinFormattingModelBuilder: rename to .kt 2017-12-22 10:35:20 +01:00
Mikhael Bogdanov
ea5505f80c Generate annotations in proper order in DefaultImpls 2017-12-22 10:02:04 +01:00
Mikhael Bogdanov
c9d0ab38cf Generate proper java parameter names for DefaultImpls
#KT-21919 Fixed
2017-12-22 10:02:04 +01:00
Alexander Podkhalyuzin
12a8048bf7 Fixed exception reporting in Kotlin plugin and IDEA releases 2017-12-22 11:33:36 +03:00
Sergey Igushkin
a88206c5ea (minor) Fix platform-dependent line separators in source maps test 2017-12-21 20:49:58 +03:00
Ilya Gorbunov
94a0e508d9 Use empty array instead of presized for Collection.toArray
#KT-21918
2017-12-21 20:10:28 +03:00
Alexander Podkhalyuzin
8203d1c3fe Extracted Kotlin.JVM IDE into separate module
This change is required to have possibility to build plugin against
minor IDEs, which don't have Java. So we want to extract idea-jvm
2017-12-21 18:34:02 +03:00
Alexander Podkhalyuzin
2bb02beb84 Do not report exceptions/errors in very specific case
In IDEA special property can be used for that, Kotlin plugin should honor that
2017-12-21 18:34:00 +03:00
Alexander Podkhalyuzin
5e21dc5560 Removed non ASCII char to reduce pain in compilation. 2017-12-21 18:34:00 +03:00
Ilmir Usmanov
c8904b1c7c Replace POP with ARETURN if it pops Unit and ARETURN shall return Unit
#KT-16880: Fixed
2017-12-21 18:08:39 +03:00
Toshiaki Kameyama
2cdc246a27 Inspection to highlight usages of Collections.sort() and replace them with .sort() method from Kotlin stdlib
#KT-11023 Fixed
2017-12-21 15:05:48 +01:00
Alexey Sedunov
4ac870500f Minor: Fix test data 2017-12-21 16:01:29 +03:00
Emmanuel Duchastenier
a8ddf03b53 README: IntelliJ IDEA 2017.3 is not early access anymore
update README.md with direct download link to IntelliJ IDEA latest version
2017-12-21 13:51:24 +01:00
Nikolay Krasko
e6aeb66875 Sort files according to given scope in debugger (KT-21931)
#KT-21931 Fixed
2017-12-21 15:46:28 +03:00
Nikolay Krasko
7c73356893 Early exit from getSourcePosition() for non-kotlin source files 2017-12-21 15:46:28 +03:00
Mikhael Bogdanov
50608d0844 Don't delete nested default lambda classes during inline transformation 2017-12-21 12:52:29 +01:00
Mikhael Bogdanov
b65dcf27ee Provide test source mapping data for separate and non-separate compilation
Compilation in same module or in separate ones
2017-12-21 12:52:28 +01:00
Mikhael Bogdanov
f4f7c83eeb Copy nested objects of default lambda during inline 2017-12-21 12:52:28 +01:00
Mikhael Bogdanov
3513f1a86a Properly process default lambda source mapping
#KT-21827 Fixed
2017-12-21 12:52:27 +01:00
Nicolay Mitropolsky
657123f2c0 LightClassUtil.extractPropertyAccessors refactoring to fix KotlinShortNamesCacheTest.testGetMethodsByNameWithCustomPropertyAccessors test
After light classes caching the test started to fail.
 Also refer Simon Ogorodnik.
2017-12-21 12:25:51 +03:00
Sergey Igushkin
710c726c9a Improve kapt arguments & javac options usability with Kotlin DSL
Issue #KT-21596 Fixed
2017-12-20 20:49:30 +03:00
Toshiaki Kameyama
411feab9ae KT-21698 Create interface shouldn't suggest to declare it inside a class which implements it 2017-12-20 18:14:55 +01:00
Vyacheslav Gerasimov
1deed28464 Add missing changelog for [1.2.20 - 1.1.60] versions 2017-12-20 19:10:26 +03:00
Pavel V. Talanov
aec893180e Minor, JvmAnalyzerFacade: drop logging
Prevent log spam
2017-12-20 17:19:09 +03:00
Dmitry Jemerov
78a87ac0cf Regenerate test 2017-12-20 15:03:25 +01:00
Mikhail Glukhikh
484bf0115f Fix "fake JVM field" inspection test XML 2017-12-20 16:31:10 +03:00
Kirill
7842fa4796 Support callable references in "implicit this" inspection
Second part of #KT-21510
2017-12-20 14:16:39 +03:00
Kirill
74e5a9425a Support callable references in "explicit this" inspection
So #KT-21510 Fixed
2017-12-20 14:16:33 +03:00
Dmitry Jemerov
d3adf57145 Don't apply highlighting to zero-length elements
#KT-19820 Fixed
2017-12-20 12:02:04 +01:00
Dmitry Jemerov
52ccfcecfc Fix highlighting of TODO calls in lambdas
#KT-19915 Fixed
2017-12-20 12:02:04 +01:00
Dmitry Jemerov
0159d19539 Apply rainbow highlighting in anonymous initializers
#KT-18839 Fixed
2017-12-20 12:02:04 +01:00
Dmitry Jemerov
94a7673c2d Don't show type hints for destructuring declarations with explicit type
#KT-21833 Fixed
2017-12-20 12:02:04 +01:00
Dmitry Jemerov
b0b69b2ad0 Put argument name hint before spread element
#KT-21645 Fixed
2017-12-20 12:02:04 +01:00
Dmitry Jemerov
c336159b2b Don't show argument name hints for dynamic calls.
Mark function descriptors created for dynamic calls as having
synthesized parameter names.

 #KT-21275 Fixed
2017-12-20 12:02:04 +01:00
Dmitry Jemerov
3e7e01dc4d Add mapOf() to default parameter name hints blacklist
#KT-18829 Fixed
2017-12-20 12:02:04 +01:00
Dmitry Jemerov
fd7aaa1579 Add single-arg 'assert' method to parameter name hints blacklist
#KT-17965 Fixed
2017-12-20 12:02:04 +01:00
Dmitry Jemerov
cf6b71aa05 Don't show type hint for local variable initialized with object
#KT-17964 Fixed
2017-12-20 12:02:04 +01:00
Dmitry Jemerov
77c186442a Don't show parameter name hints when calling Java methods with unknown
parameter names

 #KT-17843 Fixed
2017-12-20 12:02:04 +01:00
Dmitry Jemerov
6d63dd9d83 Enable "Configure Kotlin plugin updates" with no open project
#KT-20380 Fixed
2017-12-20 12:02:04 +01:00
Dmitry Jemerov
1a9d2ab4ee Fix name of inspection description file 2017-12-20 11:56:04 +01:00
kenji tomita
3cd4d90bf8 Use BodyResolveMode.PARTIAL and ProblemHighlightType.GENERIC_ERROR_OR_WARNING 2017-12-20 11:56:04 +01:00
kenji tomita
37351c344f code style inspection: to -> Pair function used not in infix form 2017-12-20 11:56:04 +01:00
Mikhail Glukhikh
41739602bc Inline handler: fix reference detection for properties 2017-12-20 13:54:36 +03:00
Mikhail Glukhikh
ce441e2163 Extract common class from two KotlinInline<...>Dialogs #KT-17212 Fixed 2017-12-20 13:54:30 +03:00
Mikhael Bogdanov
3e1f471121 Rollback change in 'usesDefaultArguments' 2017-12-20 10:58:35 +01:00
Mikhael Bogdanov
32b90a1cae Generate type checker barriers in bridges 2017-12-20 10:48:52 +01:00
Mikhael Bogdanov
be18cb9b16 Fix default methods visibility 2017-12-20 10:48:51 +01:00
Mikhael Bogdanov
9365d1d859 Remove redundant extra default mask for function with N*32 parameters 2017-12-20 10:48:51 +01:00
Mikhael Bogdanov
ef5c3512cd Skip FAKE_OVERRIDE fields 2017-12-20 10:48:50 +01:00
Mikhael Bogdanov
aeb74f7e70 Skip bridge generation for non real declaration on first step they would be processed later
~

~
2017-12-20 10:48:50 +01:00
Mikhael Bogdanov
4657ae06f4 Don't cast receiver to super type on super calls 2017-12-20 10:48:49 +01:00
Mikhael Bogdanov
a936f75423 Fix empty vararg processing in intrinsics 2017-12-20 10:48:49 +01:00
Mikhael Bogdanov
420b9fdaa9 Support interface companion object lowering 2017-12-20 10:48:48 +01:00
Mikhael Bogdanov
24336113a2 Support class companion object lowering 2017-12-20 10:48:48 +01:00
Mikhael Bogdanov
224adfabc5 Support synthetic accessors for constructors 2017-12-20 10:48:47 +01:00
Mikhael Bogdanov
5cbfdf6024 SyntheticAccessorLowering refactoring 2017-12-20 10:48:47 +01:00
Mikhael Bogdanov
7da847e943 Fix coercion after call 2017-12-20 10:48:46 +01:00
Mikhael Bogdanov
4df0a1bb1f Fix parameter indices on lowering 2017-12-20 10:48:46 +01:00
Mikhael Bogdanov
0729566458 Support javaClass for Void type 2017-12-20 10:48:45 +01:00
Mikhael Bogdanov
f7968e1b61 Fix inner class lowering: don't try to process nested classes on processing outer 2017-12-20 10:48:45 +01:00
Mikhael Bogdanov
dde0535c5a Fix cast for IMPLICIT_NOTNULL 2017-12-20 10:48:44 +01:00
Mikhael Bogdanov
05b56b0c4a Update ArrayConstructor to support inline 2017-12-20 10:48:44 +01:00
Mikhael Bogdanov
665a697093 Support simple function inlining in ir 2017-12-20 10:48:43 +01:00
Mikhael Bogdanov
54dc828c8e Rename ExpressionLambda to PsiExpressionLambda 2017-12-20 10:48:43 +01:00
Mikhael Bogdanov
0e2bd46124 Remove cycle check and resolvedCall from 'preformInline' method 2017-12-20 10:48:42 +01:00
Mikhael Bogdanov
4711e2f9da Don't use kind for static check
Lowers should perform proper transformations
2017-12-20 10:48:42 +01:00
Mikhael Bogdanov
3432014971 Add 'generateModule' method to CodegenFactory 2017-12-20 10:48:41 +01:00
Mikhael Bogdanov
06fd996266 Switch LocalFunctionLowering to LocalDeclarationLowering 2017-12-20 10:48:41 +01:00
Mikhael Bogdanov
1f053be289 Support default function lowering 2017-12-20 10:48:40 +01:00
Mikhael Bogdanov
83710a8ed6 HACK: process unbound symbols 2017-12-20 10:48:40 +01:00
Mikhael Bogdanov
5032064bf0 Enable tailrec lower 2017-12-20 10:48:39 +01:00
Mikhael Bogdanov
84e960b3a4 Enable lateinit lowering 2017-12-20 10:48:39 +01:00
Mikhael Bogdanov
039e036e22 Support IrExpressionBody in codegen 2017-12-20 10:48:38 +01:00
Mikhael Bogdanov
4017195ff1 Always include stdlib in IrTests 2017-12-20 10:48:38 +01:00
Mikhael Bogdanov
e16bdd4287 Switch JvmBackendContext to CommonBackendContext
(cherry picked from commit 5d4736c)
2017-12-20 10:48:37 +01:00
Nikolay Krasko
f963b8bd42 Fix QuickFixTestGenerated$DeprecatedSymbolUsage$TypeAliases
Revert asking super isAvailable in DeprecatedSymbolUsageInWholeProjectFix
2017-12-20 12:27:36 +03:00
Nikolay Krasko
b80403cf13 Consistency for replace string quick fix message
https://youtrack.jetbrains.com/issue/KT-21746#comment=27-2634335
2017-12-20 12:27:36 +03:00
Vyacheslav Gerasimov
95cc3fe1b7 Fix availability of AddFunctionParametersFix
fixes RenameTestGenerated.testAutomaticVariableRenamerWithQuotation_AutomaticVariableRenamerWithQuotation
2017-12-19 21:23:38 +03:00
Nicolay Mitropolsky
bb4d6d1059 LightClassEqualsTest fix by creating lightclasses with createNoCache 2017-12-19 20:03:59 +03:00
Nicolay Mitropolsky
4c5cf0f7e7 *kapt3-idea* added to test-dependencies in *uast-kotlin* 2017-12-19 18:22:14 +03:00
Mikhael Bogdanov
ef433d163e Apply common header directives to second file in AbstractCompileKotlinAgainstKotlinTest 2017-12-19 16:11:39 +01:00
Mikhael Bogdanov
819a3a95b3 Add support for contract feature in inliner 2017-12-19 16:11:39 +01:00
Pavel V. Talanov
4890979476 ScriptDefinitionsManager: ignore reloadDefinitionsBy calls
If definitions are not loaded yet
2017-12-19 17:15:39 +03:00
Pavel V. Talanov
106f571814 scriptTemplatesFromCompilerSettings: fix ScriptDefinitionsManager access
#KT-21545 Fixed
2017-12-19 17:15:36 +03:00
Mikhail Glukhikh
4bff0fb338 Unused symbol: revert entry point check optimization to fix regression
E.g. JUnit 3 tests was highlighted as unused after it
2017-12-19 15:59:30 +03:00
Mikhail Zarechenskiy
9eca8cd451 [NI] Fix hierarchy of resolution atoms for lambda with non-local return 2017-12-19 15:11:04 +03:00
Mikhail Zarechenskiy
c6d8b39b4f [NI] Prioritize type variables related to output type for fixation 2017-12-19 15:11:04 +03:00
Mikhail Zarechenskiy
d818af5287 [NI] Don't forget to analyze whole block for last postponed expression 2017-12-19 15:11:03 +03:00
Anton Bannykh
8ed8e05a68 JS: honor ignoreTestFailures flag and report failures to TC (KT-20735
fixed)
2017-12-19 14:38:15 +03:00
Alexey Sedunov
0ab924a298 Change Signature: Fix overrider search for suspend functions
#KT-21288 Fixed
2017-12-19 13:47:02 +03:00
Alexey Sedunov
b5bd5942e7 Kotlin Facet: Do not auto-advance version in imported projects
#KT-21879 Fixed
2017-12-19 13:47:02 +03:00
Alexey Sedunov
88540360b4 Misc: Fix NPE on external project import 2017-12-19 13:47:02 +03:00
Nicolay Mitropolsky
4a6cc3913d Fix for "safe delete" after caching added to light elements 2017-12-19 13:32:23 +03:00
Alexey Tsvetkov
18fae9e16d Allow override removing temporary module files after build
For debug purposes
2017-12-18 21:19:15 +03:00
Alexey Tsvetkov
5bffef6de7 Allow customizing directory for temporary module files 2017-12-18 21:19:15 +03:00
Alexey Tsvetkov
37b00b91fc Avoid generating too long path for temp module file
#KT-21841 fixed
2017-12-18 21:19:15 +03:00
Toshiaki Kameyama
a4fbe95112 KT-21770 Pasting into an interpolated string shouldn't escape $ 2017-12-18 18:25:43 +01:00
Toshiaki Kameyama
eb25ac44e6 KT-17928 Support code folding for primary constructors 2017-12-18 18:14:27 +01:00
Dmitry Jemerov
18cb9593c8 Add 'reformat' flag to DeprecatedSymbolUsageFixBase 2017-12-18 18:10:36 +01:00
Dmitry Jemerov
48021ce5a1 Disallow formatting in KotlinQuickFix.isAvailable() 2017-12-18 18:10:34 +01:00
Dmitry Jemerov
64f01e53af Check that add() method is in fact MutableCollection.add()
#KT-18881 Fixed
2017-12-18 18:10:33 +01:00
Dmitry Jemerov
94b8614fb8 Don't suggest mapTo() transformation over range literals
#KT-18816 Fixed
2017-12-18 18:10:32 +01:00
Dmitry Jemerov
09d27ca61c Don't generate .forEach { return } when converting loop to call chain
#KT-17161 Fixed
2017-12-18 18:10:31 +01:00
Dmitry Jemerov
b775b901cc Fix incorrect replacement with 'any' instead of 'all'
#KT-17730 Fixed
2017-12-18 18:10:24 +01:00
Dmitry Jemerov
ba4cf4dcc6 Delete unused class 2017-12-18 18:10:21 +01:00
Dmitry Jemerov
d0a8dd7dc8 Update EAP channel names in plugin update check dialog 2017-12-18 18:10:14 +01:00
Ilya Chernikov
3e2003e60d Do not log daemon connection errors as exceptions - may reduce number of ...
redundant report if the problem is corrected on retry

(cherry picked from commit 260fe36)
2017-12-18 17:08:15 +01:00
Ilya Chernikov
f83dc0a067 Make daemon session retrieval more robust to the daemon failures 2017-12-18 16:49:53 +01:00
Ilya Chernikov
1101bb7fb4 Treat "daemon is dying" state as a case for fallback compilation strategy in jps 2017-12-18 16:49:52 +01:00
Ilya Chernikov
6e34f57acf Retry socket connection on connection errors, number of retries and...
retry interval are configurable via the system props
2017-12-18 16:49:51 +01:00
Ilya Chernikov
1cd14f00eb Ignore connection error on the (optional) daemon.clearJarCache call
May fix issues with NoSuchObjectException and UnmarshalException - the
stacktraces often point to this place
2017-12-18 16:49:50 +01:00
Mikhail Glukhikh
0d64ab4846 Fix corner cases (override/script/null/etc.) in "might be const"
Related to KT-20644
2017-12-18 17:23:41 +03:00
Alexey Tsvetkov
3f082346ae Do not set api version to language version when language version is null
#KT-21852 fixed
    #KT-21574 fixed
2017-12-18 16:22:07 +03:00
Dmitry Petrov
17b4d4a973 Differentiate accessors by FieldAccessorKind
Otherwise accessors for backing fields (as in '{ field }') clash with
accessors for properties (as in '{ prop }').

 #KT-21258 Fixed Target versions 1.2.30
2017-12-18 16:15:52 +03:00
Ilya Gorbunov
d8cd926a8c Do not leak primitiveness of an array wrapped with asList
A primitive array wrapped in a List with asList had incorrect implementation of toArray method:
while it declares that an object array is returned, it returned a primitive array.
Therefore the methods such as `Collection.toTypedArray()` and its dependents
`ArrayList(collection)`, `Collection + Iterable` might behave incorrectly
having relied on `toTypedArray` returned an object array.

#KT-21828 Fixed
2017-12-18 15:50:15 +03:00
Sergey Igushkin
c55f08a166 Optimize embeddable JARs
Exclude the compiler dummy JAR from the resulting shadow JAR
2017-12-18 15:46:23 +03:00
Alexander Udalov
3a807cb39b Support Void.TYPE as underlying Class object for KClass
#KT-20875 Fixed
2017-12-18 11:57:05 +01:00
Anton Bannykh
46a631a654 Ignore license in the downloaded node_modules and nodejs 2017-12-18 13:46:25 +03:00
Yan Zhulanow
1692d1a087 Kapt: Add missing 'flush()', otherwise the serialized data can be empty 2017-12-18 18:57:38 +09:00
Nikolay Krasko
f67eb90dfb Don't show file root if it's same as the only declaration (KT-21200)
#KT-21200 Fixed
2017-12-18 11:50:50 +03:00
Nikolay Krasko
a3028beca9 Fix smart step into to Kotlin SAM adapter (KT-21538)
#KT-21538 Fixed
2017-12-18 11:50:49 +03:00
Denis Zharkov
adfee2086a Update bootstrap to 1.2.20-dev-814 2017-12-16 18:56:26 +03:00
Yan Zhulanow
d4be55df0e Kapt, Minor: Fix empty option parsing 2017-12-16 02:17:24 +09:00
Simon Ogorodnik
7c5897c1ab Skip deprecated for org.junit package in kotlin.test 2017-12-15 20:09:51 +03:00
Simon Ogorodnik
c2e706db6c Enable generation of docs for deprecated declarations 2017-12-15 20:09:49 +03:00
Simon Ogorodnik
c5c52dbda5 Fix annotations docs for kotlin.test 2017-12-15 20:09:48 +03:00
Simon Ogorodnik
430aad3651 Set LV = 1.2 in Dokka for generating stdlib docs 2017-12-15 20:09:47 +03:00
Simon Ogorodnik
3c78156f0f Suppress kotlin.reflect.jvm.internal 2017-12-15 20:09:46 +03:00
Simon Ogorodnik
fb3cf212ce Suppress docs for org.junit.Test header in kotlin.test 2017-12-15 20:09:45 +03:00
Simon Ogorodnik
99951db7e3 Add module docs for kotlin.test 2017-12-15 20:09:44 +03:00
Simon Ogorodnik
978a7fdfaa Add stdlib to kotlin.test docs classpath 2017-12-15 20:09:43 +03:00
Simon Ogorodnik
773fca5245 Use correct task to build builtins.jar 2017-12-15 20:09:42 +03:00
Simon Ogorodnik
640ce213cf Compile stdlib builtins ant pass it to Dokka
We need builtins to allow linking to type-aliased classes
such as Exception
2017-12-15 20:09:41 +03:00
Simon Ogorodnik
697b358293 Make local dokka run easier 2017-12-15 20:09:40 +03:00
Simon Ogorodnik
9ab48d8374 Suppress whole org.w3c 2017-12-15 20:09:38 +03:00
Simon Ogorodnik
99af2372c3 Suppress undocumented warnings for third-party js packages 2017-12-15 20:09:37 +03:00
Simon Ogorodnik
17106d6546 Use makeurl to create package-list URL in ant 2017-12-15 20:09:36 +03:00
Ilya Gorbunov
cc139856c8 List all source folders instead of project folder 2017-12-15 20:09:34 +03:00
Ilya Gorbunov
9b1867ce64 Docs: run gradle project and wrapper from the root dir
Build docs for kotlin-stdlib-jdk7/8 instead of jre7/8.
2017-12-15 20:09:33 +03:00
Simon Ogorodnik
a19e229a72 Minor: prepare for documentation generation 2017-12-15 20:09:32 +03:00
Ilya Chernikov
775eeb75c9 Treat daemon startup timeout/error exceptions the same way as RMI errors
will result on regular retry cycle on them, hopefully eliminating or
reducing appropriate exception reports
2017-12-15 15:24:38 +01:00
Mikhail Glukhikh
ea5a52f918 Restrict search scope in some inspections to avoid testData search
Affected inspections: can be private, can be parameter, unused symbol.
Related to KT-21756. May fix EA-113712.
2017-12-15 17:07:37 +03:00
Mikhail Glukhikh
2b5bbf0fdd Fix tests for "may be constant" inspection 2017-12-15 17:07:35 +03:00
Sergey Igushkin
3b4f82c9b9 Advance Gradle version -> 4.4
(cherry picked from commit 2fc7628)
2017-12-15 16:59:37 +03:00
Nikolay Krasko
6456f4ed98 Test step into for Java constructor with SAM conversion
Additional test for KT-21538

 #KT-21538 Fixed
2017-12-15 16:14:50 +03:00
Nikolay Krasko
d6cface66f Make isFromJava check work for SAM adapter extension descriptors (KT-21538)
Consider all callable descriptor in JavaClassDescriptor to be from Java.

This is used to check if smart step into should be intercepted by Kotlin
handler or delegated to Java.

 #KT-21538 Fixed
2017-12-15 16:14:50 +03:00
Nikolay Krasko
26413acf33 Refactoring: introduce method for reuse file for single class logic 2017-12-15 16:14:50 +03:00
Nikolay Krasko
5c33e4a32d Minor: remove warnings in KotlinStructureViewFactory 2017-12-15 16:14:49 +03:00
Nikolay Krasko
c79386594d Don't show useless fold icon in structure view (KT-17254, KT-21200)
#KT-21200 In Progress
 #KT-17254 Fixed
2017-12-15 16:14:49 +03:00
Nikolay Krasko
1688f6fdbd Minor: inline method in KotlinStructureViewElement and rewrite with when 2017-12-15 16:14:49 +03:00
Nikolay Krasko
7bf071b69f Precount 'isPublic' property if descriptor available 2017-12-15 16:14:49 +03:00
Nikolay Krasko
c28a7d8f6d Fix structure view auto-update (KT-21733, KT-19519)
- Fixed by subclassing PsiTreeElementBase instead of StructureViewTreeElement
- Warnings cleanup

 #KT-19519 Fixed
 #KT-21733 Fixed
2017-12-15 16:14:48 +03:00
Nikolay Krasko
b133189309 Rename: MyFunctionDescriptor -> SamAdapterExtensionFunctionDescriptorImpl 2017-12-15 16:14:48 +03:00
Toshiaki Kameyama
d719d06020 Don't suggest "convert to array literal" for *arrayOf #KT-21726 Fixed 2017-12-15 15:01:22 +03:00
Anton Bannykh
f68d639c63 Add @Target's to kotlin.test annotations 2017-12-15 14:14:00 +03:00
Toshiaki Kameyama
5680405531 "Redundant spread operator" inspection: support array literal
So #KT-21727 Fixed
2017-12-15 13:50:53 +03:00
Mikhail Glukhikh
df4bf73033 Convert lambda to reference: minor cleanup 2017-12-15 13:37:00 +03:00
Toshiaki Kameyama
0071ca64c7 Convert lambda to reference produces: fix case with qualified this
So #KT-19977 Fixed
2017-12-15 13:36:32 +03:00
Mikhail Glukhikh
50dc9a14a6 May be constant: fix corner case with getter & initializer 2017-12-15 13:31:49 +03:00
Mikhail Glukhikh
7358980cbc Add inspection to detect non-const vals used as Java annotation args
So #KT-20615 Fixed
2017-12-15 13:31:41 +03:00
Mikhail Glukhikh
70b7e5eb68 Introduce inspection to detect vals might be marked as const
So #KT-20644 Fixed
2017-12-15 13:05:50 +03:00
Yan Zhulanow
4ec20ad595 Minor: Fix build, remove inline function usage 2017-12-15 17:39:17 +09:00
Nicolay Mitropolsky
da98b7e07b Uast: type-mapper checks deeper for local classes (KT-21546, EA-100195) 2017-12-15 09:16:46 +03:00
Yan Zhulanow
f9813e3276 Kapt, Minor: Add kapt-runtime to sources for kotlin-annotation-processing-maven 2017-12-15 02:35:17 +09:00
Yan Zhulanow
187182e46f Noarg, Minor: Include IDEA 'testRuntime' dependency as in other compiler plugins 2017-12-15 02:35:16 +09:00
Yan Zhulanow
db4c441573 Kapt, Maven: Fix path for kapt3 compiler plugin sources 2017-12-15 02:35:16 +09:00
Yan Zhulanow
4d067ab9ce Kapt, Maven: Support passing javac/annotation processor options (KT-21565, KT-21566) 2017-12-15 02:35:15 +09:00
Yan Zhulanow
1af93b8342 Kapt: Consider all 'kapt' configuration dependencies as KaptTask dependencies. 2017-12-15 02:35:14 +09:00
Yan Zhulanow
6941065e2c Fix EA-1005833: Try to find a field using also the receiver type (KT-21820) 2017-12-15 02:35:13 +09:00
Yan Zhulanow
d58665b5a8 Kapt: Remove duplicating check, this also removes the senseless warning (KT-21425) 2017-12-15 02:35:12 +09:00
Yan Zhulanow
4c96453a4b Kapt: Annotations on enum constants are not kept on the generated stub (KT-21433) 2017-12-15 02:35:12 +09:00
Yan Zhulanow
c6f922fb64 EA-110813: Resolve the parent directory safely 2017-12-15 02:08:03 +09:00
Yan Zhulanow
e5a2be4f3c EA-96041: Make error message more user-friendly 2017-12-15 02:08:00 +09:00
Denis Zharkov
fa6285d32a Fix NPE in JavaNullabilityChecker when checking equals-calls
This NPE was introduced in ce41b5745a
Prior to the latter change there was a synthetic PSI element for each
equals-related call, thus callOperationNode was not null here.

== are intentionally treated as safe calls, but for nullability checker
it's not relevant, it only should report warnings on real safe-calls
2017-12-14 19:15:41 +03:00
Denis Zharkov
d64e8e3b33 Revert "Update bootstrap to 1.2.20-dev-732"
This reverts commit f7ccc4144c.
2017-12-14 19:15:41 +03:00
Nicolay Mitropolsky
6ac345df51 Caching KtLightClassForSourceDeclaration (KT-21701)
to make their UserData survive for longer, because otherwise a new LightClass with empty UserData comes to Spring every time, but Spring stores a lot of important things in UserData
2017-12-14 18:05:47 +03:00
Anton Bannykh
6bee5699a0 Migrate node_utils.xml to Gradle 2017-12-14 17:41:20 +03:00
Dmitry Jemerov
40184f053e Don't invoke formatter while checking availability of intentions
#KT-21632 Fixed
2017-12-14 12:02:39 +01:00
Dmitry Jemerov
54d626fe7d Change vendor to JetBrains to always enable exception reporting
#KT-17838 Fixed
2017-12-14 12:02:39 +01:00
Dmitry Jemerov
ba21bae653 Get rid of forced index rebuild on version change
#KT-17367 Fixed
2017-12-14 12:02:39 +01:00
Denis Vnukov
52ccd67ec1 Remove duplicate parameter null checks in JvmStatic delegate methods.
Remove unnecessary non-null parameter checks inside static delegate methods
created for @JvmStatic companion object methods. Allows function generation
strategy decide if such checks need to be injected.

 #KT-7188 Fixed
2017-12-14 13:48:50 +03:00
Alexander Udalov
9e82ab38f0 Fix lookup tracker tests after 2be7116b0b
Standard library is no longer automatically added to the classpath when
-Xbuild-file is used. Before 2be7116b0b, these tests worked because no
matter whether -Xbuild-file was used or not, the automatically computed
classpath (which erroneously was used to populate content roots in the
compiler) contained the standard library (see
K2JVMCompiler.configureContentRoots)
2017-12-14 11:37:56 +01:00
Alexander Udalov
46fa5cfae0 Add dependency on compiler dist from jps-tests
Otherwise, because there's no explicit dependency and the JPS plugin
loads the compiler from dist, the compiler jar is not rebuilt between
changes in compiler code and running jps-tests
2017-12-14 11:37:56 +01:00
Yan Zhulanow
5116f598df Kapt: Fix error message when no annotation processors were found (KT-21729)
Error message says "androidProcessor", it should be "annotationProcessor"
2017-12-14 19:28:51 +09:00
Denis Zharkov
f7ccc4144c Update bootstrap to 1.2.20-dev-732 2017-12-14 11:11:23 +03:00
Dmitry Petrov
1aab4e643c Add overflow-related tests for 'reversed' 2017-12-14 10:41:51 +03:00
Dmitry Petrov
65b5cdbb8d Maintain bounds evaluation order in intrinsics for 'reversed'
Makes sense for 'rangeTo', 'downTo', and 'until' with non-const bounds.
2017-12-14 10:41:51 +03:00
Dmitry Petrov
9fa9a8748b Check that qualified const expressions are recognized properly in 'for' 2017-12-14 10:41:51 +03:00
Dmitry Petrov
bf97b332cf Support const-bounded for loop generation for reversed 'until' 2017-12-14 10:41:51 +03:00
Dmitry Petrov
54cceac99b Intrinsics for 'reversed': until 2017-12-14 10:41:51 +03:00
Dmitry Petrov
5f7460a8c7 Support const-bound counter loop generation for 'downTo' 2017-12-14 10:41:51 +03:00
Dmitry Petrov
2f0df832c0 Minor: pull up helper methods for const-bounded for-in-range generation 2017-12-14 10:41:51 +03:00
Dmitry Petrov
a4c29b3587 Support Long and Char in const-bounded counter loop generation
If the loop end value is a compile-time constant (best we can do now),
and it is safe to iterate over a given range using "naive" for loop
(using '<=' or '>=' in loop condition),
generate such loops for Longs and Chars as well Ints (Bytes, Shorts).
2017-12-14 10:41:51 +03:00
Dmitry Petrov
df2b8d01d8 Extract common code in PrimitiveNumberRangeLiteralRangeValue 2017-12-14 10:41:51 +03:00
Dmitry Petrov
455a1c0f53 Intrinsics for 'reversed': downTo
#KT-21323 In Progress
2017-12-14 10:41:51 +03:00
Dmitry Petrov
64ba811b7f Intrinsics for 'reversed': CharSequence.indices
#KT-21323 In Progress
2017-12-14 10:41:51 +03:00
Dmitry Petrov
7ba73c1635 Intrinsics for 'reversed': collection.indices
#KT-21323 In Progress
2017-12-14 10:41:51 +03:00
Dmitry Petrov
5bcbe25469 Intrinsics for 'reversed': array.indices
#KT-21323 In Progress
2017-12-14 10:41:51 +03:00
Dmitry Petrov
beff4a1b92 Intrinsics for 'reversed': support non-literal range expressions
#KT-21323 In Progress
2017-12-14 10:41:51 +03:00
Dmitry Petrov
1493805f8e Take into account step sign in pre-condition for simple progression
So far, all non-end-inclusive progressions had step > 0.
With intrinsics for 'reversed' this will change.
2017-12-14 10:41:51 +03:00
Dmitry Petrov
821843e13f Intrinsics for 'reversed': generate in-const-bound ranges as countable
#KT-21323 In Progress
2017-12-14 10:41:51 +03:00
Dmitry Petrov
1775f294f4 Intrinsics for 'reversed': infrastructure & primitive range support
#KT-21323 In Progress
2017-12-14 10:41:51 +03:00
Mikhail Glukhikh
83ae34bb29 Fix leak in matchAndConvert (loopToCallChain) 2017-12-14 10:38:28 +03:00
Ilya Gorbunov
479f293edc Expose internal getProgressionLastElement to public api
To be used in compiler loop optimizations.
#KT-18869 Fixed
2017-12-14 07:22:08 +03:00
Ilya Chernikov
c453ff01cd Increase daemon socket queue size, make it controllable via system prop
Hopefully fixes #KT-15562
Also some minor refactoring
2017-12-13 17:34:13 +01:00
Ilya Chernikov
8f42aa1eda Improve parallel daemon start test:
- move asserts to the end to collect all diagnostics before it
  - disable compilation by default for better testing the startup logic
  - minor refactorings
2017-12-13 17:34:12 +01:00
Alexander Udalov
c5c4c9cfcc Support "-module-name" argument for common code compiler
#KT-20892 Fixed
2017-12-13 11:49:58 +01:00
Alexander Udalov
3ede503042 Minor, remove empty K2JSCompilerArguments.java 2017-12-13 11:49:58 +01:00
Alexander Udalov
cc9ebb26de Minor, improve "-module-name" argument description 2017-12-13 11:49:58 +01:00
Alexander Udalov
dc23a53116 Enumerate module roots directly in ModuleHighlightUtil2.getModuleDescriptor
This is faster than going through FilenameIndex which would call
GlobalSearchScope.accept for all "module-info.java" files in the
project, and there can be many of those.

Also see https://github.com/JetBrains/intellij-community/pull/670
2017-12-13 11:49:51 +01:00
Alexey Sedunov
38d3362bcb Configuration: Support selection of "Latest stable" version vs specific one
#KT-21229 Fixed
2017-12-12 20:48:26 +03:00
Mikhail Glukhikh
5252cd4da4 Lift return or assignment: use register...WithoutOfflineInformation 2017-12-12 19:47:52 +03:00
Mikhail Glukhikh
a375500a33 Spelling: MemberVisibilityCanPrivate > MemberVisibilityCanBePrivate 2017-12-12 19:47:46 +03:00
Dmitry Jemerov
db8147bd79 Regenerate test 2017-12-12 17:13:35 +01:00
Denis Zharkov
e24e711208 Avoid rebuilds after changes of layouts xml-files
This commit makes IC react more granularly on these changes
Precisely, it marks dirty only kt-files that having lookups into
synthetic package built upon a changed layout-file

 #KT-21622 Fixed
2017-12-12 16:17:58 +03:00
Denis Zharkov
58123f2103 Enable kotlin.incremental.usePreciseJavaTracking in gradle.properties 2017-12-12 16:17:58 +03:00
Denis Zharkov
a079b92ea0 Add property for precise version of Java tracking in Gradle IC
The flag name is kotlin.incremental.usePreciseJavaTracking
By default precise version is disabled

 #KT-17621 Fixed
2017-12-12 16:17:58 +03:00
Denis Zharkov
a978c6be35 Fix precise Java IC for multi-module projects
The problem may happen in case of multi-module projects:
If a Java class was effectively unused in one module (A),
but it's used in kt-files from the dependent module (B) then
we wouldn't track the changes of the class while compiling A
and don't recompile its usages in B.

It happens because now we track only Java classes that were
resolved by out frontend instead of all classes in the module
that would be more correct but it might be rather slow.

The idea is that whenever we see change in an untracked Java file
we start tracking the classes in it and for the first time we mark
all its content as changed.
2017-12-12 16:17:58 +03:00
Denis Zharkov
d9cfdf2f63 Add assertion to JavaClassesTrackerImpl::onCompletedAnalysis 2017-12-12 16:17:58 +03:00
Denis Zharkov
8dd5c2f895 Avoid serlialization for unrelated Java source-based classes
There is no need to track unknown (not being tracked before)
classes content of which we didn't request

 #KT-17621 Fixed
2017-12-12 16:17:58 +03:00
Denis Zharkov
f33255c990 Add jetbrains annotations to javac classpath in IncrementalJvmCompilerRunnerTest
Before this change some of these tests were failing
2017-12-12 16:17:58 +03:00
Denis Zharkov
df533053f9 Record special name lookup when trying use interface as a SAM
It was already working in JPS, because it see our synthetic classes
as subclasses for SAM's, but with non-JPS build we have to manually
tracking places that should be recompiled after SAM members are changed
2017-12-12 16:17:58 +03:00
Denis Zharkov
ae6421476d Refine dirty files computation in case of Java source changes
#KT-17621 In Progress
2017-12-12 16:17:58 +03:00
Denis Zharkov
26393d738f Drop IncrementalCompilerRunner::markDirty and its override 2017-12-12 16:17:58 +03:00
Denis Zharkov
1702775738 Introduce JavaClassesSerializerExtension
It will be used to track java classes changes for incremental compilation

 #KT-17621 In Progress
2017-12-12 16:17:58 +03:00
Denis Zharkov
c86dc0d7af Add protobuf extensions to serialized Java descriptors
#KT-17621 In Progress
2017-12-12 16:17:58 +03:00
Denis Zharkov
34452f4f4a Introduce JavaClassesTracker interface into java resolution components
It's purpose is passing java classes being used during analysis
to incremental compilation to let it track diffs

Potentially it might be done the other way:
incremental compilation could build a separate container to analyze
necessary classes, but it's rather hard to implement now

 #KT-17621 In Progress
2017-12-12 16:17:58 +03:00
Alexey Sedunov
9ed0b49746 Gradle: Compile Gradle models/model builders under JVM 1.6
This prevents imports failure in projects using older versions of Gradle

 #KT-21610 Fixed
2017-12-12 15:38:40 +03:00
Dmitry Petrov
a1a1972a04 Provide DescriptorUtils.isAnonymousFunction (for IR-based BE) 2017-12-12 15:29:45 +03:00
Anton Bannykh
0566366895 Make project wizards produce kotlin-test-js testDependency in all Kotlin/JS projects 2017-12-12 14:25:24 +03:00
Alexander Udalov
3c98274006 Move -Xjsr-305 argument parsing out of K2JVMCompilerArguments
To simplify K2JVMCompilerArguments, which is mostly a data holder
2017-12-11 18:02:37 +01:00
Alexander Udalov
5092758acb Improve help message on -Xjsr305 CLI argument 2017-12-11 18:02:04 +01:00
Dmitry Jemerov
900ec82614 Fix indent of expressions following elvis operator 2017-12-11 17:58:02 +01:00
Dmitry Jemerov
87d2d16cda "Use continuation indent for expression body" for prop initializers 2017-12-11 17:58:02 +01:00
Dmitry Jemerov
eacd010e7e Option to wrap elvis expressions
#KT-21720 Fixed
2017-12-11 17:58:02 +01:00
Dmitry Jemerov
d1daca2560 No line break before = in property initializer and function expr body 2017-12-11 17:58:02 +01:00
Dmitry Jemerov
ab99bf843a Implement option for wrapping assignment statements
#KT-21718 Fixed
2017-12-11 17:58:02 +01:00
Dmitry Jemerov
947833cad6 Add wrap option for expression body functions
#KT-21470 Fixed
2017-12-11 17:58:02 +01:00
Dmitry Jemerov
3394d675e5 Option to use continuation indent in argument lists 2017-12-11 17:58:02 +01:00
Dmitry Jemerov
3038f87105 Move two continuation indent wrapping options to wrapping page 2017-12-11 17:58:02 +01:00
Dmitry Jemerov
dc4e673fb1 Initial support for chained call wrapping options
#KT-21529 Fixed
2017-12-11 17:58:02 +01:00
Dmitry Jemerov
1a93d10697 Refactoring: use more specific block type in signatures 2017-12-11 17:58:02 +01:00
Dmitry Jemerov
3233d650c1 Refactoring: cleanup access to code style settings 2017-12-11 17:58:02 +01:00
Dmitry Jemerov
ff99b921b7 Refactoring: work with ASTNodes in functional style 2017-12-11 17:58:02 +01:00
Dmitry Jemerov
389729cc50 Option for normal indent in supertype lists
#KT-21527 Fixed
2017-12-11 17:58:02 +01:00
Dmitry Jemerov
67cd4ed17a Don't indent closing parenthesis in conditions
#KT-21485 Fixed
2017-12-11 17:58:02 +01:00
Dmitry Jemerov
26d47a034e Don't indent closing parenthesis of a destructuring declaration
#KT-20758 Fixed
2017-12-11 17:58:02 +01:00
Dmitry Jemerov
4068b3d9b9 Add continuation indent for wrapped type aliases
#KT-21078 Fixed

fixup type alias
2017-12-11 17:58:02 +01:00
Nikolay Krasko
1ada284a03 Better folding for mulitline strings (KT-21441)
#KT-21441 Fixed
2017-12-11 18:28:01 +03:00
Nikolay Krasko
ab7ba3ae46 Add exit point highlighting for accessors (KT-21318)
#KT-21318 Fixed
2017-12-11 18:28:00 +03:00
Alexey Andreev
93f8542fc4 JS: serialize location of JsCase/JsDefault
See KT-21699
2017-12-11 17:20:15 +03:00
Alexey Andreev
25e56874c1 JS: readable error when source maps change in IC tests 2017-12-11 17:20:15 +03:00
Alexey Tsvetkov
c13b2a6bbc Test incremental recompilation of enum usage in JS 2017-12-11 17:20:14 +03:00
Andrey Mischenko
e1dbb90fdd KT-21729 Error message says "androidProcessor" should be "annotationProcessor" 2017-12-11 09:29:06 +08:00
Toshiaki Kameyama
4563cf250d "Add type" quick fix incorrectly processes vararg modifier with primitive type array initializer #KT-21544 Fixed 2017-12-08 15:46:45 +01:00
Dmitry Jemerov
846e50dcaa Wording fix 2017-12-08 15:44:18 +01:00
Toshiaki Kameyama
270b41dc66 KT-13378 Provide ability to configure highlighting for !! in expressions and ? in types 2017-12-08 15:44:18 +01:00
Dmitry Jemerov
ab619c5655 Improve wording; mark inspection as cleanup tool 2017-12-08 15:41:22 +01:00
Toshiaki Kameyama
0e2bdf8995 Add inspection to sort modifiers #KT-21560 Fixed 2017-12-08 15:41:22 +01:00
Alexander Udalov
2be7116b0b Deduplicate classpath roots in compiler when -Xbuild-file is used
In kotlin-gradle-plugin, the compiler is invoked with a
K2JVMCompilerArguments instance where both the classpath is set, and the
buildFile is used (containing the same classpath entries in XML).
Previously, the compiler concatenated those two classpaths, which
resulted in duplicated entries, which could slow down compilation. Now,
if buildFile is used, the classpath passed explicitly is ignored
(exactly as, for example, destination ("-d"), which is also stored in
the XML build file).

No test added because there doesn't seem to be any change in
user-visible behavior
2017-12-08 12:07:22 +01:00
Alexander Udalov
d65b999c2c Minor, rename variable for clarity 2017-12-08 12:07:22 +01:00
Ilya Gorbunov
0b9830248d Restore original accessor signature as deprecated
The deprecated function is not operator because it covers cases where it was used in explicit form.

#KT-18789
2017-12-07 20:26:53 +03:00
Ilya Gorbunov
7efaa7cabc Allow delegating val properties to out-projected MutableMap
Change generic signature of MutableMap.getValue, use 'out @Exact V' and `V1: V` types instead of single `in V`.
Fix affected IR generation tests.

#KT-18789 Fixed
2017-12-07 20:26:53 +03:00
Mikhail Glukhikh
e503c1d411 Suspend call detector: fix delegated properties checking 2017-12-07 15:54:47 +03:00
Mikhail Glukhikh
24bd31457c Has suspend calls: fix suspend iterator case 2017-12-07 15:54:47 +03:00
Mikhail Glukhikh
4404439521 Introduce "redundant suspend" inspection #KT-19103 Fixed 2017-12-07 15:54:47 +03:00
Mikhael Bogdanov
edefb45585 Copy sam wrappers during inline
#KT-21671 Fixed
2017-12-07 12:57:43 +01:00
Mikhael Bogdanov
4eb30b6626 Code clean 2017-12-07 12:57:42 +01:00
Mikhail Zarechenskiy
d47130eff8 [NI] Don't check type for constants too early to avoid mismatch 2017-12-07 14:18:20 +03:00
Mikhail Zarechenskiy
6c27a49114 [NI] Use effective variance for equal approximated type
It's totally safe from the point of type system and reduces extra `out` projections that can add problems with subtyping
2017-12-07 14:18:17 +03:00
Dmitry Savvinov
874267b79d Report cyclic scopes properly
This commit introduces proper handling of recursion in scopes, which
could occur when some of companion object supertypes are members of
that companion owner:

```
class Container {
  open class Base
  companion object : Base()
}
```

To resolve `Base`, we have to build member scope for `Container`.
In the member scope of `Container`, we see all classifiers from
companion and his supertypes
So, we have to resolve companion objects supertype, which happens to be
`Base` again - therefore, we encounter recursion here.

Previously, we created `ThrowingLexicalScope` for such recursive calls,
but didn't checked for loop explicitly, which lead to a wide variety of
bugs (see https://jetbrains.quip.com/dc5aABhZoaQY and KT-10532).

To report such cyclic declarations properly, we first change
`ThrowingLexicalScope` to `ErrorLexicalScope` -- the main difference is
that latter doesn't throws ISE when someone tries to resolve type in it,
allowing us to report error instead of crashing with exception.

Then, we add additional fake edge in supertypes graph (from
host-class to companion object) which allows us to piggyback on existing
supertypes loops detection mechanism, and report such cycles for user.
2017-12-07 14:14:08 +03:00
Dmitry Savvinov
33f9576dd1 [NI] Turn off KnownTypeParameterSubstitutor for NI
The main consequence of it is that TYPE_MISMATCH range for control
structures became wider.

Also, for extra safety, don't change behaviour of OI.
2017-12-07 14:05:42 +03:00
Denis Zharkov
4ed6928e6b Avoid building stubs in KtFile::getClasses for compiled files
In Gradle, JavaPsiFacade finds Kotlin compiled files as KtFile instances
and tries to obtain classes from them.

And while it returns an empty array anyway, it starts building
unnecessary stub when calling `isScript`
2017-12-07 12:53:33 +03:00
Denis Zharkov
6007d244f3 Optimize LazyJavaAnnotations::isEmpty 2017-12-07 12:53:33 +03:00
Denis Zharkov
07df29dfbf Optimize LazyJavaScope::getPropertyType
Avoid running hasConstantNotNullInitializer for non-primitive fields
2017-12-07 12:53:33 +03:00
Denis Zharkov
5e334550eb Optimize entry point check in UnusedSymbolInspection
It helps to avoid return types calculation for light-class element
2017-12-07 12:53:33 +03:00
Denis Zharkov
dd3dbda719 Optimize computation of default excluded import in IDE
Prior to this change, it was rather slow since it would lead
to a ModuleDescriptor::packageFragmentProviderForWholeModuleWithDependencies
computation, that would force the computation of libraries'
dependencies, that actually was the major bottleneck here.

The idea is that we do not need to search through dependencies
of dependencies, but only need contents of one of the modules
direct content.

This commit is made under the assumption that if a module has may see
some runtime parts, than runtime jar should be among its direct
depenencies.
2017-12-07 12:53:33 +03:00
Denis Zharkov
4b96311600 Add faster get*Names overrides in LazyClassMemberScope 2017-12-07 12:53:33 +03:00
Denis Zharkov
ac56965a99 Do not force loading all kt-files inside LazyPackageDescriptor constructor
Effectively it leads to all stubs being built for any once used package

The idea is that they only were used for FILE_TO_PACKAGE_FRAGMENT
that is mostly read in backend and rarely in the IDE, so we can replace
its usages with searching through related package-fragments
2017-12-07 12:53:33 +03:00
Denis Zharkov
d655c4075c Introduce index for the set of top-level names by package
It should help with actual loading of all the stubs for all declarations
in the package on every access when it's implemented through
`getDeclarations()`
2017-12-07 12:53:33 +03:00
Denis Zharkov
ce41b5745a Avoid creating synthetic safe-call nodes when resolving == calls
Each of them leads to a separate synthetic file retained in the memory
2017-12-07 12:53:33 +03:00
Denis Zharkov
cc312bcaa2 Avoid creating a separate synthetic file for each default import 2017-12-07 12:53:33 +03:00
Denis Zharkov
2d82cb936e Fix potential memory leak in light-classes
The problem is that they might indirectly retain a reference to an
obsolete ResolverForProject (it becomes outdated after out of block
modification).

The best solution would be to avoid preserving jvm-related diagnostics
(that are only used once to report them when highlighting, and exactly
they retains an obsolete resolve session)

But it seems that this may lead to a deep light-classes refactoring and
the temporary fix is storing diagnostics themselves in a CachedValue
bound to out of block modification tracker. There're no guarantees that
this would help, since CachedValue anyway is based on soft-reference
that is not the first thing GC collects
2017-12-07 12:53:33 +03:00
Denis Zharkov
a67598e0c1 Minor. Apply intention for "?: false" -> "== true" in light classes 2017-12-07 12:53:33 +03:00
Denis Zharkov
f1cbf21f96 Simplify LazyLightClassDataHolder
- Use only stubs instead of full results in LazyLightClassData
- Store only stubs for inexactStub
2017-12-07 12:53:33 +03:00
Dmitry Savvinov
aaee401240 [NI] Minor renaming
Use words 'returnArgument' instead of 'resultArgument' when talking
about values, which can be possibly returned from lambda.

Correct 'addSubsystemForArgument' -> 'addSubsystemFromArgument'
2017-12-07 12:49:56 +03:00
Dmitry Savvinov
30a51af931 [NI] Minor: rename typo KotlinCallDiagnistics.kt -> KotlinCallDiagnostics.kt 2017-12-07 12:49:56 +03:00
Dmitry Savvinov
1ada52968b [NI] Fix KnownTypeParameterSubstitutor for !! 2017-12-07 12:49:56 +03:00
Dmitry Savvinov
15a595749b [NI] Weird testdata change after fixes in ErrorTypes
The issue here is that OI infers correct types for (k, v) destructing
declaration, while NI infers errors for them. That happens because NI
resolves iterator() on nullable 'm', but rightfully reports it as
unsuccessful, while OI somehow manages to resolve it to success (and
thus getting nice expected type, allowing destructing declaration to be
resolved in a proper types).
2017-12-07 12:49:56 +03:00
Dmitry Savvinov
ea72c76a37 [NI] Testdata changes after fixes in error types 2017-12-07 12:49:56 +03:00
Dmitry Savvinov
957bbe291d [NI] Don't approximate error types
Previously, we did approximation of error types to Any?/Nothing in some
contexts (e.g. non-local declarations).

There are several reasons why it is not desired:
- OI doesn't approximate ErrorType
- This behaviour is inconsistent with ourselves (i.e. sometimes we *do*
  infer errortype for top-level declaration)
- It causes different digressions from OI in reported diagnostics

This commit turns off error type approximation. It causes large testdata
shift, which is deliberately split into several parts and commited in a
separate commits.
2017-12-07 12:49:56 +03:00
Dmitry Savvinov
70a1beeff6 [NI] Use ErrorType in ParseErrorKotlinCallArgument
Previously, there was receiver of type Nothing, which could case result
of the call to be inferred to Nothing too. This could case bogus
UNREACHABLE_CODE diagnostics in cases like this:

```
fun <T> id(x: T) = x
fun test() {
    id(unresolvedReference) // type of statement is 'Nothing'
    // ... everything here is marked as unreachable ...
}
```

This commit changes type of receiver for such calls form Nothing to
ErrorType.
2017-12-07 12:49:56 +03:00
Dmitry Savvinov
eadd1355c2 [NI] Add ErrorType constraint
Previously, constraint wasn't added if bound was ErrorType. That could
cause TypeVariable to be inferred to Any?/Nothing instead of ErrorType,
which could influence other parts of analysis (in particular, inferring
Nothing instead of ErrorType can cause bogus UNREACHABLE_CODE diagnostics)

Because of that fix, intersection type can be added to CS as supertype,
which provokes AssertionError. This commit also relaxes this assertion,
as it seems that it's valid that supertype is an intersection type.
2017-12-07 12:49:56 +03:00
Dmitry Savvinov
8e50a58408 [NI] New failing test after changes in applicabilities 2017-12-07 12:49:56 +03:00
Dmitry Savvinov
816d89e393 [NI] Improved testdata after changes in applicabilities
This commits introduces testdata changes, where NI behaviour strictly
improved, after several previous fixes.

For some tests, just WITH_NEW_INFERENCE directive was added. It
indicates, that some of previous commits first introduced error in that
test, and then some other commit fixed it (netting no overall testdata
change). It is preferrably to keep those annotations until we will
migrate to NI completely, to prevent unexpected regressions.
2017-12-07 12:49:56 +03:00
Dmitry Savvinov
9f63818bd3 [NI] Introduce INAPPLICABLE_ARGUMENTS_MAPPING_ERROR for some NI diagnostics 2017-12-07 12:49:56 +03:00
Dmitry Savvinov
e2d65adc7e [NI] Fix KotlinResolutionCandidate.isSuccessfull
Check if ConstrainSystem has any contradiction in 'isSuccessful'.
Otherwise we may erroneously think that there are some successful
candidates in 'TowerResolver.SuccessfullResultCollector.pushCandidates()'
and clear other unsuccessful ones (while they actually may have higher
applicability).
2017-12-07 12:49:56 +03:00
Dmitry Savvinov
78a526c937 [NI] Support EffectSystem
- During final phase of resolution (i.e. converting NI-results to
OI-results), make call into EffectSystem to record all necessary
effects-related information.

- To be able to enhance resulting dataFlowInfo for call at that stage,
introduce internal method 'updateResultingDataFlowInfo' in
NewResolvedCallImpl.
2017-12-07 12:49:56 +03:00
Toshiaki Kameyama
b23d62c760 Transfer type to parent property in "Remove redundant getter" inspection
So #KT-21612 Fixed
2017-12-07 12:19:35 +03:00
Mikhail Glukhikh
834c3fe62b Do not inline property setter if it's not required (e.g. ReplaceWith)
So #KT-21237 Fixed
2017-12-07 12:14:29 +03:00
Mikhail Glukhikh
bddaab9d48 Inline properties without setter / with default setter correctly
Related to KT-21237
2017-12-07 12:14:29 +03:00
Nikolay Krasko
fba50a8d15 Disable language injection for SpEL language as it cause to many troubles
It's known that there're several inspections that report warnings when
SpEL language is injected not to Java files if IDEA is before 173.
2017-12-07 12:02:39 +03:00
Michal Bendowski
6f350c032d Recognize injections in annotations (KT-13636)
Recognize patterns from both Java (psiMethod) and Kotlin
(kotlinParameter) that match the annotation argument.
2017-12-07 12:02:37 +03:00
Nikolay Krasko
b7ba45c001 Reparse lambda expression after removing parameter comma (KT-21497)
Without the parameter it can become block.

 #KT-21497 Fixed
2017-12-07 12:02:07 +03:00
Nikolay Krasko
273bd55f01 Refactoring: extract methods 2017-12-07 11:49:19 +03:00
Dmitry Petrov
04ab3e1519 Use ForInSimpleProgressionLoopGenerator for most of the loop intrinsics 2017-12-07 11:36:20 +03:00
Dmitry Petrov
6b6ae2f7d7 Minor: formatting 2017-12-07 11:36:20 +03:00
Dmitry Petrov
75315a4edb Replace BoundedValue objects in 'indices' with SimpleBoundedValue 2017-12-07 11:36:20 +03:00
Nicolay Mitropolsky
209ba89a49 Uast: KotlinSecondaryConstructorWithInitializersUMethod introduced as workaround for KT-21617
to be the only constructor which includes `init` block when there is no primary constructors in the class
2017-12-06 22:19:57 +03:00
Nicolay Mitropolsky
b8069b48c5 Uast: returning back secondary constructors bodies (KT-21575)
but secondary constructors without primary constructor will not contain initializers, it is still an issue
2017-12-06 22:19:57 +03:00
Nikita Skvortsov
962c512882 optimize search for modules nodes 2017-12-06 18:55:09 +01:00
Nikita Skvortsov
cc580ca1dc optimize check of module-per-source-set 2017-12-06 18:55:09 +01:00
AJ Alt
8297fee615 Fix typo in File.copyTo KDoc 2017-12-06 18:11:11 +01:00
Yusuke Hosonuma
949f9b9342 gitignore: remove duplicates 2017-12-06 18:09:43 +01:00
Nikolay Krasko
110a9ff600 Fix project configuration: avoid adding test jar as library dependency
For some reason gradle processes "testJar" task differently and collects
artifacts for it during configuration phase. This helps Idea project
configurator understand that there's no need to attach test jar as separate
binary library dependency.

Having compiled module in dependencies results IDEA finds both compiled and
source version of classes. This may cause bad navigation and reindexing.
2017-12-06 19:14:28 +03:00
Mikhail Zarechenskiy
1d736f59b6 [NI] Refine nullability for CST of types with undefined nullability 2017-12-06 18:36:20 +03:00
Mikhail Zarechenskiy
b9d390449c [NI] Refactor constraints transformations, update comments 2017-12-06 18:36:19 +03:00
Mikhail Zarechenskiy
351c592c83 [NI] Drop hack that was used before DefinitelyNotNull types 2017-12-06 18:36:17 +03:00
Mikhail Zarechenskiy
b2299ed19f [NI] Fix testdata after introducing DefinitelyNotNull types 2017-12-06 18:36:16 +03:00
Mikhail Zarechenskiy
9565b56b2a [NI] Render DefinitelyNotNull types with !! postfix 2017-12-06 18:36:14 +03:00
Mikhail Zarechenskiy
7f0cca52ca [NI] Use definitely not-null types for smartcasts 2017-12-06 18:36:13 +03:00
Mikhail Zarechenskiy
64f0688b71 [NI] Introduce DefinitelyNotNullType as type for T!! or {T & Any} 2017-12-06 18:36:11 +03:00
Mikhail Zarechenskiy
8e0171d475 [NI] Don't loose platform types on simplifying lower constraints 2017-12-06 18:08:52 +03:00
Alexey Sedunov
e2743c8f34 Rename: Do not use KotlinDirectoryAsPackageRenameHandler via dispatch handler
#KT-21604 Fixed
2017-12-06 14:17:56 +03:00
Alexey Sedunov
e1ed74008f Rename: Fix exception on attempt to rename KtConstructorDelegationReference
#KT-21536 Fixed
2017-12-06 14:17:56 +03:00
Alexey Sedunov
ec85b708c9 Misc: Use delegate with predefined name for fake light methods
#KT-21414 Fixed
2017-12-06 14:17:56 +03:00
Alexey Sedunov
89352a295d Maven Import: Support compiler arguments specified directly in <args>
#KT-21592 Fixed
2017-12-06 14:17:56 +03:00
Alexey Sedunov
288560eb37 Misc: Fix project configuration test 2017-12-06 14:17:55 +03:00
Alexey Sedunov
4369c6d26c Minor: Update Maven import test data 2017-12-06 14:17:55 +03:00
Mikhael Bogdanov
5c2f5fee39 Make 'addCommonSourceSetToPlatformSourceSet' open to support native specifics 2017-12-06 10:57:08 +01:00
Mikhael Bogdanov
60b812e3dd Increase android emulator startup await 2017-12-06 10:57:08 +01:00
shiraji
5d44037a2b Support 'it op something' case in "redundant let" #KT-21373 Fixed 2017-12-05 19:23:44 +03:00
Ramon Wirsch
f961f33f9d Fix for KT-19188
Fixes nondeterministic Default Method Order under existance of generic
type parameters.
SubstitutingScope did not respect source code method order by not using
a LinkedHashSet
2017-12-05 18:33:22 +03:00
Mikhail Glukhikh
8257e14055 J2K: perform additional isActiveFor check before applying inspections 2017-12-05 18:21:22 +03:00
Mikhail Glukhikh
7eb62b9ca4 Add kapt as test runtime dependency to J2K 2017-12-05 18:18:48 +03:00
Mikhail Glukhikh
a90e3c2e45 Add "replace map.put with assignment" to J2K
Related to KT-21502
2017-12-05 18:18:25 +03:00
Dereck Bridie
8c305a137f Introduce inspection "replace map.put with assignment" #KT-21502 Fixed 2017-12-05 16:57:36 +03:00
Nikolay Krasko
ab28bdf32f Store in test data failure for quotedName name 2017-12-05 16:07:55 +03:00
Nikolay Krasko
57d62eb74a Document error behaviour of evaluate expression lost sometime 2017-12-05 16:07:54 +03:00
Nikolay Krasko
b21fb1a375 Replace assertTrue with assertEquals in AbstractKotlinEvaluateExpressionTest 2017-12-05 16:07:53 +03:00
Nikolay Krasko
04e6aa76cf Fix lint apiCheck lint 2017-12-05 16:07:53 +03:00
Dmitry Petrov
3d473f608e Add more tests for for-in-array
#KT-21354 Fixed Target versions 1.2.20
 #KT-21321 Fixed Target versions 1.2.20
2017-12-05 15:45:20 +03:00
Dmitry Petrov
e4ecc13e13 Generate for-in-array loops with proper semantics in 1.3+
In Kotlin 1.3+, assignment to the for-in-array loop range variable in
the loop body doesn't affect loop execution (as if it was a loop on an
array iterator, or some other container).

 #KT-21354 In Progress
 #KT-21321 In Progress
2017-12-05 15:45:20 +03:00
Dmitry Petrov
7a6f80606b Warn on for-in-array range variable assignment in loop body
According to KT-21354, this should be a warning in 1.2 and before, and
no warning (with changed semantics) in 1.3 and later.
NB there are some false positives in this check.

 #KT-21354 In Progress
 #KT-21321 In Progress
2017-12-05 15:45:20 +03:00
Mikhail Glukhikh
7118a4bf80 Fix KNPE in "introduce variable", add some name conflict introduce tests
So #KT-21530 Fixed
2017-12-05 15:29:45 +03:00
Mikhail Glukhikh
20b48ab90c Fix suggested names in Spring (do not take same parameter into account) 2017-12-05 15:29:45 +03:00
Mikhail Glukhikh
b09465ca0b Unnecessary variable: do not suggest in case of name duplication
So #KT-20300 Fixed
2017-12-05 15:29:45 +03:00
Mikhail Glukhikh
844dd1c43c Refactoring: Unnecessary variable inspection 2017-12-05 15:29:45 +03:00
Mikhail Glukhikh
52053695fe Fix variable name validator (take parameters into account) 2017-12-05 15:29:44 +03:00
Toshiaki Kameyama
e341ec969f "Join declaration and assignment" should remove 'lateinit' for 'var' #KT-21603 Fixed 2017-12-05 11:19:58 +09:00
Ilya Chernikov
075203ad33 Make embedding javaslang into compiler intransitive, as it was before gradle
fixes KT-21537

(cherry picked from commit cc5c1d5)
2017-12-04 14:47:53 +01:00
Mikhail Glukhikh
ac3542c041 Minor cleanup 2017-12-04 15:58:13 +03:00
Toshiaki Kameyama
74d83997c7 Fix false "function is never used" for functions with '@JvmName'
So #KT-20435 Fixed
2017-12-04 15:58:13 +03:00
Denis Zharkov
84282035b0 Set up projectTest.workingDir for incremental-compilation-impl 2017-12-04 15:21:03 +03:00
Mikhail Glukhikh
fb8dc7b590 Minor cleanup 2017-12-04 15:16:04 +03:00
Toshiaki Kameyama
0eec3ef1f8 Add / preserve semicolon after empty companion object #KT-21179 Fixed 2017-12-04 15:15:49 +03:00
Alexey Andreev
45e5cc190f Update DCE limits in JS tests 2017-12-04 11:25:39 +03:00
Dmitry Petrov
0db6e5c3f3 Fix SAM wrapper generation in secondary constructor calls
Should simply invoke 'checkSamCall' in corresponding visitor method to
check if call arguments should be wrapped.
2017-12-04 10:29:33 +03:00
Dmitry Petrov
3431a1445c Fix enum entry class delegating constructor call generation
When the enum entry requires a specific class, its constructor should
invoke proper supertype constructor (from the corresponding enum class).
Corresponding resolved call should be passed from the front-end in
CONSTRUCTOR_RESOLVED_DELEGATION_CALL slice.
In case of enum entries without explicit supertype initializer, this
information was missing.
2017-12-04 10:29:33 +03:00
Ilmir Usmanov
d8c4d19152 Make suspendCoroutineOrReturn ordinary function 2017-12-01 20:18:04 +03:00
Yan Zhulanow
0b37c9e83c Kapt: Report about of time spent in each annotation processor in verbose mode (KT-21542) 2017-12-01 22:53:22 +09:00
Yan Zhulanow
ef6be206d0 Kapt: Clear URL cache after changing annotation processor JAR 2017-12-01 22:53:22 +09:00
Yan Zhulanow
84a766de24 Kapt: Register AP classpath as an input for "generate stubs" and "kapt" tasks
...so if the annotation processor artifact is changed, annotation processing will be relaunched.
2017-12-01 22:53:22 +09:00
Yan Zhulanow
9e43992094 Minor: Update kapt converter test for imports 2017-12-01 22:53:21 +09:00
Yan Zhulanow
3dc7502b0b Kapt, minor: Remove kaptError with location, it doesn't do anything reasonable now anyway 2017-12-01 22:53:21 +09:00
Yan Zhulanow
a4a7db06d2 Kapt: force resolve import references in partial analysis mode (required for import conversion in correctErrorTypes) 2017-12-01 22:53:21 +09:00
Yan Zhulanow
1a3317ae2b Kapt: Attach generated classes directory as library source (KT-19823)
This may seem like a magic, but actually it's deadly simple.

GradleProjectResolver.mergeLibraryAndModuleDependencyData() tries to find a better substitution for the absolute BINARY paths, but actually makes things worse in our case.
GradleProjectResolver checks if the provided path is in the Gradle project output path list, and if the answer is yes, then it replaces our path to a Gradle Project (or a module in JPS terminology) dependency.
2017-12-01 22:53:21 +09:00
Yan Zhulanow
2e17c0b7f1 Kapt: Filter out non-package all-under imports whenever possible in "correctErrorTypes" (KT-21359) 2017-12-01 22:53:21 +09:00
Yan Zhulanow
00bb38fbb1 Kapt: Support import directive with aliases in "correctErrorTypes" mode (KT-21358) 2017-12-01 22:53:21 +09:00
Yan Zhulanow
c7645bcf03 Kapt: Replace error.NonExistentClass usages to Object (as it does not break class hierarchies) 2017-12-01 22:53:21 +09:00
Yan Zhulanow
e46fe9b255 Kapt: Do not add duplicating library entries in project importing 2017-12-01 22:53:20 +09:00
Yan Zhulanow
3d1ca61f9f Kapt: Remove artificial KaptError exception on errors from annotation processor (KT-21262) 2017-12-01 22:53:20 +09:00
Yan Zhulanow
0a0de8da29 Kapt: Fix correctErrorTypes for getters of properties defined in the primary constructor 2017-12-01 22:53:20 +09:00
Yan Zhulanow
182c2e2eeb Kapt: Launch integration tests also under Java 9 2017-12-01 22:53:20 +09:00
Yan Zhulanow
6ccf361942 Kapt: -Xmaxerrs javac option is not propagated properly (KT-21264) 2017-12-01 22:53:20 +09:00
Yan Zhulanow
2819fc718a Parcelable: Migrate to canonical NEW-DUP-INVOKESPECIAL form (KT-20545) 2017-12-01 22:53:20 +09:00
Yan Zhulanow
37543deefa Kapt: Keep KDoc comments in Java stubs (KT-21205) 2017-12-01 22:53:19 +09:00
Yan Zhulanow
af57ab8119 Kapt: Fix remaining issues with Java 9 compatibility in converter, add Java 9 tests 2017-12-01 22:53:19 +09:00
Yan Zhulanow
dde87ae1f9 Attempt to fix Gradle project importing error on older Gradle versions (KT-20967) 2017-12-01 22:53:19 +09:00
Yan Zhulanow
49db1bfe5d Introduce preliminary check for special annotations (allopen/noarg/samWithReceiver) (KT-21194) 2017-12-01 22:53:19 +09:00
Yan Zhulanow
ecfb045790 Android Extensions: Do not generate synthetic components in Kotlin Bytecode tool window when the Gradle plugin is disabled 2017-12-01 22:53:19 +09:00
Yan Zhulanow
8496ff8611 Minor: Add kotlin-android-extensions-runtime dependency to get rid of error messages in IDE 2017-12-01 22:53:19 +09:00
Yan Zhulanow
037caf3a17 Kapt: Prefer Kotlin diagnostic locations over ones from stubs 2017-12-01 22:53:19 +09:00
Yan Zhulanow
861d778530 Kapt: Fix 'correctErrorTypes' for primary constructor properties 2017-12-01 22:53:18 +09:00
Yan Zhulanow
7136bf7e0a Kapt: Add Kotlin location to diagnostics reported in Kapt stubs 2017-12-01 22:53:18 +09:00
Yan Zhulanow
8fba19f269 Kapt: Do not print empty diagnostic messages 2017-12-01 22:53:18 +09:00
Yan Zhulanow
5efdf111f5 Kapt: Support type aliases in correctErrorTypes mode (KT-19402) 2017-12-01 22:53:18 +09:00
Yan Zhulanow
84e5fa38bb Kapt: Exclude all primitive Java constants from inlining (String is still inlined) (KT-20878) 2017-12-01 22:53:18 +09:00
Yan Zhulanow
6ca5787799 Kapt: Allow to ignore specific methods/fields from being put into kapt stubs
Classes can't be ignored yet as it requires to ignore also all type usages which is a non-trivial operation.
2017-12-01 22:53:18 +09:00
Yan Zhulanow
fd84ecda54 Kapt: Add runtime library, move all modules inside the 'kapt3' directory 2017-12-01 22:53:17 +09:00
Yan Zhulanow
b74ef72af7 Kapt: Forbid illegal Java identifiers in Enum value literals 2017-12-01 22:53:17 +09:00
Yan Zhulanow
f52749741b Minor: Remove unused fileManager property 2017-12-01 22:53:17 +09:00
Yan Zhulanow
bdf77ccb65 Kapt: Refactoring, replace getValidIdentifierName() with more appropriate isValidIdentifier() 2017-12-01 22:53:17 +09:00
Yan Zhulanow
f368414328 SamWithReceiver: Pick the right compiler plugin (KT-20813) 2017-12-01 22:53:17 +09:00
Yan Zhulanow
3d7222485d Android Extensions: Add missing documentation, move the hasCache property to the compiler module 2017-12-01 22:53:16 +09:00
Yan Zhulanow
e4f476c09f Kapt, Maven: Fix running with the non-clean build (KT-20816)
Clean target directories for kapt stubs and generated source files.
Filter out the compile destination directory from the classpath.
2017-12-01 22:53:16 +09:00
Yan Zhulanow
381379fb62 Kapt, Maven: Clean directories for generated sources and stubs before AP 2017-12-01 22:53:16 +09:00
Yan Zhulanow
b074c7e22f Minor: Return back the whole test contents 2017-12-01 22:53:16 +09:00
Yan Zhulanow
1f65f8bc97 Encode all compiler plugin arguments for Android Extensions in kapt
Commas in option values breaks the option parsing in daemon (KT-20235).
2017-12-01 22:53:16 +09:00
Yan Zhulanow
425d104255 Parcelable: Convert I to Z explicitly, older Android Dex has strict checks for it (KT-20928) 2017-12-01 22:53:16 +09:00
Yan Zhulanow
e28cffd0ad Parcelable: newArray() result type should be Object[] (KT-20717) 2017-12-01 22:53:15 +09:00
Yan Zhulanow
26005751d8 Parcelable: Fix compatibility with serialization plugin (KT-20742) 2017-12-01 22:53:15 +09:00
Yan Zhulanow
3d155dd757 Kapt: Support Java 9 in Gradle plugin infrastructure 2017-12-01 22:53:15 +09:00
Yan Zhulanow
c6eab6f72e Kapt: Support Java 9 in compiler plugin 2017-12-01 22:53:15 +09:00
Yan Zhulanow
e97b3ed324 Kapt: Get rid of DatatypeConverter in order to support JDK9 (KT-20749) 2017-12-01 22:53:15 +09:00
Yan Zhulanow
fa54a0c642 AllOpen: Add Validated to the list of annotations supported by kotlin-spring plugin (KT-20751) 2017-12-01 22:53:15 +09:00
Yan Zhulanow
eccc3447f6 Infrastructure: move compiler plugin tests back to their modules 2017-12-01 22:53:14 +09:00
Alexander Udalov
7248f2568a Drop USE_NEW_INFERENCE, configure language version settings in KotlinTestUtils
This will only have effect for tests which do not use their own instance
of LanguageVersionSettings though
2017-12-01 13:35:25 +01:00
Alexey Andreev
9c0e049bbe JS: fix boxed char with latest changes in compiler 2017-12-01 15:20:34 +03:00
Nikolay Krasko
2c79481f37 Add IdeaOpenApiClassFinder and BundledGroovyClassFinder to known finder
Fix testKnownNonClasspathFinder for 173 branch
2017-12-01 00:44:05 +03:00
Nikolay Krasko
e2418ec892 Remove custom runtime configure from AbstractParameterInfoTest 2017-12-01 00:44:05 +03:00
Nikolay Krasko
f460104ace Unconfigure library in AbstractLineMarkersTest 2017-12-01 00:44:04 +03:00
Nikolay Krasko
22b0dd91e4 Fix GradleConfiguratorTest: jre8 is expected for 1.1.2 version 2017-12-01 00:44:04 +03:00
Nikolay Krasko
3dc494ed00 Some qualified names might be null for classes 2017-12-01 00:44:04 +03:00
Nikolay Krasko
32da2ccb81 Don't intercept unexpected exceptions in AbstractQuickFixTest.kt 2017-12-01 00:44:04 +03:00
Nicolay Mitropolsky
f67db64dba *kapt3-idea* added to *ultimate* as testRuntime dependency
because of falling tests. It seems that there is not such issue in 1.2.0 branch
2017-11-30 21:27:56 +03:00
Nicolay Mitropolsky
4db5ca66e3 Uast: constructors calls consistency for KtObjectLiteralExpression (KT-21409) 2017-11-30 20:08:16 +03:00
Nicolay Mitropolsky
1dbce18afc Uast: constructors calls consistency except anonymous object literals (KT-21409) 2017-11-30 20:08:16 +03:00
Nicolay Mitropolsky
77be33d433 Uast: KotlinPrimaryConstructorUMethod renamed to KotlinConstructorUMethod (KT-21409) 2017-11-30 20:08:16 +03:00
Nicolay Mitropolsky
1ce21583ad Uast: secondary constructors delegation support (KT-21409) 2017-11-30 20:08:16 +03:00
Nicolay Mitropolsky
3bfa5c4706 Uast: parsing primary constructors superCalls (KT-21409) 2017-11-30 20:08:16 +03:00
Mikhail Glukhikh
a39f2f8271 Downgrade "use expression body" inspection to INFORMATION default level
(cherry picked from commit b6bc8eb)
2017-11-30 17:19:19 +03:00
Mikhail Glukhikh
0d65df4d3e Recursive equals: case with recursive not equals + extra tests 2017-11-30 16:47:27 +03:00
Mikhail Glukhikh
13e0ba0836 Recursive equals: fix false positive with different argument
Related to KT-13702
2017-11-30 16:44:51 +03:00
Mikhail Glukhikh
917be5d271 Support "recursive equals" for direct equals call (related to KT-13702) 2017-11-30 16:44:50 +03:00
Mikhail Glukhikh
e301506460 Simplify and fix "recursive equals" inspection (related to KT-13702) 2017-11-30 16:44:45 +03:00
Toshiaki Kameyama
b8fcdea673 Add inspection for equals which is called recursively within itself
So #KT-13702 Fixed
2017-11-30 16:44:20 +03:00
Mikhail Glukhikh
bd348911af Add "unused equals" for direct calls without receiver
Related to KT-21192
2017-11-30 16:44:16 +03:00
Mikhail Glukhikh
64159a900a Add "unused equals" warning on direct equals call #KT-21192 Fixed 2017-11-30 16:43:54 +03:00
Mikhail Glukhikh
07ec4ecd7f Add tests for KT-19511 and KT-21192 (with void -> boolean) 2017-11-30 16:43:53 +03:00
Sergey Igushkin
bf2e3decaa Add :kotlin-annotation-processing-gradle:install dependency to Gradle IT 2017-11-30 15:42:42 +03:00
Sergey Igushkin
98e8e73810 Fix kotlin-reflect dependency IDE import after API separation.
(cherry picked from commit 19967a2)
2017-11-30 15:42:42 +03:00
Alexey Andreev
af6adc61ae Update bootstrap to 1.2.20-dev-524 2017-11-30 15:27:41 +03:00
Alexey Andreev
acb058f328 JS: fix bootstrap build error related to updates in source maps 2017-11-30 14:26:05 +03:00
Nikolay Krasko
f46a8e0b16 Restore iml files for jps tests 2017-11-30 13:24:08 +03:00
Nikolay Krasko
cfa70dbe26 Don't ignore iml files in testData 2017-11-30 13:24:07 +03:00
Nikolay Krasko
170b352185 Deprecate 'configureAs' method and stop using it in js decompiled tests
This commit fixes tests in 173 branch, avoid exception:

com.intellij.openapi.util.TraceableDisposable$DisposalException:
Virtual pointer 'jar:///mnt/agent/work/bd0f559856a14a82/dist/kotlinc/lib/kotlin-stdlib-js.jar!/'
hasn't been disposed: --------------Creation trace:
java.lang.Throwable
    at com.intellij.openapi.util.TraceableDisposable.<init>(TraceableDisposable.java:45)
    at com.intellij.openapi.vfs.impl.VirtualFilePointerImpl.<init>(VirtualFilePointerImpl.java:41)
    at com.intellij.openapi.vfs.impl.VirtualFilePointerManagerImpl.getOrCreate(VirtualFilePointerManagerImpl.java:266)
    at com.intellij.openapi.vfs.impl.VirtualFilePointerManagerImpl.create(VirtualFilePointerManagerImpl.java:205)
    at com.intellij.openapi.vfs.impl.VirtualFilePointerManagerImpl.create(VirtualFilePointerManagerImpl.java:136)
    at com.intellij.openapi.vfs.impl.VirtualFilePointerContainerImpl.create(VirtualFilePointerContainerImpl.java:359)
    at com.intellij.openapi.vfs.impl.VirtualFilePointerContainerImpl.add(VirtualFilePointerContainerImpl.java:169)
    at com.intellij.openapi.roots.impl.libraries.LibraryImpl.addRoot(LibraryImpl.java:505)
    at com.intellij.openapi.roots.ui.configuration.libraryEditor.NewLibraryEditor.exportRoots(NewLibraryEditor.java:247)
    at com.intellij.openapi.roots.ui.configuration.libraryEditor.NewLibraryEditor.applyTo(NewLibraryEditor.java:218)
    at org.jetbrains.kotlin.idea.test.ConfigLibraryUtil.addLibrary(ConfigLibraryUtil.kt:113)
    at org.jetbrains.kotlin.idea.test.KotlinStdJSProjectDescriptor.configureModule(KotlinStdJSProjectDescriptor.kt:38)
    at org.jetbrains.kotlin.idea.test.KotlinLightProjectDescriptor.configureModule(KotlinLightProjectDescriptor.java:46)
    at org.jetbrains.kotlin.idea.test.TestUtilsKt$configureAs$1.consume(testUtils.kt:59)
    at org.jetbrains.kotlin.idea.test.TestUtilsKt$configureAs$1.consume(testUtils.kt)
    at com.intellij.openapi.roots.ModuleRootModificationUtil.updateModel(ModuleRootModificationUtil.java:143)
    at org.jetbrains.kotlin.idea.test.TestUtilsKt.configureAs(testUtils.kt:50)
    at org.jetbrains.kotlin.idea.test.TestUtilsKt.configureAs(testUtils.kt:69)
    at org.jetbrains.kotlin.idea.decompiler.textBuilder.AbstractDecompiledTextFromJsMetadataTest.setUp(AbstractDecompiledTextFromJsMetadataTest.kt:38)
    ...
2017-11-30 13:24:07 +03:00
Nikolay Krasko
a45fa9a33f Configure JdkAndMockLibrary with JS stdlib if jsLib flag is set 2017-11-30 13:24:06 +03:00
Nikolay Krasko
1bc8ad7852 Don't mess up with configuring project descriptors in PullPush tests
This commit fixes tests in 173 branch.
2017-11-30 13:24:05 +03:00
Alexey Sedunov
6a9317fc57 Misc: Drop utilities for checking nullability/mutability annotations
Types annotated by them are already loaded as inflexible
2017-11-30 12:49:25 +03:00
Alexey Sedunov
84c6f9bf45 Create from Usage: Fix choosing superclass for abstract member
This applies to cases when non-existing member is called without
explicit receiver

 #KT-21332 Fixed
2017-11-30 12:49:25 +03:00
Alexey Sedunov
7e3ca4734d Create from Usage: Add val to data class parameter
Also place new parameters on the new line if previous ones have line breaks

 #KT-21162 Fixed
2017-11-30 12:49:25 +03:00
Alexey Sedunov
c54b934383 Configuration: Fix deserialization of immutable freeArgs collection
#KT-21363 Fixed
2017-11-30 12:49:24 +03:00
Alexey Sedunov
998c312ad2 Unifier: Fix matching of callable references with expression receivers
#KT-21334 Fixed
2017-11-30 12:49:24 +03:00
Alexey Sedunov
354a6cbfd9 Change Signature: Keep parameter 'val'/'var' when invoked from Java
#KT-20901 Fixed
 #KT-21159 Fixed
2017-11-30 12:49:24 +03:00
Alexey Sedunov
820ade41ed Create from Usage: Do not add bodies to expect class members
#KT-21122 Fixed
2017-11-30 12:49:24 +03:00
Alexey Andreev
063b4b6c18 Remove unused 'json-org' dependency (fix build) 2017-11-30 11:43:44 +03:00
Alexey Andreev
1d48442a5d Change default output dir in JS DCE Gradle plugin
See KT-21328

Compiler removes all files from its output directory.
Due to this reason (and some other reasons) it't not a good idea
to put DCE output to `classes` dir.
Therefore we changed output dir to `$buildDir/kotlin-js-min`.
Additionally, we now allow to customize output dir.
In particular, this fixes issues with webpack in multi-project build +
continuous Gradle build.
2017-11-29 20:08:30 +03:00
Alexey Andreev
5672e1f56e JS: add DCE devmode. Fix mapping paths in source maps
See KT-20210, KT-21307
2017-11-29 20:08:30 +03:00
Alexey Andreev
ffdebfab45 JS: change the way how DCE resolves input paths 2017-11-29 20:08:29 +03:00
Alexey Andreev
8514a7706f Remove json.org library, use own JSON parser to parse source maps 2017-11-29 20:08:29 +03:00
Alexey Andreev
729715ec62 Add simple JSON parser 2017-11-29 19:43:28 +03:00
Ilya Gorbunov
c6b957f457 Force LF line delimiters for bash scripts and CRLF for .bat scripts in compiler/cli 2017-11-29 19:03:28 +03:00
Alexander Udalov
4f70983735 Update Proguard to 5.3.3 2017-11-29 11:58:38 +01:00
Alexander Udalov
d4b5032810 Add JDK roots to the beginning of the roots list
This behavior was used until 6a1b6d10d8, where the JDK has
unintentionally started to be added to the end of the list, breaking
code which depended on libraries which bundle something from the JDK

 #KT-21299 Fixed
2017-11-29 11:49:48 +01:00
Dmitry Petrov
d976eeabf7 Refactor GenerationState creation 2017-11-29 12:17:06 +03:00
Alexey Sedunov
d6d6cef10d Gradle: Use copyable user data to retain intermediate model
#KT-21418 Fixed
2017-11-29 12:00:25 +03:00
Alexey Sedunov
c8d9f9ac50 Refactoring: Rename copyable property delegates for PsiElement 2017-11-29 12:00:25 +03:00
Alexey Sedunov
b956363d6f Minor: Drop unused class 2017-11-29 12:00:25 +03:00
Alexey Andreev
19438a3a07 JS: fix losing lambda in inline function after incremental compilation
See KT-21493

It's hard to maintain staticRef in cached AST. In fact, we don't need
it in this optimization. We'll get excessive names in used set,
which is ok: non-function names don't matter, they'll be simply ignored.
One possible concern: there's more chance to get name same to
some function's name and it won't be removed. First, it's not fatal,
it won't break the code (but put some excessive code that will likely
be removed by DCE). Second, there's same chance of two functions
having same names, and we manage to avoid this (otherwise we'll get
many problems).
2017-11-29 11:53:35 +03:00
Alexey Andreev
29b494cdac JS: don't optimize when over external enum
See KT-21468
2017-11-29 11:52:36 +03:00
Dmitry Petrov
5b8c0d4c3e Optimize for-in-string loops
For-in-string loop can be generated using specialized 'length' and
'charAt' method calls, and with cached string length.
Note that update of the string variable in loop body doesn't affect
loop execution semantics.

 #KT-21322 Fixed Target versions 1.2.20
2017-11-29 10:15:38 +03:00
Dmitry Petrov
e2fa613b70 Cache array length in for-in-array loop if possible
If the range expression is not a local variable (which can be updated in
the loop body affecting loop behavior, see KT-21354), we can cache the
array length, thus turning a for-in-array loop into a simple optimizable
counter loop.

 #KT-21321 In Progress
2017-11-29 10:15:32 +03:00
Mikhail Zarechenskiy
328c67b9e8 Add separate diagnostic renderer results for tests with NI 2017-11-29 02:54:30 +03:00
Mikhail Zarechenskiy
8757298994 Add diagnostics to test data from NI 2017-11-29 02:54:26 +03:00
Mikhail Zarechenskiy
a71238bf94 Place !WITH_NEW_INFERENCE directive to diagnostics test data 2017-11-29 02:53:49 +03:00
Mikhail Zarechenskiy
81b3fefa58 Improve test framework for diagnostic tests with NI
Mark with `NI;` or `OI;` only diagnostics that are specific for concrete inference
2017-11-29 02:49:31 +03:00
Ilya Gorbunov
bd4d847943 Fix unresolved references in the api docs
These were mostly incorrect parameter names and external api links.
2017-11-28 18:41:17 +03:00
Ilya Gorbunov
3f26fd3f7f Provide summary for kotlin.math package 2017-11-28 18:41:15 +03:00
Ilya Gorbunov
5e85f71e48 Improve cover documentation page of kotlin.test library 2017-11-28 18:41:12 +03:00
Ilya Gorbunov
cf076f3d25 Unify docs wording of 'trim*' functions 2017-11-28 17:59:05 +03:00
Ilya Gorbunov
4f76cdfc34 Use new annotations in mutability tests instead of old ones 2017-11-28 17:45:10 +03:00
Ilya Gorbunov
9995a31c46 Add ReadOnly and Mutable into kotlin.annotations.jvm
Originally provided in org.jetbrains.annotations package as a part of stdlib.
2017-11-28 17:45:10 +03:00
Alexander Udalov
f80c9a4692 Drop TypeMappingConfiguration.innerClassNameFactory, use default implementation
After 57d209f599, non-default behavior is no longer used.

 #KT-21453 Fixed
2017-11-28 14:15:03 +01:00
Alexander Udalov
79e399942d Use "sourcesJar" task builder for kotlin-reflect sources 2017-11-28 12:46:10 +01:00
Alexander Udalov
9f3577dc70 Minor, use firstFromJavaHomeThatExists for JDK for Proguard
Similarly to "proguard" task in prepare/compiler/build.gradle.kts
2017-11-28 12:45:57 +01:00
Alexander Udalov
3d3ece72d2 Do not add task dependency from "sourcesJar" on "classes"
There doesn't seem to be any problem with collecting sources of the
project separately from compiling the project
2017-11-28 12:45:56 +01:00
Alexander Udalov
200c62b574 Use JvmPackageTable from bootstrap compiler in KotlinModuleShadowTransformer
Instead of generating another copy of it into buildSrc. Also move
KotlinModuleShadowTransformer to kotlin-reflect's build script, to its
only usage
2017-11-28 12:45:56 +01:00
Alexander Udalov
a1f895bb1f Rewrite kotlin-reflect build script from Groovy to Kotlin 2017-11-28 12:45:53 +01:00
Alexander Udalov
885ddc49a2 Move libraries/reflect/{build.gradle -> build.gradle.kts}
To preserve Git history after conversion to Kotlin in the next commit
2017-11-28 12:35:50 +01:00
Alexander Udalov
aca74cef0e Replace dependencies on kotlin-reflect with kotlin-reflect-api
See the previous commit for information on the kotlin-reflect vs
kotlin-reflect-api distinction.

Add kotlin-reflect as an explicit runtime dependency of most of the test
configurations because even though they all depend on tests-common, the
runtime dependency on kotlin-reflect is not exported from tests-common
to other modules because the projectTests dependency is not transitive.
2017-11-28 12:35:49 +01:00
Alexander Udalov
329fbd8fa8 Extract kotlin-reflect-api module out of kotlin-reflect
This is needed only for faster compilation of the Kotlin project itself
and has no effect on the public artifact
org.jetbrains.kotlin:kotlin-reflect.

The problem this is solving is the rebuild of the project once anything
has been changed in modules in 'core' (even inside function bodies, i.e.
a non-API change). Previously, changes in 'core' led to the compilation
of kotlin-reflect, which led to the rebuild of all modules depending on
kotlin-reflect directly or indirectly (which is almost all modules in
the project) because kotlin-reflect's artifacts are custom-built and the
changes can not be picked up incrementally. But 99.9% of the time the
initial changes in 'core' could not have any effect on the usages of
kotlin-reflect, because classes from those modules are moved to an
internal package in kotlin-reflect and thus are an internal
implementation detail.

Now, changes in 'core' still lead to the compilation of kotlin-reflect
and to the process of building the custom jar. But if a module depends
on kotlin-reflect-api, not kotlin-reflect, then the incremental
difference checker will detect that the module does not have to be
recompiled if there hasn't been any changes to the API of
kotlin-reflect-api. Which means that the module will not be rebuilt on
every change in 'core'.

This commit only introduces the new module. The dependencies
(kotlin-reflect -> kotlin-reflect-api) are replaced in the next commit.
2017-11-28 12:35:48 +01:00
Alexander Udalov
3e8b39af90 Move kotlin-reflect Gradle project to libraries/reflect/ 2017-11-28 12:33:21 +01:00
Toshiaki Kameyama
7448042b68 Fix callable code factory (parameter with default value case)
Before we can have end of '<Type>' and '=' joined as '>=' breaking PSI
So #KT-15941 Fixed
2017-11-28 14:11:04 +03:00
Mikhael Bogdanov
21bd10da2e Move generator utils 2017-11-28 11:04:40 +01:00
Mikhael Bogdanov
f529069077 Move common test parts to tests-common. Minify test jar dependencies 2017-11-28 11:04:39 +01:00
Alexey Sedunov
acbf53c42e Move: Make applicable to type aliases
#KT-21071 Fixed
2017-11-27 21:19:23 +03:00
Alexey Sedunov
bcdb46653c Line Markers: Detect recursive calls of companion invoke() member
#KT-21076 Fixed
2017-11-27 21:19:23 +03:00
Alexey Sedunov
169a22226f Rename: Support inplace rename of class via primary constructor
#KT-20146 Fixed
 #KT-21371 Fixed
2017-11-27 21:19:22 +03:00
Alexey Sedunov
2792e0c412 Rename: Introduce dispatching handler
The goal is to filter out KotlinMemberInplaceHandler similar to how
RenameHandlerRegistry does with MemberInplaceHandler
2017-11-27 21:19:22 +03:00
Alexey Sedunov
56746380f7 Data Inflow: Support delegated assignments
#KT-19089 Fixed
2017-11-27 21:19:22 +03:00
Alexey Sedunov
9d482bbbb1 Data Inflow: Show composite assignments
#KT-19112 Fixed
2017-11-27 21:19:22 +03:00
Alexey Sedunov
a333eb917b Data Inflow: Show qualified assignments
#KT-19087 Fixed
2017-11-27 21:19:21 +03:00
Vyacheslav Gerasimov
c06f72b73f Remove invalid toast test case, worked previously due to uast bug 2017-11-27 20:20:40 +03:00
Vyacheslav Gerasimov
26dcd1c706 Add kapt3-idea to test runtime of idea-android 2017-11-27 20:20:40 +03:00
Alexander Udalov
386a3fb5ce Fix tests after f4f5359725 2017-11-27 16:03:38 +01:00
Dmitry Petrov
f586bd4a34 Generate proper visibility for companion object instance field in LV1.3+ 2017-11-27 17:15:16 +03:00
Dmitry Petrov
70d3e6592d Unwrap object member imported by name before determining receivers
Existing code for receiver generation accidentally worked in most cases
for object members imported by name. However, it generated strange
bytecode (such as
    GETFIELD AnObject.INSTANCE
    GETFIELD AnObject.INSTANCE
    POP
), and worked incorrectly for augmented assignments.

 #KT-21343 Fixed Target versions 1.2.20
2017-11-27 17:15:16 +03:00
Alexey Andreev
7bee2ceac7 JS: add boxing/unboxing to default accessors of non-simple properties
See KT-21421
2017-11-27 17:01:19 +03:00
Alexey Andreev
be4e2f96c2 JS: throw error from coroutine marker functions 2017-11-27 17:01:18 +03:00
Alexey Andreev
71b1591044 JS: replace suspend inline metadata after inlining
This fixes some issues on coroutine inlining, see tests
2017-11-27 17:01:18 +03:00
Alexey Andreev
f8e7861ce6 JS: add partial tail-call optimization for suspend functions 2017-11-27 17:01:17 +03:00
Alexey Andreev
7c621488ad Remove unnecessary CONTAINS_NON_TAIL_SUSPEND_CALLS slice 2017-11-27 17:01:17 +03:00
Alexey Andreev
26843509c7 JS: disable suspend function tail-call optimization based on FE data
Partially fixes KT-21026
2017-11-27 17:01:16 +03:00
Alexey Andreev
6ab87ad66a Fix failing JS tests 2017-11-27 17:01:15 +03:00
Toshiaki Kameyama
2dd66225f3 Take into account vararg modifier in "Add type" quick fix
So #KT-20894 Fixed
2017-11-27 16:44:42 +03:00
Toshiaki Kameyama
4d93c08bd0 Do not propose to make local lateinit var immutable #KT-21104 Fixed 2017-11-27 16:44:04 +03:00
Alexander Udalov
938fd1a57e Use ResolvedCall for callable reference in KCallableNameProperty intrinsic
Instead of manually inspecting the DOUBLE_COLON_LHS slice, which is a
bit more error-prone. Note that new tests were passing before this
change
2017-11-27 12:46:56 +01:00
Alexander Udalov
f4f5359725 Fix exception on inlining callable reference with implicit this in LHS
Use ResolvedCall to determine the receiver type in the JVM codegen,
instead of manually inspecting the PSI

 #KT-20821 Fixed
2017-11-27 12:46:55 +01:00
Alexey Sedunov
1ceb751061 Data Outflow: Allow for-loop variables
#KT-19018 Fixed
2017-11-27 14:36:09 +03:00
Alexey Sedunov
fc307da383 Data Outflow: Show all reference expressions as separate steps
#KT-19012 Fixed
 #KT-19017 Fixed
 #KT-19036 Fixed
 #KT-19039 Fixed
 #KT-19104 Fixed
 #KT-19106 Fixed
2017-11-27 14:36:09 +03:00
Alexey Sedunov
0fc1c793fe Kotlin Facet: Support compileKotlinCommon tasks in Gradle importer
#KT-21187 Fixed
2017-11-27 14:36:09 +03:00
Alexey Sedunov
3f66d11624 Kotlin Facet: Fix language/API version initialization
#KT-21180 Fixed
2017-11-27 14:36:09 +03:00
Dmitry Jemerov
200d7f0718 Send API version instead of build number for plugin update checks
#KT-21263 Fixed
2017-11-24 19:39:22 +01:00
Alexey Tsvetkov
a1939c093c Use isolated classloader for in-process compilation
#KT-20233 fixed
2017-11-24 16:17:13 +03:00
Alexey Tsvetkov
0077ab59d6 Remove custom cache version checks from Gradle
#KT-21009 fixed

Cache version could be changed only when compiler is changed.

@InputFiles on `AbstractKotlinCompileTool#computedCompilerClasspath`
ensures that non incremental build is performed when compiler is changed.
2017-11-24 16:17:13 +03:00
Nikolay Krasko
602ac3e816 Refactoring: GradleDependencyInspection -> DeprecatedGradleDependencyInspection 2017-11-24 14:29:03 +03:00
Nikolay Krasko
bfb069b0c5 Warning and quick fix for using jre-artifacts in Maven (KT-20947)
#KT-20947 In Progress
2017-11-24 14:29:03 +03:00
Nikolay Krasko
99f7d605a7 Refactoring: move deprecation information to common place 2017-11-24 14:29:02 +03:00
Nikolay Krasko
0f1e169bd7 Introduce a quick fix for deprecated jre artifact in gradle (KT-20947)
#KT-20947 In Progress
2017-11-24 14:29:02 +03:00
Nikolay Krasko
23afa07e55 Inspection for using deprecated jre artifacts in Gradle (KT-20947)
#KT-20947 In Progress
2017-11-24 14:29:02 +03:00
Nikolay Krasko
4281b5e1b0 Refactoring: extract utility methods to separate class 2017-11-24 14:29:02 +03:00
Nikolay Krasko
64bb40869e Compare testData files with KotlinTestUtils.assertEqualsToFile 2017-11-24 14:29:02 +03:00
Nikolay Krasko
30d8875bdf Check file is valid before search in ScriptDependenciesCache
Otherwise search will fail.
2017-11-24 14:29:02 +03:00
Dmitry Jemerov
7625130b49 SOE protection when enumerating dependencies of common modules
#KT-20937 Fixed
2017-11-23 18:04:28 +01:00
Alexey Tsvetkov
2b708f67ee Add tests for explicit language/api version change in Gradle
Modifying language/api version should cause non-incremental build.
Implicit change (e.g. when versions are not specified, but the compiler
is updated 1.1->1.2) is handled by `AbstractKotlinCompileTool#computedCompilerClasspath`.
Explicit change is handled by `AbstractKotlinCompile#serializedCompilerArguments`.
2017-11-23 14:46:23 +03:00
Alexey Tsvetkov
913a997f24 Rebuild when language/api version is changed (JPS)
#KT-20757 fixed
2017-11-23 14:46:23 +03:00
Alexey Tsvetkov
b1f0f87829 Fix default value for api version string in IC meta info file 2017-11-23 14:46:22 +03:00
Dmitry Savvinov
b8447d6d97 Add test on smartcasts with reified types
This test introduces very special (for current implementation) case,
when we have smartcast indirectly, via some reified type parameter.

It covers recursive call inSmartCastManager.checkAndRecordPossibleCast(),
which wasn't previously covered by any test in testbase.
2017-11-23 12:45:10 +03:00
Dmitry Savvinov
440b6d9934 Add -Xeffect-system CLI argument which enables Effect System 2017-11-23 12:35:51 +03:00
Leonid Startsev
44d232a83c Extension point for synthetic function names contributions 2017-11-23 12:21:47 +03:00
Leonid Startsev
d6e5551237 More entry points for compiler plugins
* In Kotlin/JS JPS compilation
* In kotlin-common CLI compiler
* In kotlin-common gradle build
2017-11-23 12:12:01 +03:00
Nicolay Mitropolsky
07601b2ec4 KtLightAnnotationForSourceEntry: varargs handling improved (KT-21335, EA-107118) 2017-11-23 10:37:24 +03:00
Nicolay Mitropolsky
23344783a5 KtLightAnnotationForSourceEntry: made more verbose with errors in arrays in params (KT-21335, EA-107118) 2017-11-23 10:37:24 +03:00
Alexander Udalov
e43bf90b9c Use CompilerDeserializationConfiguration in JS IC package fragment
This is more correct because it'll allow the incremental package
fragment to be deserialized with the same analysis flags as the changed
sources. Currently it doesn't seem possible to add a reasonable test for
this fix because there are no flags relevant for JS except for
skipMetadataVersionCheck, which is experimental and thus doesn't require
a test
2017-11-22 18:33:04 +01:00
Dmitry Jemerov
fd763bde17 Reorder imports to avoid merge conflict
(cherry picked from commit 4286cce)
2017-11-22 18:30:34 +01:00
Dmitry Jemerov
6586228c15 Logging to catch KT-20937 2017-11-22 16:42:01 +01:00
Mikhail Glukhikh
078c27efa3 Add fallback flag for legacy var smart casts after try #KT-21377 Fixed 2017-11-22 18:31:04 +03:00
Mikhail Glukhikh
8b6e63dc18 Add forgotten new inference to JS 2017-11-22 18:31:03 +03:00
Dmitry Jemerov
dfe5eb65f9 Don't pack any kotlin stdlib classes into kotlin-plugin.jar
#KT-21395 Fixed

(cherry picked from commit 3fbc5ab)
2017-11-22 14:44:01 +01:00
Dmitry Jemerov
e00cc5ab3d Don't crash with old versions of Android Gradle plugin
#KT-21383 Fixed
2017-11-22 14:14:26 +01:00
Simon Ogorodnik
236ba1d2f2 Refactor PerModulePackageCacheService to fix various problems
Original issue here - structure of VfsEvents,
when directory gets deleted, we receive only VFileDeleteEvent
for directory, but not it's content, so we should invalidate
all modules in which sources this directory located, and all
modules that located in such directory

Second problem - When VirtualFile was deleted it is impossible to
get ModuleInfo for it using getModuleInfoByVirtualFile

Third problem - stale references in cache, due cycle dependency

 #KT-20987 Fixed
2017-11-22 16:07:34 +03:00
Mikhail Zarechenskiy
bee7ed1431 [NI] Fix mapping of type arguments to parameters for inner classes 2017-11-22 10:22:41 +03:00
Mikhail Zarechenskiy
e526a87d54 [NI] Make model more robust: remove diagnostics from resolution atoms
Currently there are two major phases in NI that report diagnostics: resolution parts and completion. They connected in method `KotlinCallCompleter.runCompletion` and previously diagnostics were collected in several places, from resolution atoms, partly from constraint system and partly from `CallResolutionResult`, some of them were lost.

 To mitigate this problem, now diagnostics are not bind to the intermediate candidate, only to the result resolution candidate (overloaded or usual one). And all diagnostics are now collected in method `runCompletion`
2017-11-22 10:22:39 +03:00
Nikolay Krasko
6e51c4d5db Disable script dependency updater in AddRequireModuleTest 2017-11-21 18:55:42 +03:00
Nikolay Krasko
a530163074 Add sources for 'reflect' and 'test' libs during JPS config (KT-20956)
#KT-20956 Fixed
2017-11-21 18:55:42 +03:00
Alexey Andreev
ec8adfe7c4 JS: fix referencing outer class from secondary constructor
See KT-21041
2017-11-21 12:22:10 +03:00
Alexey Andreev
88441da131 JS: cache PropertyMetadata objects in property delegates
Also, remove unused PropertyMetadata instances

See KT-20737, KT-20738
2017-11-21 12:21:22 +03:00
Alexey Andreev
7ebfba3722 JS: apply boxing when initializing val parameter of type Char
See KT-20854
2017-11-21 12:20:01 +03:00
Alexey Andreev
32a0221474 JS: refactor code that copies default methods in interfaces to classes
Als fixes KT-21245
2017-11-21 12:18:16 +03:00
Alexey Andreev
38e50e964a JS: fix generation of source map for inline lambda with ignored result
See KT-21309
2017-11-21 12:15:25 +03:00
Nikolay Krasko
d2aabe076d Refactoring: extract jar names in PathUtil and use them in artifacts 2017-11-21 01:11:01 +03:00
Nikolay Krasko
3a90f3618a Don't force configure with kotlin-jdk artifacts for early versions (KT-21028)
#KT-21028 Fixed
2017-11-21 01:11:00 +03:00
Nikolay Krasko
679a460c44 Minor: make sdk version comparison compatible with JDK > 9 2017-11-21 01:10:59 +03:00
Ilya Chernikov
0e5c443894 Move kapt3 embeddable to prepare folder 2017-11-20 22:59:40 +01:00
Ilya Chernikov
6f73e9994b Add kotlin-annotation-processing-embeddable, publish base kapt3 as kotlion-annotation-processing
(cherry picked from commit 148d4e4)
2017-11-20 20:06:43 +01:00
Ilya Chernikov
56542286eb Bring back filtering of jna and shading of jline in embeddable compiler
they were lost during the migration to gradle

(cherry picked from commit 126a6a8)
2017-11-20 19:59:40 +01:00
Alexey Andreev
a9548b1224 JS: fix translation of safe calls to suspend unit functions
See KT-21317
2017-11-20 19:19:24 +03:00
Denis Zharkov
91730e1a9e Do not run search for operator-like names in inspections
It might be rather expensive to search componentN's usages in the whole project
2017-11-20 18:33:46 +03:00
Ilmir Usmanov
0fbbe10143 Support suspendCoroutineUninterceptedOrReturn intrinsic
KT-17336: Fixed
2017-11-20 18:12:41 +03:00
Mikhail Glukhikh
4c583c5a61 Catch InvalidModuleException from getModality() in icon provider
Related to KT-20986
2017-11-18 12:38:25 +03:00
Mikhail Glukhikh
dce7377099 Revert check on module descriptor validness in lookup
Related to KT-20986
2017-11-18 12:35:01 +03:00
Mikhail Glukhikh
e53cedbd6b Throw InvalidModuleException in assertValid() instead of standard ISE 2017-11-18 12:34:59 +03:00
Mikhail Glukhikh
539f8afef3 Style: do not highlight single return when as "Use expresison body" 2017-11-18 12:34:58 +03:00
Nikolay Krasko
c0a3344803 Download jflex from bintray 2017-11-17 17:21:59 +03:00
Mikhael Bogdanov
a547019ed0 Switch DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET according to LL 2017-11-17 13:48:44 +01:00
Alexander Udalov
d386712903 Report pre-release errors if release LV is used
#KT-21267 Fixed
2017-11-17 13:42:36 +01:00
Dmitry Jemerov
64a8008a8a Add icon for multiplatform projects, update JS icon
#KT-19824 Fixed
2017-11-17 13:13:04 +01:00
Mikhail Zarechenskiy
20e1caaab1 [NI] Use refined expected type by smartcasts in CS 2017-11-17 15:04:20 +03:00
Mikhail Zarechenskiy
ca035bc8b8 [NI] Report error from expected type constraint position 2017-11-17 15:04:18 +03:00
Igor Chevdar
d4d3f237ee Fix for package level lateinit properties 2017-11-17 13:48:17 +03:00
Alexey Andreev
89db4dfe79 JS: translate when against enum to JsSwitch when possible 2017-11-17 11:07:41 +03:00
Alexey Andreev
c54c4a6ce8 JS: fix support of JsSwitch in coroutines 2017-11-17 11:07:39 +03:00
Alexey Andreev
678b4c67c1 JS: translate when to JsSwitch when possible
See KT-21160
2017-11-17 11:07:38 +03:00
Alexey Andreev
7b403211dd JS: kotlinize WhenTranslator 2017-11-17 11:07:37 +03:00
Alexey Andreev
b93acb07d2 JS: don't remove debugger statement from coroutine
See KT-19826
2017-11-17 11:07:36 +03:00
Alexey Andreev
21de76f88d JS: fix identifier generation in delegate constructor calls
See KT-21093
2017-11-17 11:07:34 +03:00
Ilya Gorbunov
fdeb916111 Correct exclusions of kotlin-stdlib-js 2017-11-16 20:30:51 +03:00
Ilya Gorbunov
c10771092a Add maven subprojects to the project 2017-11-16 20:30:51 +03:00
Nikolay Krasko
17f0d3b9b3 Revert JetRunConfiguration for compatibility (KT-21296)
#KT-21296 Fixed
2017-11-16 20:14:38 +03:00
Mikhail Zarechenskiy
66064345e9 [NI] Support fallback resolution for refined sams priority feature 2017-11-16 18:07:54 +03:00
Mikhail Zarechenskiy
e42f07b031 [NI] Wait for proper constraints to fix type for callable reference
If expected type is a type variable, then we'll wait for proper constraints, but previously we resolved callable reference as it didn't have expected type at all, because type variable isn't a functional type

 Consider the following example:

 fun foo(i: Int) {}
 fun foo(s: String) {}
 fun <T> id(x: T): T = x

 fun test() {
     val x1: (Int) -> Unit = id(id(::foo))
 }

 Here we shouldn't resolve callable reference until we get constraint from expected type of `x1`
2017-11-16 18:07:51 +03:00
Mikhael Bogdanov
cbfcb74b58 Get rid of cli dependencies from ir 2017-11-16 14:46:53 +01:00
Zalim Bashorov
28e34ac39b Minor: fix IDEA warnings in BasicBoxTest.kt 2017-11-16 15:42:08 +03:00
Zalim Bashorov
291e903ae6 Mark js/js/translator/testData/out-min/ as excluded directory in IDEA
It's required to avoid indexing a lot of js files (> 200MB)
after each run of js tests.
2017-11-16 15:41:45 +03:00
Zalim Bashorov
4849bddde1 KJS: write minification's test results to separate directory
It allows excluding this directory from indexing inside IDEA
and probably simplifies the main workflow.
2017-11-16 15:36:20 +03:00
Alexey Tsvetkov
18261838b6 Avoid deserializing .kotlin_module as class proto
#KT-20184 fixed
2017-11-16 14:47:59 +03:00
Alexander Udalov
c55ac55526 Restore and deprecate JvmFileClassesProvider.getFileClassInternalName
#KT-21270 Fixed
2017-11-16 11:24:11 +01:00
Dmitry Petrov
4193fae9fa Fix floating point comparison generation for range literals 2017-11-16 10:54:25 +03:00
Dmitry Petrov
354d54aef6 Don't generate DUPX instructions for in-range-literal expressions
Store argument into a local variable instead.
2017-11-16 10:54:25 +03:00
Vladimir Kasatkin
9b49e9139c Added samples for map filtering operators (KT-20357)
Fix map transformations sample names.
2017-11-15 23:58:51 +03:00
Ilya Gorbunov
dca23e339a Improve iterator samples, add explanatory comments (KT-20357) 2017-11-15 23:58:49 +03:00
kenji tomita
4d13ea89b2 Add samples for iterator-related extensions (KT-20357) 2017-11-15 23:39:07 +03:00
Ilya Gorbunov
94f77c773c Remove unused function, simplify outdated runtime version tests 2017-11-15 17:53:18 +03:00
Ilya Gorbunov
18611343f2 Do not infer artifact version from build.txt #KT-21150 2017-11-15 17:53:18 +03:00
Ilya Gorbunov
9de6dd814b Docs: clarifications on LazyThreadSafetyMode 2017-11-15 17:41:43 +03:00
Nikolay Krasko
0768e7404b Stop overwriting values with defaults in compiler arguments
'verbose' option was always lost.
2017-11-15 16:12:41 +03:00
Nikolay Krasko
0480042ffd Log incremental options before passing them to kotlin daemon 2017-11-15 16:12:40 +03:00
Nikolay Krasko
643f771c24 Report rebuild reason in rebuild function 2017-11-15 16:12:38 +03:00
Nikolay Krasko
97c1e58149 Minor: reformat too long lines 2017-11-15 16:12:37 +03:00
Alexander Udalov
ad730cedf6 Rename idea/src/META-INF/extensions/{common.xml -> compiler.xml}
To emphasize that this file declares extensions to be registered in the
compiler, not only in the IDE
2017-11-15 11:05:16 +01:00
Alexander Udalov
afc9d3ef8b Remove idea/src/META-INF/extensions/{kotlin2jvm.xml,kotlin2js.xml}
Keep the EnvironmentConfigFiles enum because its values are used in
determining whether the environment is going to be used for JVM or
non-JVM project analysis, but remove the actual files.

Drop EnvironmentConfigFiles.EMPTY and replace its only usage in
preprocessor with JVM_CONFIG_FILES: it's easier and won't affect
anything
2017-11-15 11:05:15 +01:00
Alexander Udalov
7ace303add Fix ambiguity on callable reference for expect members
Expect members should always lose in resolution to non-expect members,
be it simple calls or callable references. Note that there should be
exactly one actual member for each expect member in correct code, so
both ways to check for expect vs non-expect are correct: either before
signature comparison, or after.

 #KT-20903 Fixed
2017-11-15 11:02:29 +01:00
Ilya Gorbunov
27546546fa Minor: specify explicit name for lambda parameter, use also instead of let 2017-11-15 12:01:22 +03:00
Sergey Ryabov
7fe7b6d6e1 Change FileReadWrite to more idiomatic code 2017-11-15 12:01:22 +03:00
Ilya Gorbunov
f4015b48f7 Run configuration for generator: configure-on-demand 2017-11-15 09:17:42 +03:00
Ilya Gorbunov
7c543b6b28 Rewrite array and specialized operations in new DSL 2017-11-15 09:17:42 +03:00
Ilya Gorbunov
c4ac2548d9 Rewrite Mapping.kt in new DSL 2017-11-15 09:17:42 +03:00
Ilya Gorbunov
efefa64ac5 Rewrite snapshot and set operations in new DSL 2017-11-15 09:17:42 +03:00
Ilya Gorbunov
3b6c5880e2 Rewrite range operations in new DSL 2017-11-15 09:17:42 +03:00
Ilya Gorbunov
c3b894f041 Rewrite Guards, Numeric, SequenceOps, StringJoinOps in new DSL 2017-11-15 09:17:42 +03:00
Ilya Gorbunov
d2e1baa9d4 Rewrite Ordering.kt in new DSL 2017-11-15 09:17:42 +03:00
Ilya Gorbunov
ff336cdf84 Rewrite Generators.kt in new DSL 2017-11-15 09:17:42 +03:00
Ilya Gorbunov
eb2db85c46 Rewrite Filtering.kt in new DSL 2017-11-15 09:17:42 +03:00
Ilya Gorbunov
d8455ba765 Rewrite Elements.kt in new DSL 2017-11-15 09:17:42 +03:00
Ilya Gorbunov
012d3804f0 Rewrite Aggregates.kt to the new template DSL 2017-11-15 09:17:42 +03:00
Ilya Gorbunov
dd0e04edd5 Switch production generated stdlib sources to the new DSL and remove old DSL 2017-11-15 09:17:42 +03:00
Ilya Gorbunov
db049c0ab6 Introduce deprecated helpers to ease migration 2017-11-15 09:17:42 +03:00
Ilya Gorbunov
9f57a2c0d5 Make generated code ordered same as before
Allow to fix signature for sorting when overriding it
2017-11-15 09:17:42 +03:00
Ilya Gorbunov
31e00efa8f Legacy mode for non-multiplatform stdlib sources 2017-11-15 09:17:42 +03:00
Ilya Gorbunov
4404257329 Improve new stdlib generator DSL
- Add Kotlin/Native platform.
- Rename classes.
- Introduce TemplateGroup and TemplateGroupBase to group template values.
- MemberBuilder: add support for more properties.
2017-11-15 09:17:42 +03:00
Ilya Gorbunov
e68a6651d2 Prototype new version of stdlib generator template DSL 2017-11-15 09:17:42 +03:00
Ilya Gorbunov
9e34e20338 Refactor stdlib generator: extract common types to be reused in new DSL 2017-11-15 09:17:42 +03:00
Ilya Gorbunov
dcd0a94d76 Minor: fix extra space in return type of chunked and windowed 2017-11-15 09:17:42 +03:00
Pavel V. Talanov
cf2e9c7002 Fix compilation: erroneous import 2017-11-14 20:30:13 +03:00
Pavel V. Talanov
70b22e7f85 Highlighting: never highlight errors for compiled files 2017-11-14 18:29:58 +03:00
Pavel V. Talanov
9db9750e67 Light classes: do not fail when classfile is in src root 2017-11-14 18:29:53 +03:00
Pavel V. Talanov
6667732dd4 Do not hide kotlin class files in source roots
This fixes a problem where file is indexed but querying
    index fails with an exception because file has no PSI

 #KT-21061 Fixed
2017-11-14 18:26:53 +03:00
Pavel V. Talanov
8696b37cdb Minor, tests: make collection synchronized
Attempt to fix flaky test test that use LightClassComputationControl
2017-11-14 17:47:55 +03:00
Denis Zharkov
1f9d56439a Fix KNPE caused by optimizations in control-flow analysis
The problem is that when performing full analysis we do it in
a backward order while result for trivial vals is filled
in a forward one.

It turns out that reversedInstuctions might return a superset of
forward traversed instructions, e.g. in case of dead code in lambda.

At the same time result for trivial vals is constant
for any instruction, thus we can just return its constant value
and use it in the full analysis

 #KT-20895 Fixed
2017-11-14 16:38:28 +03:00
Denis Zharkov
2a0b937aac Revert "Add diagnostic for unexpected KNPE in control-flow analysis"
This reverts commit f24f0017a0.
2017-11-14 16:37:24 +03:00
Denis Zharkov
f24f0017a0 Add diagnostic for unexpected KNPE in control-flow analysis
See KT-20895
2017-11-14 16:32:34 +03:00
Pavel V. Talanov
ae2b0325a3 Restore and deprecate old ScriptTemplatesProvider EP 2017-11-14 16:30:42 +03:00
Pavel V. Talanov
6fed779782 Reload gradle script definitions
Reloading in the following scenarios:
- Successful gradle sync following a failure to load definitions
- Gradle settings changed in IDE (via settings UI)
2017-11-14 16:30:40 +03:00
Pavel V. Talanov
4906c850af Reload script definitions on compiler settings changes
Provide API to track compiler settings changes
2017-11-14 16:30:37 +03:00
Pavel V. Talanov
ef539bd89d Tests: use standard script definition in cli tests by default 2017-11-14 16:30:35 +03:00
Pavel V. Talanov
cdfdc1d19b Refactor script definitions loading
Make ScriptDefinitionProvider an interface
    and provide different implementation for cli and IDEA
Rework ide extension point to a simpler interface (ScriptDefinitionContributor)
Move template loading logic into a top level function
Allow script definitions to be reloaded in IDE
2017-11-14 16:30:33 +03:00
Pavel V. Talanov
f063254cc1 GradleScriptDefaultDependenciesProvider: better name filter 2017-11-14 16:30:30 +03:00
Pavel V. Talanov
df74fb23f8 ScriptDependenciesCache: limit simultaneously cached script count
Do not schedule updates for dependencies of scripts that were not requested
   (opened in the editor or such) for some time
This fixes a problem when vcs updates changing scripts can trigger
   undesired script dependencies updates
   (probable cause of script files never highlighted correctly in some cases)
Refactor: use VirtualFile instead of String and move code from GradleScriptTemplateProvider
2017-11-14 16:30:28 +03:00
Dmitry Jemerov
f67e01db1c Generate 'expectedBy' dependency instead of 'implement' (KT-21006) 2017-11-14 14:09:25 +01:00
Vyacheslav Gerasimov
64f29a7bd5 Move KDsl gradleFrameworkSupport and moduleBuilder to gradle.xml
#KT-21236 Fixed Target versions 1.2.20
2017-11-14 14:52:19 +03:00
Ilmir Usmanov
f4e180556c Fix assignment codegen for suspend operators plus and plusAssign
KT-16079: Fixed
2017-11-14 14:49:26 +03:00
Mikhail Zarechenskiy
fbe274ff09 [NI] Use less specific type for captured type approximation
This is needed to be more compatible with the old NI
2017-11-14 14:40:47 +03:00
Mikhail Zarechenskiy
f3ef961be6 [NI] Report error about non-spread parameter from arguments mapper 2017-11-14 13:55:48 +03:00
Mikhail Zarechenskiy
13ee0f8eda [NI] Don't forget to report error about mixing different kinds of args
Also use more safe way to report errors: only if there is corresponding PSI element. This is not very useful for compiler, but in IDE we can get synthetic calls with null psi arguments
2017-11-14 13:54:58 +03:00
Mikhail Zarechenskiy
2aa8ceb005 [NI] Fix state for named arguments in arguments to parameters mapper 2017-11-14 13:54:51 +03:00
Dmitry Petrov
15ac471626 Treat accessors to JvmStatic methods as having no dispatch receiver
#KT-21246 Fixed
2017-11-14 09:59:16 +03:00
Dmitry Petrov
db2aad1857 Rewrite correctContainerForLambda using uninitializedClasses 2017-11-14 09:33:28 +03:00
Dmitry Petrov
e38bbbfc13 Drop local interfaces support in ExpressionCodegen
Local interfaces are prohibited since 1.0.
2017-11-14 09:33:28 +03:00
Dmitry Petrov
4365084645 Lookup for local variables taking into account uninitialized this
Consider a context with uninitialized this, e.g.:

  fun foo() {
    val x = "..."
    class Local(y: String) : Base(L@{ x + y })
  }

Lambda 'L' is an argument of a super class constructor call.
Here 'this@Local' is not initialized yet. Thus local variables captured
in 'Local' can't be used. Instead, they should be captured by lambda 'L'
itself.

Note that lambda 'L' sees both 'x' and 'y' as local variables that
should be captured.

When in context with uninitialized this (generating arguments for super
type constructor or delegating constructor call), and a variable in
question is not found in the current context, use enclosing local lookup
to determine whether a local variable should be captured by a closure.
2017-11-14 09:33:28 +03:00
Dmitry Petrov
ff0a2562e0 Minor: LocalLookup: lookupLocal -> isLocal 2017-11-14 09:33:28 +03:00
Dmitry Petrov
2d56837409 Minor: answer -> capturedVariable 2017-11-14 09:33:28 +03:00
Dmitry Petrov
47b59496da Minor: CodegenContext.isContextWithUninitializedThis() 2017-11-14 09:33:28 +03:00
Dmitry Petrov
bbb0389c51 Fix determining enclosing class for closure
Enclosing class for closure is a class whose instance is captured by
closure as an outer 'this', and stored in a field 'this$0'.
Usually enclosing class for closure is an immediate outer class,
including classes for nested closures. For example:

  class C {
    fun foo() {}
    val example1 = L1@ { foo() }
    // Enclosing class for lambda 'L1' is 'C'
    val example2 = L2a@ { L2b@ { foo() } }
    // Enclosing class for nested lambda 'L2b'
    // is a closure class for outer lambda 'L2a'
  }

However, if the closure is created in a super type constructor call for
the outer class, corresponding instance is considered "uninitialized",
and can't be used as a proper class instance, and can't be referenced:
corresponding code is rejected by front-end.

  class Outer {
    fun foo() {}
    inner class Inner : Base(L3@ { foo() })
    // Enclosing class for lambda 'L3' is 'Outer',
    // because 'Inner' is uninitialized in super type constructor call.
  }

In CodegenAnnotatingVisitor, we maintain a stack of currently
uninitialized classes, and chose enclosing class for closure
as an inner-most surrounding class with initialized instance.

When generating code for this or outer class instance, we skip
contexts corresponding to classes with uninitialized instances.

This fixes a number of bytecode verification errors caused by incorrect
enclosing class for closure.

 #KT-4174 Fixed Target versions 1.2.20
 #KT-13454 Fixed Target versions 1.2.20
 #KT-14148 Fixed Target versions 1.2.20
2017-11-14 09:33:28 +03:00
Dmitry Petrov
6648657e65 Override accept(...) in KtConstructorDelegationCall 2017-11-14 09:33:28 +03:00
Dmitry Petrov
ac761a03c5 Minor: calleeContainingClass -> thisOrOuterClass 2017-11-14 09:33:28 +03:00
Dmitry Petrov
92e0ea2553 Minor: CodegenContext utils 2017-11-14 09:33:28 +03:00
Mikhael Bogdanov
dff6e943bb Always do stack spilling during inline cause of dex problem
Dex issue: https://issuetracker.google.com/issues/68796377

  #KT-20844 Fixed
2017-11-13 16:50:24 +01:00
Mikhail Zarechenskiy
519e5c33d8 [NI] Support assigning single array elements in named form to varargs 2017-11-13 16:47:05 +03:00
Mikhail Zarechenskiy
fe2499b47f [NI] Approximate flexible types with enhancement as usual ones
This is temporary and should be fixed later
2017-11-13 16:35:24 +03:00
Mikhail Zarechenskiy
82d43c23b6 [NI] Perform full type checking in NI if there is no contradiction
In NI type checking actually performs in constraint system. To be conservative, now we still perform full type cheking but only if there is no contradiction in constraint system
2017-11-13 16:33:20 +03:00
Mikhail Zarechenskiy
f51f7a0fe4 [NI] Report diagnostic about receiver as super expression 2017-11-13 16:33:08 +03:00
Mikhail Zarechenskiy
1d6e9c244b [NI] Report diagnostic about spread argument to non vararg parameter 2017-11-13 16:32:58 +03:00
Mikhail Zarechenskiy
d45f4e71de [NI] Don't try to search methods on undefined integer type 2017-11-13 16:31:22 +03:00
Mikhail Zarechenskiy
4ad885afb0 [NI] Correctly propagate base constraint system of invoke call
Consider the following example:

class A {
  operator fun <T> invoke(): Foo<T> = throw Exception()
}

fun foo(f: Foo<Int>) {}

fun test(a: A) {
  foo(a()) // after resolve of `invoke`, it has non-fixed type variable
}
2017-11-13 16:31:04 +03:00
Mikhail Zarechenskiy
28e539b158 Simplify CompilerTestLanguageVersionSettings: merge two maps into one 2017-11-13 16:27:26 +03:00
Mikhail Zarechenskiy
cd2d32d92a Set up specific LV settings for compiler tests
For example, to configure NI

(cherry picked from commit e0c6aec)
2017-11-13 16:27:25 +03:00
Mikhail Zarechenskiy
91a6591b70 Load compiler language version settings for resolved calls tests 2017-11-13 16:27:24 +03:00
Mikhail Zarechenskiy
20bf238006 Load compiler language version settings for codegen tests 2017-11-13 16:27:23 +03:00
Mikhail Zarechenskiy
85d442133d Load compiler language version settings for foreign annotations tests
To set specific features for compiler tests
2017-11-13 16:27:22 +03:00
Mikhail Zarechenskiy
63b13027df Configure pseudocode tests with !LANGUAGE directive
Except all, it's also useful to use one class of language version settings for compiler tests to configure it specially for tests
2017-11-13 16:27:20 +03:00
Mikhail Zarechenskiy
ef1d1ef946 Enable new inference feature by system property for tests only 2017-11-13 16:27:19 +03:00
Mikhail Zarechenskiy
fbbe396881 Add configuration key to enable new inference for compiler tests 2017-11-13 16:27:18 +03:00
Mikhail Zarechenskiy
0b484771dd Add compiler key to enable new inference 2017-11-13 16:24:34 +03:00
Mikhail Zarechenskiy
84ac5a3e22 Use separate directive to check results of descriptor renderer for NI 2017-11-13 16:24:33 +03:00
Mikhail Zarechenskiy
b6542caf47 Setup system property for NI tests with parameter -PnewInferenceTests 2017-11-13 16:23:05 +03:00
Mikhail Zarechenskiy
0410287cf9 Add flag to force loading old inference diagnostics 2017-11-13 16:23:05 +03:00
Mikhail Zarechenskiy
6486c8dccc Add ability to reuse one diagnostic test file for old and new inference 2017-11-13 16:23:05 +03:00
Mikhail Zarechenskiy
73b4e24d54 Introduce language feature for NI, remove old setting 2017-11-13 16:23:04 +03:00
Toshiaki Kameyama
27e7f13335 Fix AssertionError on completing after template in string literal
#KT-16402 Fixed
2017-11-13 16:01:34 +03:00
Simon Ogorodnik
0560ba7929 KT-19943: Remove redundant type conversions in J2kPostProcessing
Don't remove them in converter itself
2017-11-13 15:54:33 +03:00
a2kaido
083c3d8a5d KT-19943: Remove redundant special type unboxing calls in J2K
#KT-19943 Fixed
2017-11-13 15:54:33 +03:00
Konstantin Bulenkov
65cc5f1589 Change run icon in gutter to standard one from IJ Platform 2017-11-13 13:16:22 +01:00
Alexander Udalov
6f276c623b Do not use IntelliJ extensions for uninitialized variable suppressor in JS 2017-11-13 13:04:54 +01:00
Alexander Udalov
6f90a0545c Do not use IntelliJ extensions for declaration without body suppressor in JS 2017-11-13 13:04:54 +01:00
Alexander Udalov
7f81601123 Do not use IntelliJ extensions for unused parameter suppressor in JS 2017-11-13 13:04:54 +01:00
Alexander Udalov
d782c8a644 Use ServiceLoader instead of IntelliJ extensions for ScriptHelper 2017-11-13 13:04:54 +01:00
Alexander Udalov
20d13411e0 Remove obsolete extension point implementations
- There's no class with FQ name
  org.jetbrains.kotlin.resolve.jvm.AnalyzeCompleteHandlerExtension anymore
- There's no substring classBuilderInterceptorExtension anywhere else in
  the project
2017-11-13 13:04:54 +01:00
Toshiaki Kameyama
2be27d5380 KT-19390: Fix char + String in Java is converted to code with multiple type errors in Kotlin (#1235)
#KT-19390 Fixed
2017-11-13 14:13:34 +03:00
Mikhail Glukhikh
1e940bde01 Lookup element factory: do not use outdated descriptor
Probably #KT-20986 Fixed
2017-11-13 14:10:58 +03:00
Mikhail Glukhikh
f43360177a Minor refactoring of ResolveElementCache #KT-21132 Fixed
Get rid of SoftValueMap.containsKey
2017-11-13 14:10:58 +03:00
Ilya Gorbunov
f51974b271 Minor fix in comparison samples #KT-20357 2017-11-10 23:32:20 +03:00
scache
96e322c7d5 Add samples for Comparisons #KT-20357 2017-11-10 23:32:06 +03:00
Ilya Gorbunov
e16a0ba650 Improve and group samples for operations on Iterables #KT-20357 2017-11-10 23:31:50 +03:00
kenji tomita
75348dd0c0 Add samples for Iterables #KT-20357 2017-11-10 23:31:31 +03:00
Alexey Belkov
5da1b4c566 Minor: fix sample name (KT-20357) 2017-11-10 23:29:39 +03:00
Alexander Udalov
2572d27921 Regenerate tests 2017-11-10 20:01:48 +01:00
Alexander Udalov
b5fa520aa5 Remove obsolete version override mechanism and increment-version.kts 2017-11-10 18:58:32 +01:00
Alexander Udalov
36026d3f16 Minor, remove obsolete jdkPath 2017-11-10 18:58:32 +01:00
Alexander Udalov
208e68a968 Move strip-kotlin-annotations script to buildSrc
... and invoke it directly in kotlin-reflect's build file, instead of
running another instance of compiler to evaluate a script. Also only
strip kotlin.Metadata, since it's the only annotation with heavy
metadata on Kotlin-generated class files
2017-11-10 18:58:32 +01:00
Alexander Udalov
38bee07fd0 Remove obsolete protobuf-lite building scripts
This logic is now present in
custom-dependencies/protobuf-lite/build.gradle
2017-11-10 18:58:31 +01:00
Alexander Udalov
d26486b7df Move JvmRuntimeDescriptorLoaderTest to core/descriptors.runtime/tests
This allows to get rid of the dependency on descriptors.runtime from
compiler/IDE tests which is problematic: classes there clash with the
classes in kotlin-reflect, which reference declarations in shadowed
packages
2017-11-10 18:58:31 +01:00
Alexander Udalov
02981038f3 Split core into descriptors, descriptors.jvm, deserialization, descriptors.runtime 2017-11-10 18:58:31 +01:00
Alexander Udalov
328e906b57 Rename source set "descriptor.loader.java" -> "descriptors.jvm"
The new name is more convenient and precise because this module is no
longer only about loading declarations from Java, it also contains
implementation of loading Kotlin declarations from .class files, as well
as type mapping abstractions, JVM ABI specifications, etc.
2017-11-10 18:58:31 +01:00
Alexander Udalov
51e00eb05e Move descriptors.runtime sources to package kotlin.reflect.jvm.internal
To make it obvious that this is a part of kotlin-reflect and should not
be packed into the compiler jar. Also copy 'classId' utility to
AbstractLocalClassProtoTest to minimize dependencies on
kotlin.reflect.jvm.internal

Note that the module itself is still needed and can't be merged into
kotlin-reflect because of the way it's used in
AbstractJvmRuntimeDescriptorLoaderTest
2017-11-10 18:58:31 +01:00
Alexander Udalov
4cb8a3a6b7 Remove obsolete workaround for jansi clash issue
This was needed to workaround KT-17031 which is now fixed
2017-11-10 18:58:31 +01:00
Alexander Udalov
c519e33a25 Remove ultimate/.idea
kotlin-ultimate is no longer used as a separate project since it's
merged into the main Gradle project
2017-11-10 18:58:31 +01:00
Alexander Udalov
1c2fee8764 Remove obsolete non-compiler-tests.iml 2017-11-10 18:58:31 +01:00
Alexander Udalov
81756150dd Update .idea/codeStyles/Project.xml for latest IDEA 2017-11-10 18:08:10 +01:00
Ilmir Usmanov
0f9a21d429 Add regression test for KT-17640 2017-11-10 19:16:06 +03:00
Mikhael Bogdanov
ad80d1239f Properly process special names for local function in LocalLookup 2017-11-10 13:42:40 +01:00
Mikhael Bogdanov
5250d947e7 Update android emulator images 2017-11-10 13:42:40 +01:00
Toshiaki Kameyama
b8c5d1b852 Fix "add <*>" quick-fix for inner class with generic outer one
So #KT-20763 Fixed
2017-11-10 15:34:17 +03:00
Mikhail Glukhikh
7b2a66c006 Convert 'simplify when' from intention to inspection
Related to KT-20492
2017-11-10 15:34:11 +03:00
Toshiaki Kameyama
df86ff7115 Introduce "Simplify when" intention where one branch is always true
So #KT-20492 Fixed
2017-11-10 15:34:08 +03:00
Denis Zharkov
26ba2ab3db Postpone creating DataFlowValue until they're really needed
Unfortnutately DataFlowValueFactory::createDataFlowValue isn't very cheap,
so it's better to avoid these calls when it's possible
2017-11-10 13:01:13 +03:00
Denis Zharkov
714a057e3b Minor. Drop unused DataFlowExtras::possibleTypes 2017-11-10 13:01:13 +03:00
Denis Zharkov
b4499d52ee Introduce OpenAddressLinearProbingHashTable to be used in binding context
See comments in the implementation for clarification
2017-11-10 13:01:13 +03:00
Mikhael Bogdanov
5d84aec8f7 Clean dependencies in 'tests-java8' module 2017-11-10 09:46:41 +01:00
Mikhael Bogdanov
ce62991c5a Add test-ir-jvm module 2017-11-10 09:46:40 +01:00
Ilya Gorbunov
598dc1af04 Introduce deployRepo parameter to override deploy-repo set by teamcity
Currently it isn't possible to do that from command line.
2017-11-10 00:14:25 +03:00
Simon Ogorodnik
cf9b7d0f42 Set unit test mode to false in production environment 2017-11-09 21:38:47 +03:00
Ilya Gorbunov
e801390c7a Fix intellij-community revision JFlex is downloaded from
Because it was removed in master
2017-11-09 17:58:54 +03:00
Anton Bannykh
4d12426145 JS: use ANT replace task to set $version
Needed make kotlin-test depend on the same version of kotlin
2017-11-09 15:10:12 +03:00
Mikhael Bogdanov
af784dcd47 Update android test dependencies 2017-11-09 11:38:10 +01:00
Ilya Gorbunov
b2627f53a3 Fix resources clashes in ultimate plugin tests
Rollback tests-jar configuration to extend testCompile instead of testRuntime.
Otherwise an unwanted main artifact from the runtime configuration gets added to the
artifacts of tests-jar configuration.

Exclude transitive dependencies of projectTests(":idea")
2017-11-08 19:05:36 +03:00
Ilya Gorbunov
24c982de9b Make project dependency shortcuts return ProjectDependency
to enable further configuration.
2017-11-08 19:03:40 +03:00
Mikhael Bogdanov
416392bb74 Don't propagate reified markers for special enum functions
#KT-18254 Fixed
2017-11-08 15:35:44 +01:00
Mikhael Bogdanov
800cc63347 Remove external finally block interval on splitting during inline
#KT-20433 Fixed
2017-11-08 15:35:43 +01:00
Alexey Andreev
f51709e61c Clean-up application from EncodeSignatureTest
Hopefully, this fixes random failing tests
2017-11-08 16:13:07 +03:00
Alexey Andreev
779af375a7 JS: fix inlining of array constructor expressed via typealias
See KT-20978
2017-11-08 16:12:16 +03:00
Alexey Andreev
ec53f9b254 JS: don't emit short circuit operators for boolean and/or
See KT-21004
2017-11-08 16:10:57 +03:00
Vyacheslav Gerasimov
16b9a376b6 Android Lint: Run AnalysisScope.toSearchScope under read action 2017-11-07 20:11:19 +03:00
Vyacheslav Gerasimov
d6d20a5b5d Android Lint: Don't check files unrelated to Android modules
#KT-21064 Fixed
2017-11-07 20:11:19 +03:00
Alexey Sedunov
ba0b21d1a3 Add @JvmStatic Intention: Support functions/properties in objects
Also eliminate unnecessary object instance references on Java call sites

 #KT-20095 Fixed
2017-11-07 19:25:03 +03:00
Alexey Sedunov
cfad305826 Misc: Fix deserialization of CommonCompilerArguments.freeArgs
#KT-20938 Fixed
2017-11-07 19:25:02 +03:00
Alexey Sedunov
0bd267111e Kotlin Facet: Fix language/API version initialization 2017-11-07 19:25:02 +03:00
Ilya Gorbunov
a005f4804e Strengthen deprecation for CharSequence.size in JS 2017-11-07 18:59:33 +03:00
Ilya Gorbunov
9305903e6c Remove deprecated pairwise function
It was replaced with zipWithNext.
2017-11-07 18:59:33 +03:00
Nikolay Krasko
329322e268 Increase stub version because of change in overload sorting
See commit f197f36e23
2017-11-07 18:00:23 +03:00
Mikhail Glukhikh
6c2eb06351 Do not report "unused receiver" on companion objects
So #KT-19560 Fixed
2017-11-07 17:28:13 +03:00
Nikolay Krasko
84ab397f25 Restrict 172 plugin to 172 ide only 2017-11-07 13:30:00 +03:00
Nicolay Mitropolsky
fab8187574 UAST: Complex test data moved to separate file (KT-20990) 2017-11-06 19:59:50 +03:00
Nicolay Mitropolsky
9730d50e10 UAST: yet another fight with string literals in string literals (KT-20990) 2017-11-06 19:59:50 +03:00
Alexey Andreev
132285ea03 JS: optimize loop over array.withIndex()
See KT-20932
2017-11-03 17:36:05 +03:00
Alexey Andreev
1be86e05ae JS: optimize range check for int and long
See KT-2218

Additionally, fix temporary variable elimination for && and ||
2017-11-03 17:35:17 +03:00
Alexey Andreev
43302ce00c JS: add missing members to kotlin.js.Date
See KT-20694
2017-11-03 17:31:25 +03:00
Alexey Andreev
0a31b4ccc1 JS: improve declarations for JSON object
See KT-20580
2017-11-03 17:31:22 +03:00
Alexey Andreev
bd7129d0d6 JS: fix non-abstract extension properties in interfaces
KT-20994
2017-11-03 17:29:44 +03:00
Pavel V. Talanov
9e061d3bbb Fix light class exception on empty multifile facade
Fix generating multifile facade with all members private (in bytecode)
leading to delegate not being generated for corresponding light class

 #KT-20966 Fixed
2017-11-03 16:44:53 +03:00
Alexey Sedunov
b20ffe76b7 Navigation: Support "Navigate/Related Symbol" for expects/actuals
#KT-20952 Fixed
2017-11-03 16:34:36 +03:00
Alexey Sedunov
b2e5e9dab5 Highlighting: Support implicit 'it' references
#KT-21002 Fixed
2017-11-03 16:34:36 +03:00
Alexey Sedunov
d1eaf444a6 Line markers: Do not show package in "Choose actual for" popup
#KT-20953 Fixed
2017-11-03 16:34:35 +03:00
Alexey Sedunov
327caa086b Gradle: Do not rely on isQualifiedModuleNamesEnabled() to predict module name
IDEA 173 uses resolve-level setting to control naming of imported modules

 #KT-20985 Fixed
2017-11-03 16:34:35 +03:00
Alexander Udalov
3ead2e9cd4 Use KotlinCoreEnvironment.createForTests in test code
createForProduction creates and caches JavaCoreApplicationEnvironment
instance, which can alter behavior of subsequent tests
2017-11-03 14:03:02 +01:00
Alexander Udalov
dddd1cdba5 Use JUnit 3 + KtUsefulTestCase instead of JUnit 4 in compiler tests
This is needed because KtUsefulTestCase performs useful cleanup at the
end of the test (namely, resets ApplicationManager#ourApplication to
null)
2017-11-03 14:03:02 +01:00
Alexander Udalov
3049b5d92f Remove logging in KotlinSuppressCache.isSuppressedByAnnotated
It produces lots of useless output in stderr when tests are run with
Gradle in the terminal
2017-11-02 17:15:59 +01:00
Alexander Udalov
b43b470b8f Move Java 8 tests generator to tests-java8, run it in "Generate Compiler Tests" 2017-11-02 17:13:05 +01:00
Alexander Udalov
f52ba44e90 Move JS tests generator to :js:js.tests, run it in "Generate Compiler Tests"
Also cleanup generateTestDataForReservedWords and make everything there
private
2017-11-02 17:12:46 +01:00
Alexander Udalov
8c6ed3e872 Generate IR tests in GenerateCompilerTests.kt 2017-11-02 17:12:46 +01:00
Ilya Gorbunov
61b78d7eda Make projectTests type of dependency transitive on testRuntime dependencies
`tests-jar` configuration now extends testRuntime instead of testCompile
(note that testRuntime extends testCompile),
and projectTests() dependency shortcut makes it transitive.

This is required to depend on test utility modules producing `-tests` jar instead of default one
without listing all their transitive dependencies.
2017-11-02 18:19:52 +03:00
Ilya Gorbunov
3cfb1fd6a7 Simplify dependency setup for jvm6 codegen test server 2017-11-02 18:18:58 +03:00
Simon Ogorodnik
339d06d040 Improve diagnosticMissingPackageFragment reporting
Single execution path to report missing package fragment problems

Split failures on PluginDeclarationProviderFactory site by
known reasons to improve exception analysis
2017-11-02 16:31:43 +03:00
Alexander Udalov
56a51c1d22 Do not treat annotation classes as interfaces in bridges codegen
From Kotlin's point of view, everything in annotation classes is
non-abstract. A class inheriting from an annotation has a non-abstract
fake override for each property of the annotation class constructor. But
because members of annotation classes themselves were considered as
abstract in the bridge-generating code (see
DescriptorBasedFunctionHandle.isAbstract), there was a situation where a
concrete fake override has only one declaration among overridden
descriptors and it was abstract. This situation is invalid (a concrete
fake override must have exactly one concrete super-declaration),
therefore an exception was thrown.

The fix is to avoid considering annotation class members abstract for
the purposes of bridge generation. It's reasonably safe because no
bridges should be ever generated for annotation subclasses anyway,
because annotations can only have members with simple return types
(final and non-generic).

Note that in KT-19928, the problem is reproducible because of an
incorrect "inexact analysis" in light classes where "Target" is resolved
to an annotation class kotlin.annotation.Target. This behavior of the
analysis in light classes seems to do no harm otherwise, so it's not a
goal of this commit to change anything in that regard

 #KT-19928 Fixed
2017-11-02 14:02:09 +01:00
Mikhail Glukhikh
8f98f00030 Explicit / implicit this: analyzeFully --> analyze 2017-11-02 14:07:57 +03:00
Mikhail Glukhikh
6a7cdc01a6 Fix 'this' case in implicit this inspection 2017-11-02 14:07:55 +03:00
Mikhail Glukhikh
64a51fe0d1 Implicit this inspection: minor cleanup 2017-11-02 14:07:46 +03:00
Kirill
89c4196c06 Add inspections for implicit and explicit 'this' #KT-4580 Fixed 2017-11-02 14:07:45 +03:00
Ilmir Usmanov
817f79520a Implement coroutineContext intrinsic
This intrinsic allows coroutine to access its context without suspention
and, furthermore, disabling tail-call optimization.
KT-17609: Fixed
2017-11-02 12:45:24 +03:00
Toshiaki Kameyama
0fffb9fb17 Introduce inspection for callables with implicit 'Nothing?' type
Inspection is reported only for vars and open callables
So #KT-21023 Fixed
2017-11-02 12:21:14 +03:00
Mikhail Glukhikh
bcbeab00d5 Slightly change IntentionBasedInspection status
Only constructor and not the whole class is now deprecated
2017-11-02 12:21:13 +03:00
Toshiaki Kameyama
9ea9ea1008 Add quick fix to add required target to annotation #KT-20484 Fixed 2017-11-02 11:07:53 +03:00
Toshiaki Kameyama
204d9e3423 Introduce inspection detecting self-assignment of properties
So #KT-20714 Fixed
2017-11-02 11:07:52 +03:00
Vyacheslav Gerasimov
ffa9478d0c Configure Kotlin: add mavenCentral() to repositories
Since kotlin stdlib depends on artifacts from mavenCentral() we should add it
 #KT-18719 Fixed
2017-11-01 23:57:20 +03:00
Ilya Gorbunov
093f796fc7 Write compiler and stdlib versions from gradle build 2017-11-01 17:26:18 +03:00
Ilya Gorbunov
6fe299cd5b Fix core:builtins:serialize task outputs 2017-11-01 17:09:10 +03:00
Ilya Gorbunov
be63f09f8f Remove some workarounds for extra properties and signing,
use new syntax for maven repo definition.
2017-11-01 17:09:10 +03:00
Ilya Gorbunov
4d4285824b Use Gradle 4.3 2017-11-01 17:09:10 +03:00
Dmitry Savvinov
e17610f378 Don't throw on recursion when computing member scope
When recursion is detected while computing
`ClassResolutionScopesSupport.scopeForMemberDeclarationResolution`,
create 'ThrowingLexicalScope' (as with other scopes), instead of
throwing ISE immediately. That allows to report error properly in cases
like in KT-18514

#KT-18514 Fixed
2017-11-01 15:57:56 +03:00
Simon Ogorodnik
d6143e2af6 Fix testData broken after KT-12797 2017-10-31 21:11:19 +03:00
Simon Ogorodnik
0a4860b4d7 Add instrumentation to locate not cleared MockApplication 2017-10-31 20:25:00 +03:00
Mikhail Glukhikh
f6a7327758 Remove ultimate tests from "Generate All Tests" configuration 2017-10-31 18:21:53 +03:00
Mikhail Glukhikh
50ebcfe09e Test generator: return back forgotten convert line separators 2017-10-31 18:05:20 +03:00
Dmitry Petrov
c2b9803933 Generate source information for synthesized data class members
For now, bind such elements to data class declaration.

 #KT-20443 Fixed
2017-10-31 17:34:32 +03:00
Dmitry Jemerov
44260cdc7c Working recognition of JUnit annotation in MP tests
(cherry picked from commit 3a21781)
2017-10-31 14:45:09 +01:00
Alexander Udalov
2ed3e88561 Create descriptors with Kotlin package name in decompiler/cls stub builder
(cherry picked from commit b2620d1)
2017-10-31 14:44:52 +01:00
Dmitry Jemerov
f93f502ebe Read package name in KotlinClassHeader and use it in decompiler
(cherry picked from commit 119d5ab)
2017-10-31 14:44:39 +01:00
Mikhail Glukhikh
d59276671f Related to KT-20631: don't report redundant blank Unit in lambda 2017-10-31 16:38:55 +03:00
Toshiaki Kameyama
0fd4cdb086 Fix false positive for "redundant super" in data class #KT-20981 Fixed 2017-10-31 15:15:19 +03:00
Mikhail Glukhikh
63ad89eeb0 Minor cleanup 2017-10-31 15:03:55 +03:00
Toshiaki Kameyama
ef71f7707d Introduce inspection to detect use of Unit as a standalone expression
So #KT-20631 Fixed
2017-10-31 14:51:06 +03:00
Toshiaki Kameyama
5f4233e4bf Don't suggest "Remove explicit type specification" for an annotated type
So #KT-20622 Fixed
2017-10-31 14:37:36 +03:00
Alexander Udalov
fbda2a4343 Do not use MockLibraryUtil in AbstractTopLevelMembersInvocationTest
MockLibraryUtil runs the compiler in the new class loader, which is
useful for IDE tests to avoid loading KotlinCoreEnvironment, but is not
needed and is suboptimal for compiler tests.

Also use another method in AbstractForeignAnnotationsTest to assert that
there are no files in the compiled libraries
2017-10-31 07:36:46 +01:00
Alexander Udalov
a64fc10e94 Extract compiler-executing code in AbstractCliTest to CompilerTestUtil 2017-10-31 07:36:46 +01:00
Alexander Udalov
8695c6a1e4 Extract GenerateCompilerTests out of GenerateTests
Rename the run configuration "Generate Tests" -> "Generate All Tests"
2017-10-31 07:36:46 +01:00
Alexander Udalov
d0274c3c53 Extract 'test-generator' module out of 'generators'
Also avoid using intellij API where kotlin-stdlib can be used instead
2017-10-31 07:36:45 +01:00
Alexander Udalov
d79b571781 Rename ultimate's GenerateTests -> GenerateUltimateTests, regenerate 2017-10-31 07:36:45 +01:00
Alexander Udalov
8786c951a6 Move compiler/tests-common-jvm6/{src -> tests}, adjust dependencies 2017-10-31 07:36:45 +01:00
Alexander Udalov
33549362cb Move compiler/tests-common/{src -> tests}, adjust dependencies 2017-10-31 07:36:45 +01:00
Alexander Udalov
c2276e2ccb Rename module ':compiler.tests-common' -> ':compiler:tests-common' 2017-10-31 07:36:45 +01:00
Alexander Udalov
ef00807a18 Refactor test class name computation in GenerateTests
Allow to pass the FQ name of the base test class, instead of the Class
object (to avoid dependencies on other modules)
2017-10-31 07:36:45 +01:00
Dmitry Jemerov
c009f94eea Restore task dependency which is needed to run the plugin correctly 2017-10-31 02:48:18 +01:00
Alexander Udalov
959299eeab Use project.findProperty instead of project.property where nullable is fine
findProperty throws MissingPropertyException if there's no such property
2017-10-30 15:53:06 +01:00
Alexander Udalov
ccd7bfa337 Add project property to change port for codegen tests on different JDKs 2017-10-30 15:40:17 +01:00
Alexander Udalov
152bcda2c8 Regenerate gradle/project-schema.json 2017-10-30 15:39:53 +01:00
Alexander Udalov
dfd24d166c Update bootstrap to 1.2.0-dev-439 2017-10-30 15:38:38 +01:00
Simon Ogorodnik
213ce01152 Update testData for completion, broken after KT-13220 2017-10-30 17:31:15 +03:00
Ilya Gorbunov
f878fa69c1 Android codegen tests: fix android SDK path in local.properties
The path should have slashes instead of backslashes even on Windows.
2017-10-30 16:48:39 +03:00
Ilya Gorbunov
1af692c957 Code style settings format changed in IDEA 173 2017-10-30 16:46:24 +03:00
Dmitry Petrov
cbef372e69 Recapture shared variables when calling local class constructor
When a local function or class A creates an instance of a local class B
capturing an outer variable 'x', it should use ref for 'x', but not the
value of 'x'.
2017-10-30 15:19:13 +03:00
Dmitry Petrov
7a156e4407 Give unique names to fields for captured local functions
When a local function is captured, corresponding field accesses are
later transformed by the inliner. It doesn't have enough information to
restore the original semantics completely, so it has to rely on field
names. Local functions can be overloaded or can have names matching
local variable names, in both cases we generated fields with the same
name for captured values.

Now, we use the same '$<local-class-number>' suffix for field names for
local functions as it is present in the corresponding local class name.
This allows to distinguish captured local functions from captured local
variables and between different overloads of a function with the same
name.

 #KT-19827 Fixed
 #KT-18639 Fixed
2017-10-30 15:19:13 +03:00
Dmitry Petrov
da99a100cc Additional constructor call normalization tests 2017-10-30 15:19:13 +03:00
Mikhail Glukhikh
149daa173c Do not report "unused receiver" on operator and infix functions
So #KT-16340 Fixed
2017-10-30 15:07:39 +03:00
Alexander Udalov
54990e16c1 Report error if tools.jar is not found in javac-wrapper 2017-10-30 12:36:55 +01:00
Mikhail Glukhikh
561d7749b1 Choose implementing module correctly in "create actual fix"
Take implements / expectedBy dependency into account
So #KT-20803 Fixed
2017-10-30 14:13:10 +03:00
Mikhail Glukhikh
f0da58531e Enhance AbstractQuickFixMultiModuleTest
Handle same files at different source roots correctly
2017-10-30 14:12:27 +03:00
Mikhail Glukhikh
cfd432614f Cleanup: QuickFixMultiModuleTest 2017-10-30 14:12:25 +03:00
Mikhail Glukhikh
64dbe07fdb Cleanup: UnusedReceiverParameterInspection 2017-10-30 14:12:16 +03:00
Alexey Andreev
1f643ddce8 JS: add test to prove that KT-11910 is not reproducible anymore 2017-10-30 13:12:12 +03:00
Alexey Andreev
6b43465ed8 JS: add tests to check if super.equals/hashCode works properly
See KT-8226
2017-10-30 13:12:10 +03:00
Alexey Andreev
e9e01b70a8 JS: fix super access to simple non-overridable properties
See KT-7653
2017-10-30 13:12:09 +03:00
Alexey Andreev
e488cf13ad JS: fix FE crashing when type argument count less than parameter count
See KT-20908
2017-10-30 13:10:35 +03:00
Alexey Andreev
a6e98c30d7 JS: fix crash when js function contains assignment with bad LHS
Fix KT-20905
2017-10-30 13:08:35 +03:00
Nicolay Mitropolsky
a11cf253df UAST: correct processing of string literals in string literals (KT-20990) 2017-10-30 11:29:51 +03:00
Yoshinori Isogai
11f9c055fd KT-20591: Show annotations in parameter info (#1358)
Show annotations in parameter info

 #KT-20591 Fixed
2017-10-27 22:59:04 +03:00
Alexander Udalov
2c4e023cba Minor, use extracted variable in LateinitIntrinsics.kt 2017-10-27 18:06:43 +02:00
Nikolay Krasko
d75656d571 Additional tests for overloads with type aliases and suspend
Failed attempts to reproduce KT-20782, but still may be useful.
2017-10-27 15:09:52 +03:00
Nikolay Krasko
2d7fe98e55 Don't resort deserialized descriptors based on renderer, preserve proto order
Use only names and types for sorting. Otherwise if deserialized descriptor
is rendered different from origin we might get Psi-Stub mismatch error.

Use the original proto order for declarations with same name and kind.

 #KT-20782 Fixed
 #EA-109887 Fixed
2017-10-27 15:09:04 +03:00
Nikolay Krasko
1408c4bd44 Fix testdata for ParcelQuickFixTestGenerated 2017-10-27 14:56:03 +03:00
Nikolay Krasko
3186c31ba7 Initialize delegate runner before access in filter method 2017-10-27 14:56:02 +03:00
Denis Zharkov
2df4d9496a Fix incorrect UNINITIALIZED_ENUM_COMPANION diagnostic
#KT-20959 Fixed
2017-10-27 09:36:00 +03:00
Sergey Ryabov
b3b08514c5 Use consistent explicit FileTreeWalk named parameters 2017-10-27 05:38:43 +03:00
Artem Zinnatullin
b565b00930 Fix Gradle plugin task name in readme. 2017-10-27 02:55:44 +03:00
Sergey Ryabov
d6504d82b7 Fix the doc for String.format and String.Companion.format 2017-10-27 02:53:09 +03:00
Ilya Zorin
5541634187 Explicitly set utf-8 encoding for JavaCompile tasks 2017-10-26 21:34:50 +03:00
Ilya Gorbunov
e8e09dbbf8 Various improvements in collection samples #KT-20357
Merge some related samples,
add sample for building a sequence from Enumeration similar to building a list from Enumeration.
2017-10-26 21:28:47 +03:00
Alexey Belkov
72354559e5 Provide samples for list, collection and array related functions #KT-20357 2017-10-26 21:28:47 +03:00
Alexey Sedunov
97332aaeea MPP: Support Mocha/Protractor run configuration for common modules
This is useful when they are implemented by JavaScript modules
2017-10-26 20:59:40 +03:00
Alexey Sedunov
3319fdba6d Gradle: Import test output path for JavaScript modules 2017-10-26 20:59:40 +03:00
Nikolay Krasko
ef274ad43b Don't build light classes when usages in Kotlin local scope requested 2017-10-26 17:58:07 +03:00
Nikolay Krasko
189e2506d1 Refactoring: extract isOnlyKotlinSearch function 2017-10-26 17:58:06 +03:00
Nikolay Krasko
55996fa43d Minor: extract scope initialization out of cycle 2017-10-26 17:58:05 +03:00
Dmitry Petrov
28535a57d8 Fix issues with enum entry self-reference
Given a singleton class 'S' with possibly uninitialized static instance
(enum entry, interface companion object).
Such singleton can be referenced by name, or as an explicit or implicit
'this'.
For a given singleton class 'S' we
either use 'this@S' from context (local or captured),
or 'S' as a static instance.

Local or captured 'this@S' should be used if:
  - we are in the constructor for 'S',
    and corresponding instance is initialized
        by super or delegating constructor call;
  - we are in any other member of 'S' or any of its inner classes.

Otherwise, a static instance should be used.
2017-10-26 16:11:58 +03:00
Dmitry Jemerov
dd9f12d2e5 Removed dependencies on removed tasks 2017-10-26 14:23:56 +02:00
Dmitry Jemerov
a1949e1d53 Add formatting rule for array literals
#KT-19599 Fixed
2017-10-26 14:10:12 +02:00
Nikolay Krasko
6420f50f2e Fix accessing nullable location() method 2017-10-26 13:15:51 +03:00
Ilya Gorbunov
3fe2298855 Do not run android codegen tests with plugin, introduce a separate task 2017-10-25 21:37:24 +03:00
Ilya Gorbunov
6c5d78d8d5 Remove deprecated build tasks 2017-10-25 21:37:24 +03:00
Ilya Gorbunov
ace9d0da94 Finalize math function parameter names
#KT-4900
2017-10-25 21:30:03 +03:00
Alexey Andreev
bbcf4f7caf JS: raise metadata version due to incompatible changes in 1.2 runtime 2017-10-25 20:18:04 +03:00
Alexey Andreev
85945e0a6d JS: add getFunctionById intrinsic 2017-10-25 20:18:04 +03:00
Alexey Andreev
aae67e154a JS: add intrinsic for !!. Use it instead of ternary conditionals
See KT-2976
2017-10-25 20:18:03 +03:00
Simon Ogorodnik
8631e898a7 KT-12797: Fix completion to show inner classes from base class
#KT-12797 fixed
2017-10-25 18:07:37 +03:00
Simon Ogorodnik
5778ace6b0 KT-20166: Replace type name when caret is at the end of param name
When caret is at the end ('f<caret>: Foo'), tokenAt was COLON,
not IDENTIFIER

#KT-20166 fixed
2017-10-25 18:07:01 +03:00
Simon Ogorodnik
d12f5c79a1 KT-20506: Fix completion suggests the same value recursively
Check for excludeNonInitializedVariable via PSI, not by
descriptors equality, because of bindingContext caching

#KT-20506 fixed
2017-10-25 18:05:46 +03:00
Simon Ogorodnik
cf160b5a07 Cleaner way to insert whitespace in doc comment 2017-10-25 17:54:48 +03:00
Simon Ogorodnik
98310d3bdb KT-20884: Support receiver reference in KDoc comments
#KT-20884 fixed
2017-10-25 17:54:47 +03:00
Simon Ogorodnik
94e39a4c6c KT-20888: Do not report missing documentation when inherit from lib
Find KDoc using DescriptorToSourceUtilsIde when required

 #KT-20888 fixed
2017-10-25 17:54:46 +03:00
Simon Ogorodnik
fb876e398c Correctly detect visibility in KDocMissingDocumentationInspection
#KT-20887 fixed
 #KT-20889 fixed
2017-10-25 17:54:45 +03:00
Simon Ogorodnik
f21e1c60e0 KT-20883: Add more details to MissingDocumentationInspection message
#KT-20883 fixed
2017-10-25 17:54:43 +03:00
Simon Ogorodnik
d28e9fd22d KT-20880: Fix AddDocumentationFix to add multiline comment
#KT-20880 fixed
2017-10-25 17:54:42 +03:00
Denis Zharkov
be630f93dd Postpone full resolution for a candidate known to be failed
It's necessary for performance, because there are some resolution
parts that actually can be omitted and at the same time they aren't
very cheap (like inference or value arguments types checking)
2017-10-25 16:33:04 +03:00
Nikolay Krasko
6a43743c98 Configure new projects with kotlin-stdlib-jdk7/8 (KT-20286)
No migration for old projects has been added yet.

 #KT-20286 Fixed
2017-10-25 15:01:10 +03:00
Pavel V. Talanov
b7b3caedcc IDELightClassContexts: fix light member mismatch on InlineOnly members 2017-10-25 14:48:32 +03:00
Mikhael Bogdanov
54d1a85430 Disable 'apiVersionAtLeast1.kt' test on Android 2017-10-25 13:43:48 +02:00
Mikhael Bogdanov
33c0e16b83 Disable some test on Android 2017-10-25 12:26:41 +02:00
Alexander Udalov
e73760d4ff Fix test data for empty LHS vs isInitialized
Ignore the "property imported from object" part on JS
2017-10-25 12:10:10 +02:00
Dmitry Petrov
42945d33ee Use !LANGUAGE directive in tests for enhanced nullability 2017-10-25 12:30:32 +03:00
Dmitry Petrov
706a3698ec Add box tests for new nullability assertions 2017-10-25 12:30:32 +03:00
Dmitry Petrov
2a7d555be4 Minor: move nullability assertion tests javaInterop/notNullAssertions 2017-10-25 12:30:32 +03:00
Dmitry Petrov
57602c420d Sanitize declaration return types
On JVM, strip @EnhancedNullability annotation from inferred types for
functions, properties, and local variables, so that these annotations
do not "escape" from Kotlin declarations.
2017-10-25 12:30:32 +03:00
Dmitry Petrov
2b924f44d8 Generate assertions for expressions with enhanced nullability
If an expression with type annotated with @EnhancedNullability is used
as a function expression body, or property initializer, or variable
initializer, and corresponding type can not contain null,
generate nullability assertions for this expression.
2017-10-25 12:30:32 +03:00
Dmitry Petrov
6c47b4a39c Language feature for nullability assertions on enhanced nullability 2017-10-25 12:30:32 +03:00
Alexey Tsvetkov
313cd4f7bc Turn off IC for multiplatform projects by default
Multiplatform IC is enabled when a corresponding platform property is enabled
and 'kotlin.incremental.multiplatform' is set to `true`.

See KT-20840
2017-10-25 01:12:34 +03:00
Ilya Chernikov
caca7c67f4 Fix "base" jar and "public" jar tasks archive name conflict
fixes KT-20877
2017-10-24 20:28:54 +02:00
Ilya Gorbunov
b88d74d29b Remove annotation processor example from maven build
It is already built with gradle and used only in gradle tests
2017-10-24 20:35:53 +03:00
Ilya Gorbunov
f456fa9697 Adjust gradle jvmargs
Remove memory options for gradle daemon and instead give more memory to kotlin compile daemon.
2017-10-24 20:35:50 +03:00
Ilya Gorbunov
97cf09b45a Do not fail build on TC when some tests fail, just report problem
Required to have green builds with failing tests muted.
2017-10-24 20:35:47 +03:00
Ilya Gorbunov
84c0e8dfb4 Enable coroutines in kotlin-stdlib-common 2017-10-24 20:35:43 +03:00
Ilya Gorbunov
40574949c7 Postpone some task configuration to execution phase 2017-10-24 19:59:45 +03:00
Ilya Gorbunov
b1dcab886b Remove deprecated task 2017-10-24 19:59:45 +03:00
Ilya Gorbunov
25988957f7 Remove duplicated string-to-number conversion tests
Actual ones are in StringNumberConversionTest.kt
2017-10-24 19:59:45 +03:00
Vyacheslav Gerasimov
b27334d2a0 Remove GradleProjectImportProvider and GradleProjectOpenProcessor 2017-10-24 19:50:19 +03:00
Nicolay Mitropolsky
1fa5152cb7 UAST: Fix for unsafe cast for class initializer (EA-109918) 2017-10-24 19:39:38 +03:00
Alexander Udalov
1a8be635b9 Use ServiceLoader instead of IntelliJ extensions for DefaultErrorMessages
#KT-10473 Fixed
2017-10-24 18:25:38 +02:00
Alexander Udalov
1c6dce3674 Do not use DefaultErrorMessages.Extension as IntelliJ extension in plugins 2017-10-24 18:22:04 +02:00
Alexander Udalov
58631053c7 Fix project scope "IDE" after migration to Gradle build
See https://www.jetbrains.com/help/idea/scope-language-syntax-reference.html
2017-10-24 18:22:04 +02:00
Alexey Tsvetkov
e83f1b138b Perform non-IC build when JS lib is changed 2017-10-24 16:28:57 +03:00
Mikhael Bogdanov
be6474593d Additionally run android tests with enabled D8 2017-10-24 15:26:21 +02:00
Mikhael Bogdanov
dd24ba6978 Convert CodegenTestsOnAndroidRunner to Kotlin 2017-10-24 15:26:21 +02:00
Mikhael Bogdanov
37300f7486 Rename CodegenTestsOnAndroidRunner.java to CodegenTestsOnAndroidRunner.kt 2017-10-24 15:26:20 +02:00
Mikhael Bogdanov
6f5d459e09 Reorganize build logic in AndroidTestGenerator.kt 2017-10-24 15:26:20 +02:00
Mikhael Bogdanov
e151b8f641 Update Android tests 2017-10-24 15:26:19 +02:00
Dmitry Jemerov
499cfb5772 Show "No SDK configured" notification only in JVM modules 2017-10-24 14:52:12 +02:00
Alexey Sedunov
8a9e28afdc Kotlin Facet: Ensure that API version <= language version after import
#KT-20603 Fixed
2017-10-24 15:43:52 +03:00
Alexey Sedunov
840825704a Misc: Skip duplicates in navigation tests 2017-10-24 15:43:52 +03:00
Alexey Sedunov
4cc1e22a5a Misc: Support light-methodless members in overrider search
In particular, support line markers for expect-class members
and navigation to expect-class members from corresponding base members
2017-10-24 15:43:51 +03:00
Alexey Sedunov
17abce2811 Misc: Support light-classless classes in inheritors search
In particular, support line markers for expect-classes
and navigation to expect-classes from their base class

 #KT-20329 Fixed
2017-10-24 15:43:51 +03:00
Alexey Sedunov
87f3d24f9b Misc: Protect freeArgs with FreezableVar 2017-10-24 15:43:51 +03:00
Alexey Sedunov
fa4e4cbb42 Formatter: Insert new line before/after type alias
#KT-20766 Fixed
2017-10-24 15:43:51 +03:00
Dmitry Petrov
f23dfdc0ac Mark operands of POP2 as don't touch in unused expression elimination
Fixes KT-20879.
2017-10-24 15:38:15 +03:00
Dmitry Jemerov
537600b3b3 Add dependency to kotlin-test-annotations-common to new MP projects
#KT-20833 Fixed
2017-10-24 14:18:34 +02:00
shiraji
d51fa6d87e Add description for MoveMemberToTopLevelIntention 2017-10-24 14:33:55 +03:00
Alexander Udalov
bafc75ade4 Fix isInitialized receiver generation for empty LHS
#KT-20774 Fixed
2017-10-24 11:26:01 +02:00
Mikhail Zarechenskiy
73b3efd628 Remove LANGUAGE_VERSION directive from blackBox codegen tests 2017-10-24 11:44:02 +03:00
Mikhail Zarechenskiy
7a934d74e5 Support !LANGUAGE directive in codegen tests
LANGUAGE_VERSION directive will be removed later, for now it's left for simplicity
2017-10-24 11:44:02 +03:00
Mikhail Glukhikh
1ed8aa1cc5 Drop CheckPartialBodyResolveAction 2017-10-24 10:06:09 +03:00
Mikhail Glukhikh
5a6f22cc95 Make editor in SelfTargetingIntention.invoke nullable
This prevents EA-105844 from happening.
Should fix KT-20899.
2017-10-24 10:05:10 +03:00
Dmitry Petrov
68870a16bb Remove CLI help on 'preserve-class-initialization' mode
See https://youtrack.jetbrains.com/issue/KT-19532#comment=27-2492178
2017-10-24 09:36:56 +03:00
Ilya Gorbunov
75c8b787c2 Fix maven tests
- Add required extra dependencies to install to local repo before test.
- Remove expected warning about runtime bundled into compiler because it is no more.
- Fix basedir reference in kapt-allopen test.
- Fix reflection tests after deprecated members removal.
2017-10-23 21:23:36 +03:00
Ilya Gorbunov
25feb23cfa Update maven-invoker-plugin to deal with missing mvn.bat in maven 3.3 2017-10-23 21:23:13 +03:00
Alexander Udalov
f2be34ca1c Support KClass<*> annotation arguments in serialization/deserialization
#KT-11586 Fixed
2017-10-23 19:16:44 +02:00
Mikhail Glukhikh
d0e8f99d60 ResolveElementCache: script can now be analyzable parent
So #KT-20096 Fixed
2017-10-23 19:19:04 +03:00
Simon Ogorodnik
cace6624e6 EA-105522, KT-20256: Fix TextRange.<init> "Invalid range specified"
Check when caret inside template, and don't try to create invalid
range then

 EA-105522 fixed
 #KT-20256 fixed
2017-10-23 17:32:39 +03:00
shiraji
31a1fb916a Implement an intention action to move a companion object member to top level
#KT-18828 Fixed

(cherry picked from commit 11f8f8b)
2017-10-23 17:29:28 +03:00
shiraji
7044e46756 Refactor common move member methods
(cherry picked from commit 2dd8148)
2017-10-23 17:29:27 +03:00
Alexey Andreev
6adb62f3a2 JS: prohibit declaration names that clash with JS builtin functions
See KT-18095, KT-17475, KT-18105, KT-5259
2017-10-23 17:19:52 +03:00
Alexey Andreev
e0eea15a4c Fix JS tests failing on Windows 2017-10-23 17:19:51 +03:00
Alexey Andreev
e1f8bac4d5 JS: several bugfixes in incremental compilation
1. Fix exported packages sometimes being mixed up
2. Fix metadata losing package fragments sometimes
3. Don't serialize empty packages to .meta.js
4. Preserve order of package fragments in .meta.js
5. In IC tests, compare textual representation of metadata rather
   than binary representation
2017-10-23 17:19:51 +03:00
Alexey Andreev
2fbecfdd9c Support generation of relative path in JS source maps in JPS builder
See KT-20820
2017-10-23 17:19:50 +03:00
Alexey Andreev
cb0482f53e JS: fix crash when js function contains for statement w/o initializer
Fix KT-20898
2017-10-23 17:19:49 +03:00
Alexey Andreev
d9d565d8b0 JS: use 'external' word instead of 'native' in diagnostic messages
See KT-20639
2017-10-23 17:19:48 +03:00
Nicolay Mitropolsky
8a34c48d56 AbstractUastTest: findUElementByTextFromPsi refactored for readability 2017-10-23 16:44:43 +03:00
Nicolay Mitropolsky
8e17bab56f UastKotlinPsiVariable: factory methods reformatting 2017-10-23 16:44:43 +03:00
Dmitry Jemerov
81615fa551 Correctly propagate dependencies in multiplatform projects with Android 2017-10-23 14:59:56 +02:00
Dmitry Jemerov
cc85ac44b3 Rename KotlinPlatformGradleDetector to KotlinGradleModelFacade 2017-10-23 14:59:56 +02:00
Dmitry Jemerov
f589c9baf0 Ignore "module per source set" option in Android projects 2017-10-23 14:59:56 +02:00
Dmitry Jemerov
14a30e09c6 Use binary path instead of name to locate libraries from Android deps 2017-10-23 14:59:56 +02:00
Toshiaki Kameyama
e76d8bc793 "Convert object literal to class" should create inner class if necessary #KT-20091 Fixed 2017-10-23 15:02:51 +03:00
Nicolay Mitropolsky
299a4b7f69 UAST: Fix for unsafe cast for annotation (EA-109738) 2017-10-23 10:57:00 +03:00
Nicolay Mitropolsky
c5fa7fb217 UAST: tests utils for bottom-top finding UElements moved to AbstractUastTest.kt 2017-10-23 10:57:00 +03:00
Zalim Bashorov
f9809d5a73 Minor: replace IGNORE_BACKEND with TARGET_BACKEND for the test what should be run only on JVM
The test was written to check the case for Platform Types which now exists only on JVM.
2017-10-20 21:02:10 +03:00
nickl
6a659f33b5 UastKotlinPsiVariable psiParent made lazy to eliminate recursion when building UAST parents 2017-10-20 19:46:49 +03:00
Anton Bannykh
b2e53644a5 JPS JS: fix friend path detection in projects imported from Gradle (KT-18963 fixed) 2017-10-20 19:16:14 +03:00
Mikhail Glukhikh
739b21f519 Introduce "add missing actual members" quick-fix #KT-18449 Fixed 2017-10-20 17:24:19 +03:00
Mikhail Glukhikh
1b0421d27b Fix search scope during inlining #KT-20251 Fixed
Do not use KotlinSourceFilterScope because build scripts are lost otherwise
2017-10-20 16:00:52 +03:00
Mikhail Glukhikh
26c1aec5df Related to DSGN-4505: change expect / actual icons to the new ones 2017-10-20 15:16:04 +03:00
Mikhail Glukhikh
4b8c04a3d6 Minor: fix typo 2017-10-20 15:16:03 +03:00
Toshiaki Kameyama
fa03632197 Convert lambda to reference: handle named arguments more precisely
For trailing lambda intention inserts parameter names for all arguments
if at least one argument used default value.
Otherwise it just keeps existing named arguments.

So #KT-20349 Fixed
2017-10-20 13:57:58 +03:00
Kirill Rakhman
4c4427c280 Replace return@forEach with continue in ConvertForEachToForLoopIntention
So #KT-17332 Fixed
2017-10-20 13:44:31 +03:00
Denis Zharkov
da52716bfd Fix wrong nullability enhancement for annotated java.lang.Object type
Effectively, this commit drops cached value for j.l.Object type
This cache was introduced when types were immutable, but they
became mutable after starting reading top-level TYPE_USE annotations,
that lead to changing shared JAVA_LANG_OBJECT_CLASSIFIER_TYPE instance

 #KT-20826 Fixed
2017-10-20 09:43:38 +03:00
Alexey Tsvetkov
3c9ef6d319 Compile kotlin-android-extensions-runtime for JDK 1.6 2017-10-20 00:02:46 +03:00
Sergey Igushkin
b921eb5cc9 Fix null returned from listFiles and not handled correctly.
(cherry picked from commit 8147ae8)
2017-10-19 23:30:15 +03:00
Anton Bannykh
e90c914802 JS: add kotlin-test testCompile dependency to JS module generated by multiplatform wizard (KT-20346, KT-20831, KT-20832 fixed) 2017-10-19 18:32:24 +03:00
Dmitry Savvinov
5b9b8778b5 Minor: rename 'mapToPlatformClasses' -> 'mapToPlatformIndependentClasses' 2017-10-19 18:21:56 +03:00
Dmitry Savvinov
58b815d842 Fix false USELESS_CAST in function with expression body
Note that current behaviour is made similar to the case with
properties initializers/accessors, which means that more complex
cases are not covered yet (see KT-20801) #KT-20802 fixed.
2017-10-19 18:21:56 +03:00
Dmitry Savvinov
a1778a7da8 Fix CAST_NEVER_SUCCEEDS when casting Nothing to some type 2017-10-19 18:21:56 +03:00
Nikolay Krasko
bd2fd1758f Use CompilerPathsEx.getOutputPaths for getting the full list of output dirs (KT-20789)
CompilerPathsEx.getOutputPaths isn't using OrderEnumerationHandler extension
so far and works badly when delegating runnners to gradle is enabled.

 #KT-20789 Fixed
2017-10-19 17:43:36 +03:00
Kartik Patodi
dc6c19d7ef Normalize files that are gotten from FileUtil.createTempDirectory
It's required to avoid getting different paths inside tools (compiler, ant etc) and in tests.
2017-10-19 16:12:13 +03:00
Ilya Chernikov
5284db8088 Add compiler proguard rule for keeping ProgressManager used in webdemo 2017-10-19 13:55:00 +02:00
Sergey Mashkov
fd12bd904b KT-20822 Maven: import multiplatform projects properly 2017-10-19 13:29:26 +03:00
Alexey Andreev
b781661279 JS: fix copying functions with default arguments across interfaces
Copy function to super interface first, then copy from interface
to class. Add interface set to JsClassModel for this purpose.

See KT-20625
2017-10-19 13:10:47 +03:00
Alexey Andreev
d4ea4983d8 JS: support integer overflow semantics for unary minus operator
See KT-19290
2017-10-19 12:59:09 +03:00
Dmitry Petrov
f25a5b5177 Use -Xnormalize-constructor-calls=enable for Kotlin/JVM compilation only 2017-10-19 11:17:56 +03:00
Simon Ogorodnik
7a991ddc25 KT-13220: Add completion for variable names
Using parameter name completion

#KT-13220 fixed
2017-10-18 19:11:13 +03:00
Alexey Sedunov
e65adeb029 Misc: Fix quickfix test data 2017-10-18 18:17:50 +03:00
Alexey Sedunov
b8fb002a8f Misc: Update keyword completion test data
It reflects top-level lateinit variables available since 1.2
2017-10-18 18:17:50 +03:00
Alexey Sedunov
d89a946c5a Misc: Update default language version in Maven import test 2017-10-18 18:17:50 +03:00
Alexey Sedunov
d6ee9c9068 Misc: Update member hierarchy test data to include new stdlib classes 2017-10-18 18:17:50 +03:00
Alexey Sedunov
83b10403d7 Misc: Drop test for implementing abstract members in expect-class
The "not implemented" error is not reported for such classes, so
quick fix is not available anymore (see KT-16099)
2017-10-18 18:17:50 +03:00
Alexey Sedunov
997aa12bcc Misc: Update configuration test data 2017-10-18 18:17:50 +03:00
Alexey Sedunov
2883a92b93 Create from Usage: Work around type renaming
This fixes test failure after changes in KotlinTypeFactory
2017-10-18 18:17:49 +03:00
Alexander Udalov
6820509f83 Regenerate gradle/project-schema.json 2017-10-18 12:48:16 +02:00
Alexander Udalov
6e410cb182 Make TypeConstructor.isFinal return false for enums
The reason is that before dc02b2e3ab and 8a0dcca957,
TypeConstructor.isFinal for some class descriptors
(DeserializedClassDescriptor, LazyJavaClassDescriptor,
MutableClassDescriptor) were implemented as `isFinalClass` (which is
`modality == FINAL && kind != ENUM_CLASS`), and all others as
`modality == FINAL` or simply true/false. This led to differences in
behavior depending on the exact instance of the class descriptor.
Now that TypeConstructor.isFinal is always `modality == FINAL`, some
tests (PseudoValueTestGenerated) fail because the finality of some type
constructors changed and these tests render final vs non-final type
constructors differently.

In this commit, TypeConstructor.isFinal is now made to behave safer,
i.e. considering enum class type constructor to be non-final (as was the
case earlier for some ClassDescriptor instances). Some diagnostics might
disappear (e.g. FINAL_UPPER_BOUND) but it doesn't look like a big deal
2017-10-18 12:45:45 +02:00
Alexander Udalov
825aff7ac6 Minor, do not produce trailing spaces in AbstractPseudoValueTest 2017-10-18 12:45:45 +02:00
Pavel V. Talanov
320c5f6f3a Try to approximate "build.gradle.kts" script dependencies on first access
This is a hacky solution to prevent whole file being highlighted as unresolved while we wait for gradle response
2017-10-17 18:49:48 +03:00
Pavel V. Talanov
1cdac78b32 ScriptDependenciesCache, refactor: use delegated properties 2017-10-17 18:49:40 +03:00
Alexey Tsvetkov
896dacc835 Fix android extensions maven dependencies
`kotlin-android-extensions-runtime` and `kotlin-android-extensions-compiler`
had `com.google.android:android` as a provided dependency, but
during transition to Kotlin Gradle build the dependency was declared
as `runtime` instead of `compileOnly`.
2017-10-17 18:35:28 +03:00
Ilya Gorbunov
eaa3b3ccf0 Enable publishing for kotlin-annotations-android 2017-10-17 17:32:22 +03:00
Stanislav Erokhin
0a2421d453 Disable annotation processor for javac by default in whole project 2017-10-17 17:25:25 +03:00
Sergey Igushkin
d453a2fc92 Use runtimeJar configuration instead of default for plugin markers. 2017-10-17 14:37:11 +03:00
Andrey Breslav
a0da37fd41 Fix the description file 2017-10-17 12:13:22 +02:00
Anton Bannykh
f92c4b7704 Fixed indentation 2017-10-17 13:04:35 +03:00
Anton Bannykh
6d6ce7cbab JS: publish to NPM sourcemaps and *.kjsm files 2017-10-17 13:04:35 +03:00
Nikolay Krasko
6804409fc5 Fix idea version to 2017.2.5 (172.4343.14) 2017-10-17 12:33:01 +03:00
Nikolay Krasko
0ce4873312 Extract variable for idea download 2017-10-17 12:33:01 +03:00
Nikolay Krasko
c4e3cc0705 Add read action for getting text
Fix "Read access is allowed... exception"
2017-10-17 12:33:01 +03:00
Nikolay Krasko
339b1a3895 Minor: cleanup 2017-10-17 12:33:01 +03:00
Nikolay Krasko
3fda173ced TypeDeclarationProvider should return null for irrelevant symbols
Otherwise other providers won't be checked.
2017-10-17 12:33:01 +03:00
Alexey Sedunov
9fe0681fb6 MPP: Fix implementing module search in Gradle runner 2017-10-16 23:55:28 +03:00
Alexey Sedunov
db34bae05b Gradle: Support 'expectedBy' configuration 2017-10-16 23:55:28 +03:00
Alexey Sedunov
a2a8335bab Gradle: Add dependencies for indirectly implemented modules
#KT-16926 Fixed
2017-10-16 23:55:28 +03:00
Sergey Igushkin
0a808528b7 Fix missing ReflectUtil, call the ctor through reflection manually. 2017-10-16 21:48:38 +02:00
Sergey Igushkin
e94e62be98 Add android-extensions-compiler content to kotlin-android-extensions 2017-10-16 21:48:36 +02:00
Ilya Chernikov
431d47a605 Fix dependencies rewriting and gradle integration tests after applying rewriting 2017-10-16 21:48:36 +02:00
Ilya Chernikov
050403d15b Use rewriteDeps task on the projects with runtime dependency on embeddable compiler...
which are using shaded dependencies
2017-10-16 21:48:35 +02:00
Ilya Chernikov
fb70227868 Move embeddable compiler shading logic to buildSrc, implement rewriteDeps task
the task takes a jar an a shading task (like the one that creates embeddable
compiler) and rewrites jar's dependencies to the shaded ones according the
the shade task.
2017-10-16 21:48:34 +02:00
Ilya Chernikov
5babf89245 Remove original jar artifact from archives when adding a new one by runtimeJar tasks 2017-10-16 21:48:33 +02:00
Yan Zhulanow
6fb1e269b4 Minor: Fix build, add missing Android library dependency JARs 2017-10-16 22:43:09 +03:00
Yan Zhulanow
43a1162b25 Evaluate: Fix for evaluating local variables captured by an inline function (KT-17514) 2017-10-16 21:25:44 +03:00
Yan Zhulanow
fed5bddde2 Android Extensions: Initial IC support (KT-14125) 2017-10-16 21:25:42 +03:00
Yan Zhulanow
1b5b9f1fbb Kapt: Support 'correctErrorTypes' in annotations (KT-19518) 2017-10-16 21:25:41 +03:00
Yan Zhulanow
91ed130286 Add additional diagnostic for EA-107110 2017-10-16 21:25:40 +03:00
Yan Zhulanow
58571dcf1d Fix KNPE in evaluator (EA-89384) 2017-10-16 21:25:39 +03:00
Yan Zhulanow
8c7f469030 Parcelable: Use @IgnoredOnParcel annotation instead of Transient cause it's inapplicable on properties (KT-20298) 2017-10-16 21:25:37 +03:00
Yan Zhulanow
cafd99660a Minor: Make class abstract to get rid of the warning in tests 2017-10-16 21:25:36 +03:00
Yan Zhulanow
27d3ed76a0 Android Extensions: Support non-latin identifiers (KT-20299) 2017-10-16 21:25:34 +03:00
Yan Zhulanow
eefad896a0 Kapt: Mark 'kapt.kotlin.generated' as a source root automatically in Android projects (KT-20269) 2017-10-16 21:25:33 +03:00
Yan Zhulanow
50ab054883 Kapt: Preserve kapt plugin options if there are also options from compiler plugins (KT-20257) 2017-10-16 21:25:32 +03:00
Yan Zhulanow
d89143e641 Kapt: Report info log messages as warnings
Otherwise the log messages are not visible until the "--info" options is provided in Gradle.
2017-10-16 21:25:31 +03:00
Yan Zhulanow
2034b1f075 Parcelable: Provide quick fixes for custom Parceler support 2017-10-16 21:25:29 +03:00
Yan Zhulanow
a63aca08f2 Parcelable: Support custom Parcelers in compiler plugin 2017-10-16 21:25:27 +03:00
Yan Zhulanow
7dbefc1613 Remove generic bound for Parceler 2017-10-16 21:25:25 +03:00
Yan Zhulanow
a4f06c9fa8 Kapt: Do not inline R.resType.resName constants in annotations (KT-18791) 2017-10-16 21:25:24 +03:00
Mikhail Glukhikh
eba2fdfe89 Fix inline test 2017-10-16 21:06:18 +03:00
Stanislav Erokhin
fde1ac5575 Add test for ExpectedTypeFromCast feature 2017-10-16 20:10:57 +03:00
Mikhail Glukhikh
3fb0354676 Minor: add / fix comments (related to KT-20752) 2017-10-16 20:00:47 +03:00
Alexey Andreev
46526db8f0 JS: fix behaviour of char-returning functions with multiple inheritance
See KT-19772
2017-10-16 18:56:33 +03:00
Ilya Gorbunov
13d6e96c2f Do not pack build.txt into jars, leave it only in artifact zip bundles 2017-10-16 18:48:09 +03:00
Ilya Gorbunov
3bea095618 Remove maven poms that are no longer submodules of the main project 2017-10-16 18:48:09 +03:00
Ilya Gorbunov
ef3b0e0ff0 Add kotlin-test parent project 2017-10-16 18:48:09 +03:00
Ilya Gorbunov
13086b4347 Exclude node_modules dir from kotlin-stdlib-js project
Minor: shorter IdeaModel configuration.
2017-10-16 18:48:09 +03:00
Ilya Gorbunov
65d9b0edb3 Migrate settings and run configurations from the former libraries subproject 2017-10-16 18:48:09 +03:00
Ilya Gorbunov
341edc3f86 Fork java compiler to ensure forkOptions are used 2017-10-16 18:48:09 +03:00
Ilya Gorbunov
93efc51843 Fix the obsolete form of -Xdump-declarations-to argument 2017-10-16 18:48:09 +03:00
Stanislav Erokhin
b9fa8d4d96 Support parenthesized left expression for ExpectedTypeFromCast 2017-10-16 18:28:57 +03:00
Pavel V. Talanov
539e655802 PluginDeclarationProviderFactory: improve diagnostic
Attempting to catch EA-103048
2017-10-16 18:18:36 +03:00
Mikhail Glukhikh
e73e4dcc6a Delay elvis-bound smart casts to version 1.3 2017-10-16 16:21:46 +03:00
Mikhail Glukhikh
a55c6f0c95 Don't register safe cast type info for unstable values
Important: to be removed in 1.3
So #KT-20752 Fixed
2017-10-16 16:21:45 +03:00
Denis Zharkov
8ae3dbdcfc Refine ClassDescriptor::isCommonFinalClass definition
Do not treat annotations as final classes as they are not final in Java

 #KT-20776 Fixed
2017-10-16 16:11:35 +03:00
Alexander Udalov
03baa51f82 Write isPreRelease into JvmBuildMetaInfo for non-stable language version 2017-10-16 15:09:37 +02:00
Alexander Udalov
8b0b334601 Extract shouldWritePreReleaseFlag(), use in JS as well as JVM
Fix the difference in behavior between JS and JVM
2017-10-16 15:09:36 +02:00
Alexander Udalov
0510c553c3 Mark class files as pre-release if language version > LATEST_STABLE
#KT-20547 Fixed
2017-10-16 15:09:36 +02:00
Alexander Udalov
3665255a2b Extract skipPreReleaseCheck out of DeserializationConfiguration.skipMetadataVersionCheck 2017-10-16 15:09:36 +02:00
Alexander Udalov
8a0dcca957 Do not consider 'expect' class type constructors final
Because even a final expected class can be actualized with an open
actual class and thus have subtypes in the platform code
2017-10-16 15:08:50 +02:00
Alexander Udalov
0a861fd4ed Minor, refine return type of AbstractClassTypeConstructor.getDeclarationDescriptor 2017-10-16 15:08:50 +02:00
Alexander Udalov
dc02b2e3ab Fix TypeConstructor.isFinal for synthetic class descriptors
As in LazyClassTypeConstructor.isFinal, check if the class modality is
Modality.FINAL
2017-10-16 15:08:50 +02:00
Alexander Udalov
2682837fd7 Support 'expect final' -> 'actual open' for callables
#KT-17944
2017-10-16 15:08:50 +02:00
Alexey Sedunov
ee9a6ca53e Introduce Type Parameter: Do not show duplicate dialog under write action
#KT-20335 Fixed
2017-10-16 16:04:39 +03:00
Alexey Sedunov
25b6dac7b5 Introduce Type Alias: Don't change non-nullable type to nullable alias
#KT-15840 Fixed
2017-10-16 16:04:39 +03:00
Alexey Sedunov
1c3a3cd651 Introduce Parameter: Forbid inside of default values 2017-10-16 16:04:39 +03:00
Alexey Sedunov
790b615fa1 Introduce Parameter: Fix parameter name validation
Respect existing parameter names and fix some exceptions

 #KT-19439 Fixed
 #KT-20402 Fixed
 #KT-20403 Fixed
2017-10-16 16:04:39 +03:00
Alexey Sedunov
bf3769f37e Introduce Parameter: Forbid inside of annotation entries
#KT-18594 Fixed
2017-10-16 16:04:38 +03:00
Alexey Sedunov
e2fd9a71df Rename: Search text occurrences by declaration FQ name
#KT-17949 Fixed
 #KT-15932 Fixed
2017-10-16 16:04:38 +03:00
Alexey Sedunov
e68f8d6d45 Kotlin Ultimate: Support Protractor run configurations for module directory 2017-10-16 16:04:38 +03:00
Ilya Gorbunov
18d4b91b2d Minor: improve message from future for use and useLines
Annotate RequireKotlin and apiVersionIsAtLeast with SinceKotlin
2017-10-15 21:40:17 +03:00
Ilya Gorbunov
88bb14d0b4 Add kotlin-test-junit dependency to compiler stdlib tests 2017-10-15 21:40:15 +03:00
Ilya Gorbunov
20b122c1dd Use kotlin.test.Test instead of org.junit.Test in common stdlib tests
(and in jvm-only and js-only tests also)
2017-10-15 17:40:53 +03:00
Ilya Gorbunov
f002493218 Multiplatform test annotations
Actual annotations are provided in kotlin-test-junit on JVM side
and in kotlin-test-js on JS side.

#KT-19696
2017-10-15 17:40:53 +03:00
Anton Bannykh
4b1b847f0a Updated the forum link in NPM README.md templates 2017-10-14 02:18:43 +03:00
Anton Bannykh
2d3929ee58 JS: add ant tasks for publishing kotlin-test-js to NPM (KT-19682) 2017-10-14 02:18:43 +03:00
Anton Bannykh
7076fda542 JS: added back integration test for @BeforeTest and @AfterTest annotations
The test was removed in e5cfd198c7 in order
to prevent gradle tests from crashing when running with the old compiler.
2017-10-14 02:16:22 +03:00
Anton Bannykh
b5d32f420d JS: correct Double and Float conversions to Int (KT-8374 fixed) 2017-10-13 20:29:28 +03:00
Alexander Udalov
a52d719943 Fix Java9ModulesIntegrationTest.testDependencyOnReflect
Since javac is invoked on a module-info with a reference to the module
kotlin.reflect, we need to pass kotlin-reflect.jar in the module path
2017-10-13 18:45:45 +02:00
Ilya Gorbunov
863727955f Annotate inline use and useLines with RequireKotlin
Compiler version 1.2 is required to use 'use' and inline functions from stdlib that call it.
2017-10-13 18:56:05 +03:00
Ilya Gorbunov
cc150ca832 Make Closeable.use call addSuppressed
Call addSuppressed when it's provided by the supplementary artifact for jdk7, and only when targeting apiVersion > 1.1

#KT-18961 Fixed
2017-10-13 18:56:05 +03:00
Ilya Gorbunov
3ab7946c4d Introduce apiVersionIsAtLeast function to branch in inlines
#KT-16028
2017-10-13 18:56:05 +03:00
Ilya Gorbunov
485ca10b84 Improve failed assertSame/NotSame messages, correct tests 2017-10-13 18:53:52 +03:00
Jake Wharton
e611b9a9ba Add assertSame and assertNotSame methods. 2017-10-13 18:53:52 +03:00
Dmitry Savvinov
edd3f76e7b Add contract for takeUnless 2017-10-13 18:43:39 +03:00
Dmitry Savvinov
0b88e7cfd0 Annotate contract DSL with @SinceKotlin 2017-10-13 18:43:39 +03:00
Alexander Udalov
5f775497e2 Add Kotlin package FQ name to kotlin.Metadata
It might differ from the JVM package FQ name if the JvmPackageName
annotation is used. This will be useful for faster indexing in the IDE
and for reflection
2017-10-13 16:23:07 +02:00
Dmitry Petrov
16b7bece46 Fix constant expression inlining logic
Constant expressions are inlined if they do not depend on non-inlineable
vals.
Java constants are always inlined.
Kotlin constants are inlined in LV 1.1+.
2017-10-13 17:01:42 +03:00
Yan Zhulanow
5acc992956 Disable uninitialized object copying checks for Parcelable writeToParcel() to createFromParcel() 2017-10-13 16:35:42 +03:00
Yan Zhulanow
824e0a072e Minor: Add dependency to android-extensions-runtime to get rid of compile errors in IDE 2017-10-13 16:35:41 +03:00
Yan Zhulanow
eb39c4c590 Tests: Do not search for android-extensions-runtime in KOTLIN_PATH 2017-10-13 16:35:40 +03:00
Mikhail Zarechenskiy
61d1963ddb Mark incompatibilities related to the declaration signature as STRONG 2017-10-13 16:14:43 +03:00
Mikhail Zarechenskiy
d557c19a88 Test for consistent modality check with implicit and explicit override
Test for KT-20680
2017-10-13 16:14:40 +03:00
Mikhail Zarechenskiy
b2dc82f17e Improve diagnostic for non-actual declaration with weak incompatibility 2017-10-13 16:14:17 +03:00
Mikhail Zarechenskiy
d0cbd73307 Don't report incompatibility expect/actual errors on usual overloads
Divide incompatibility on two groups: strong and weak. Strong incompatibility means that if declaration with such incompatibility has no `actual` modifier then it's considered as usual overload and we'll not report any error on it.

 #KT-20540 Fixed
 #KT-20680 Fixed
2017-10-13 16:14:14 +03:00
Mikhail Zarechenskiy
eb828e3497 Report errors about incompatible constructors of actual class
#KT-20540 In Progress
 #KT-20680 In Progress
2017-10-13 16:13:40 +03:00
Ilya Gorbunov
748dbc382c Advance bootstrap to 1.2.0-dev-92 2017-10-13 15:17:34 +03:00
Sergey Igushkin
9d62bb3561 (minor) Reorder args help in test data after the property was renamed 2017-10-13 14:02:42 +03:00
Dmitry Petrov
08b7578e61 Add -Xnormalize-constructor-calls=enable to stdlib submodules 2017-10-13 10:17:13 +03:00
Pavel V. Talanov
df4b90fcb6 Scripts: Accept objects as DependenciesResolver implementations
Fixes DependenciesResolver.NoDependencies causing "missing constructor without parameters" warning
2017-10-12 19:22:59 +03:00
Simon Ogorodnik
4972dbfc2d KT-17165: Support array literals in annotations in completion
#KT-17165 fixed
2017-10-12 18:15:53 +03:00
Zalim Bashorov
beec788bd4 KJS: improve declaration for JS Promise and add helpers to simplify some usecases
* add `then` with only one parameter to make usages from Kotlin more idiomatic
* add overload static `resolve` which accepts Promise<S> according to the spec
* add helper functions for `then` to simplify chained usages
  when Promise is returned from `then` or `catch` (workaround for KT-19672)
2017-10-12 18:07:09 +03:00
Simon Ogorodnik
30853d5f85 Show missing deps when preloaded deps not found 2017-10-12 17:34:55 +03:00
Alexander Udalov
f46c509b31 Regenerate tests 2017-10-12 16:18:29 +02:00
Anton Bannykh
b839ba5015 JS: correct imports in kotlin.test-js integration test 2017-10-12 15:41:54 +03:00
Sergey Igushkin
260244fa09 (minor) Fix bad file content replacement in a test. 2017-10-12 15:14:07 +03:00
Alexey Andreev
8a8891d7c9 Fix Kotlin/JS compiler under JRE9
See KT-20653, KT-20650
2017-10-12 14:39:47 +03:00
Anton Bannykh
e5cfd198c7 JS: temporarily remove @BeforeTest and @AfterTest checks from integration test until bootstrap compiler supports the annotations. 2017-10-12 14:24:59 +03:00
Anton Bannykh
c57b0b4cbc JS: rename @Before to @BeforeTest and @After to @AfterTest for better JUnit compatibility 2017-10-12 14:24:59 +03:00
Sergey Igushkin
bd75a47a07 Update Android license string for Gradle tests
(cherry picked from commit 2697445)
2017-10-12 14:23:32 +03:00
Stanislav Erokhin
1f546ea1ae Revert "Temporary change default behavior for constructor call normalization"
This reverts commit 2e8cda8103.
2017-10-12 14:01:39 +03:00
Nikolay Krasko
bab79e86d6 Revert old id for run configurations (KT-20621)
Currently there's no way for smooth IDs migration.

 #KT-20621 Fixed
2017-10-12 12:00:35 +03:00
Nikolay Krasko
bc6f2f6659 Request path from URI before construction file 2017-10-12 12:00:35 +03:00
Nikolay Krasko
3c0329b458 Fix tests failure on Windows agents because of wrong slashes 2017-10-12 12:00:35 +03:00
Nikolay Krasko
e31492f96f Always create psi files in tests from text without '\r' 2017-10-12 12:00:35 +03:00
Nikolay Krasko
b64ab10e89 Fix MavenUpdateConfigurationQuickFixTest tests on Windows agents 2017-10-12 12:00:34 +03:00
Dmitry Savvinov
d4d7946e6a Effects: add diagnostic tests on functions from stdlib
==========
Introduction of EffectSystem: 18/18
2017-10-12 11:55:26 +03:00
Dmitry Savvinov
fb03656e99 Effects: annotate functions in stdlib with contracts
build.xml was also changed to incorporate contracts in
mock-runtime-for-tests.jar, because it is using Standard.kt, which, in
turn, has contract-annotated functions.

==========
Introduction of EffectSystem: 17/18
2017-10-12 11:55:26 +03:00
Dmitry Savvinov
4434db4d69 Effects: add diagnostic tests on contracts
- Make AbstractDiagnosticsTest dump function contracts
- Add diagnostics tests on parsing contracts
- Add diagnostics tests on smartcats in presence of functions with
contracts
- Add diagnostics tests on initialization and flow in presence of
in-place called lambdas

==========
Introduction of EffectSystem: 16/18
2017-10-12 11:55:26 +03:00
Dmitry Savvinov
f487525a1d Effects: add cfg-tests on inlined lambdas
==========
Introduction of Effect System: 15/18
2017-10-12 11:55:26 +03:00
Dmitry Savvinov
a986999226 Effects: support cfg tests with stdlib
- Add method "doTestWithStdLib" which launches test with stdlib
- Change GenerateTests.kt to generate cfg tests with stdlib from
folders 'cfgWithStdLib' and 'cfgVariablesWithStdLib'

==========
Introduction of Effect System: 14/18
2017-10-12 11:55:26 +03:00
Dmitry Savvinov
d20c770a25 Effects: add test on (de)serialization of contracts
- Add ContractDescriptorRenderer
- Add option to dump function contracts in DescriptorRendererOptions
- Add parsing of LANGUAGE_VERSION directive in AbstractLoadJava
- Add tests on serialization-deserializaton identity of contracts

==========
Introduction of EffectSystem: 13/18
2017-10-12 11:55:26 +03:00
Dmitry Petrov
75ad20f823 Build compiler, plugin & stdlib with constructor call normalization
Required as a workaround for Proguard bug
https://sourceforge.net/p/proguard/bugs/664/

When processing bytecode generated by Kotlin compiler for constructor
call with stack spilling during arguments evaluation, ProGuard performs
an equivalent transformation for the bytecode, but emits invalid stack
frame information.
In JVM 1.6, such invalid stack frames are ignored and re-evaluated by
JVM during bytecode verification.
In JVM 1.8, such invalid stack frames cause VerifyError.
2017-10-12 10:59:57 +03:00
Leonid Stashevsky
13880b18ea Rename android-annotations -> kotlin-annotations-android
also rewrite it's buildscript in kts and add to compiler tests dependencies
2017-10-12 09:11:33 +03:00
Ilya Gorbunov
781ca6d2b5 Inline swap function, do not use deprecated floor. 2017-10-12 06:06:26 +03:00
Pap Lorinc
e640867238 Provide java.util.Collections#shuffle as extensions for collections in JS
#KT-2460
2017-10-12 06:06:26 +03:00
Ilya Gorbunov
6fc87c532e Restore dependency to build kotlin-runtime before BCV tests 2017-10-12 06:06:12 +03:00
Ilya Gorbunov
aab604d154 Improve math docs
Add links from log to ln, log2, log10.
Format lists in docs so that they are pretty in quick doc window.
2017-10-12 05:58:04 +03:00
Sergey Igushkin
873994545c Clear Java srcDirs in JS and multiplatform projects.
Issue #KT-20217 Fixed

(cherry picked from commit a4f8a5e)
2017-10-11 20:32:59 +03:00
Sergey Igushkin
dff15a3d59 Fix multiplatform projects communication broken if the plugin is loaded
more than once in different class loaders.

Issue #KT-20634 Fixed

(cherry picked from commit c65f210)
2017-10-11 20:32:11 +03:00
Sergey Igushkin
f211985332 Re-generate Gradle options to have allWarningsAsErrors updated.
Issue #KT-20553 Fixed
2017-10-11 20:31:23 +03:00
Sergey Igushkin
5edf8664fb Rename warningsAsErrors -> allWarningsAsErrors in args
(cherry picked from commit 377acf5)
2017-10-11 20:13:25 +03:00
Ilya Gorbunov
71e97e32e0 Regenerate gradle options to include warningsAsErrors 2017-10-11 19:23:57 +03:00
Ilya Gorbunov
345e85974e Bootstrap from intermediate teamcity build 2017-10-11 19:23:55 +03:00
Stanislav Erokhin
4932fa1ddd Support expected type from explicit cast
This commit support the following case.
Suppose we have such declaration:
  fun <T> foo(): T { ... }

Then in code we want to use it like this: `foo() as String`.
But in LV <= 1.1 we have type inference error: "Not enough
information for type parameter `T`". This error happened because we
do not use type from cast as expected type for call.

In this commit we fix this problem and use this type as expected type
in following cases:
 - our function has only one type parameter (this can be relaxed later)
 - function parameter types and extension receiver type not contains `T`

Also this fix problem with `findViewById`.
Already signature was: `fun findViewById(...): View`
and was used like: `findViewById() as MyView`.
New signature is `fun <T : View> findViewById(...): T`
and old usage was broken because of problem described above
2017-10-11 19:23:52 +03:00
Anton Bannykh
ac508a510e JS: Support isInitialized intrisic for lateinit properties 2017-10-11 19:23:49 +03:00
Alexander Udalov
5cbcbe4a9c Support -Werror CLI argument to treat warnings as errors
The option is named "warningsAsErrors" in the Gradle plugin

 #KT-10563 Fixed
2017-10-11 19:23:46 +03:00
Alexander Udalov
897261a8a6 Add test on compiling against kotlin.reflect on JDK 9 2017-10-11 19:23:43 +03:00
Alexander Udalov
d41c1d572b Remove deprecated API from package kotlin.reflect
This is needed to avoid the split package problem on Java 9 (KT-19258):
both kotlin-stdlib.jar and kotlin-reflect.jar export the package
kotlin.reflect
2017-10-11 19:23:40 +03:00
Alexander Udalov
a4f378d04d Decrease resolution priority of declarations from kotlin-stdlib-jre7/8
In order to allow "overload resolution ambiguity" when both
kotlin-stdlib-jre7/8 and kotlin-stdlib-jdk7/8 are in the dependencies
2017-10-11 19:23:38 +03:00
Alexander Udalov
1592555783 Add test on compiling against kotlin.stdlib.jdk7/8 on JDK 9 2017-10-11 19:23:35 +03:00
Alexander Udalov
2a8be2cdb4 Move internal declarations in kotlin-stdlib-jdk7/8 to other packages
- in kotlin-stdlib-jdk7, package kotlin.internal -> kotlin.internal.jdk7
- in kotlin-stdlib-jdk8, package kotlin.internal -> kotlin.internal.jdk8
2017-10-11 19:23:32 +03:00
Alexander Udalov
537a0ce315 Restore kotlin-stdlib-jre7/8 libraries 2017-10-11 19:23:30 +03:00
Alexander Udalov
e253acd5fd Introduce kotlin-stdlib-jdk7/8 libraries, deprecate kotlin-stdlib-jre7/8
The idea is to keep all declarations in the same packages from Kotlin's
point of view, but use JvmPackageName annotation to move them to another
JVM package, to avoid the split package problem which is otherwise
unsolvable when using module path on Java 9 (KT-19258).

In this commit, kotlin-stdlib-jre7/8 are moved to kotlin-stdlib-jdk7/8
and in the subsequent commit, -jre7/8 are restored. This is done in
order to make Git recognize this as a file move to preserve history.

Include new stdlib-jdkN artifacts in manifest version tests.
2017-10-11 19:20:24 +03:00
Alexander Udalov
2fc3f4d07b Update copyrights in kotlin-stdlib-jre7/8 sources 2017-10-11 19:20:24 +03:00
Alexander Udalov
7f8634d9ef Revert "Temporarily remove JvmPackageName and tests, but keep the implementation"
This reverts commit 9ae6feb2c5.
2017-10-11 19:20:24 +03:00
Alexander Udalov
00be512532 Revert "Temporarily remove isInitialized and tests, but keep the implementation"
This reverts commit 234148518e.
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
abdcbf1fb2 Refactor: use the same arraybuffer to compute double hashcode 2017-10-11 19:20:24 +03:00
Ilya Gorbunov
0454bd9e28 Detect endianness when reinterpreting Float64 as two Int32
#KT-18264

Use Int32Array instead of Uint32Array since ints are required to be singed.
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
aa3bfc55c3 Implement in JS nextUp(), nextDown(), nextTowards() and ulp extensions
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
480d4a0093 Make withSign(NaN) behave as in JVM
#KT-4900

Where only the sign of the result is undefined, but the absolute value is unchanged.
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
132f2f88c2 Provide Double and Float bit conversion functions as extensions in JS and Common
Instance extension: Double/Float.toBits/toRawBits
Companion extension: Double/Float.Companion.fromBits

#KT-18264 Fixed
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
044ccf1532 Introduce inverse hyperbolic functions
#KT-4900

Improve accuracy of JS polyfills of hyperbolic functions and expm1/log1p
2017-10-11 19:20:24 +03:00
Mikhael Bogdanov
232d1bd9ef Switch warning to error for java-default method calls within 1.6 target
#KT-15825 Fixed

(cherry picked from commit 9b29ebb)
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
5bfa9b248e Minor fixes in logarithm functions docs 2017-10-11 19:20:24 +03:00
Ilya Gorbunov
57f5791e70 Annotate new API with SinceKotlin, provide common headers
#KT-4900

Also update binary API dump.
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
a69a583c64 Deprecate kotlin.js.Math object, rename kotlin.math.kt to just math.kt 2017-10-11 19:20:24 +03:00
Ilya Gorbunov
86b23ffe49 Integer math functions and tests for them
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
a832db48f6 Float Math API
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
f3ea499d2c JVM-specific math functions and tests
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
7e48f8b180 Provide Double and Float bit conversion functions as extensions
Instance extension: Double/Float.toBits/toRawBits
Companion extension: Double/Float.Companion.fromBits

 #KT-18264 Fixed
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
6373ac7ef0 Rename log to ln, log1p to ln1p, keep pow only as extension
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
805d1c90b7 Rename sgn to sign, add docs and tests
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
d0b12e3872 Use HALF_EVEN rounding mode for round()
Add docs and tests for rounding.

 #KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
5e9e6d5951 Common math tests and document for trigonometric functions and powers.
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
a375bafa21 Draft common math API with top-level functions and constants in kotlin.math package
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
e59fbc1097 Provide polyfills for missing ES6 math functions
#KT-4900

Rename math.kt to js.math.kt
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
559255f38e windowed function: add default parameters, drop or keep partial windows, KEEP-11
Make step default to 1.
Add partialWindows boolean parameter defaulting to false to control
whether to keep partial windows in the end.
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
c04b0072af Rename pairwise to zipWithNext, KEEP-11 2017-10-11 19:20:24 +03:00
Ilya Gorbunov
c2cee2e405 Update binary api dump, rearrage bignumbers tests 2017-10-11 19:20:24 +03:00
Ilya Gorbunov
b89e5b2708 Add missing api: radix overloads, mathContext and scale overloads, orNull overloads
Move string-to-number conversions and their tests near to existing ones

Add documentation and copyrights.
2017-10-11 19:20:24 +03:00
voddan
e86e080088 KEEP-49: extending Kotlin API for BigInteger and BigDecimal 2017-10-11 19:20:24 +03:00
Anton Bannykh
158c03b07f JS: enable TypedArrays by default 2017-10-11 19:20:24 +03:00
Ilya Gorbunov
a8fef3a385 Provide MutableList.fill for JS, annotate new API with @SinceKotlin
#KT-8823 #KT-9010
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
bb22d6647b Introduce MutableList.fill and shuffle/shuffled extensions for JVM only
'shuffle' and 'fill' are inline only, but 'shuffled' is not.

#KT-8823 Fixed
#KT-9010 Fixed
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
16d3d2f764 Make Regex class serializable on JVM
#KT-16447 Fixed

Refactor helper functions for serialization tests.
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
99bd54116e Docs and samples for 'windowed' function 2017-10-11 19:20:24 +03:00
Ilya Gorbunov
b2f2e3537b Docs and samples for 'chunked' function 2017-10-11 19:20:24 +03:00
Ilya Gorbunov
e418f61f0c Docs and samples for 'pairwise' function 2017-10-11 19:20:24 +03:00
Ilya Gorbunov
b94fd36d75 Minor refactoring in RingBuffer 2017-10-11 19:20:24 +03:00
Ilya Gorbunov
3f23742298 Optimize 'windowed' and 'chunked' for char sequences, iterables and sequences 2017-10-11 19:20:24 +03:00
Ilya Gorbunov
18c7a01ab5 Add tests for windowed and chunked, fix precondition checks 2017-10-11 19:20:24 +03:00
Ilya Gorbunov
a3a1c391cc Generate 'chunked' and 'windowed' signatures and delegating implementations
Add implementations of windowed.
2017-10-11 19:20:24 +03:00
Sergey Mashkov
6ae85f5108 Sliding window implementation helper utilities 2017-10-11 19:20:24 +03:00
Ilya Gorbunov
c815ccfd6a Introduce 'pairwise' function, KEEP-11 2017-10-11 19:20:24 +03:00
Mikhael Bogdanov
b73be50e5b Move object initialization from <init> to <clinit>
Codegen generates static backing fields for object properties.
  They are initialized in class constructor but some of them are final static
  and such access is prohibited in specification but it's allowed in
  java bytecode <= 1.8. Such access in 1.9 bytecode cause
  "IllegalAccessError: Update to static final field Object.INSTANCE
  attempted from a different method (<init>) than the initializer method <clinit>"

  Added additional hidden field in interface companion to pass out
  companion instance from <clinit>.

 #KT-15894 Fixed
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
de004337a2 Pass arguments to bcv tests with system properties rather than env 2017-10-11 19:20:24 +03:00
Ilya Gorbunov
03dcae5010 Attach method counting tasks to check rather than assemble stage 2017-10-11 19:19:08 +03:00
Ilya Gorbunov
2d9c4246bd Add explicit constructor to expect annotation 2017-10-11 19:18:30 +03:00
Alexander Udalov
ecfea9e340 Forbid private 'expect' declarations
#KT-19170 Fixed
2017-10-11 17:21:55 +02:00
Dmitry Savvinov
87b85ce978 Fix testdata for tests which use varargs
Change tests to use new syntax for array literals to prevent deprecation
warnings (see KT-20171).
2017-10-11 18:06:00 +03:00
Alexey Andreev
fd1aa97d0c Enable test that now passes in JS 2017-10-11 17:35:32 +03:00
Alexey Andreev
cddc8df134 Fix Scala code style options 2017-10-11 17:35:32 +03:00
Alexey Andreev
06b1ba7c47 JS: use prototype when checking is against interface
See KT-20527
2017-10-11 17:35:31 +03:00
Ilya Chernikov
279126ad7e Add stdlib to gradle scripts classpath, since it is not included into compiler anymore 2017-10-11 16:24:42 +02:00
Paul Merlin
e911a1e53d Script template provider for settings.gradle.kts files
This commit introduces GradleSettingsKotlinDSLTemplateProvider and
registers it as Kotlin IntelliJ plugin extension.
2017-10-11 16:19:56 +02:00
xiexed
5c2962e195 UAST properly handles string "when conditions" in lazy parent (KT-20709) (#1338) 2017-10-11 15:16:15 +02:00
Mikhail Zarechenskiy
88595e1a58 Don't require to override abstract methods in expect class
#KT-16099 Fixed
2017-10-11 15:27:50 +03:00
Mikhail Zarechenskiy
5695e76a00 Prohibit inheritance by delegation in expect classes
#KT-20431 Fixed
2017-10-11 15:27:46 +03:00
Denis Zharkov
2e8cda8103 Temporary change default behavior for constructor call normalization
It's necessary to perform bootstrap and must be reverted after
2017-10-11 14:21:49 +03:00
Dmitry Jemerov
1d4c2e9223 Don't analyze temporary files created from destructuring declarations
They are known to not contain any synthetic accessor calls.
2017-10-11 13:20:05 +02:00
Dmitry Savvinov
f5d40a1c98 Fix testdata in varargs tests
Testdata have been changed since 1.2. due to KT-20171.
2017-10-11 14:06:54 +03:00
Dmitry Savvinov
eae9923dbe Add allowKotlinPackage AnalysisFlag
This flag is used internally by EffectSystem as a sign of compiling
stdlib. If this flag is present, then EffectSystem will read contracts
on functions and serialize them into metadata even if corresponding
LanguageFeatures are turned off. This is done solely for building
1.2-runtime with contracts in it without the need to turn on
LanguageFeatures manually.

======
This commit finishes a first series of commits related to effect
system. After it, compiler is ready to work with contracts, but it is
impossible to actually annotate anything, because there are no
contracts DSL in stdlib yet.
2017-10-11 13:40:16 +03:00
Dmitry Savvinov
bdbb161cfa Effects: support called-in-place lambdas
Support initialization of local variables in capture, if that capture is
anonymous lambda that was passed to function which explicitly expressed
its intent to call closure "here and now"

Changes:
- LocalFunctionDeclarationInstruction made open

- Introduce InlinedLocalFunctionDeclarationInstruction, which is subtype
of LocalFunctionDeclarationInstruction with additional semantic: it
is statically known that this function will be called in-place and maybe
with some definite amount of invocations.

- Next-instruction of InlinedLocalFunctionDeclarationInstruction depends
on whether flow can exit its body normally, i.e. on wheter EXIT is
reachable. If flow can reach EXIT, then .next is just straight next
instruction, otherwise it's SINK.

- Take non-local instructions into consideration when analyzing
reachability. We didn't it before because no one ever needed proper
analysis. Now we have InlinedLocalFunctionDeclarationInstruction which
cares about proper reachability of EXIT.

- Pull control-flow information from
InlinedLocalFunctionDeclarationInstruction's EXIT into parent's
pseudocode, thus allowing it to participate in initialization/use
analysis.

- Change logic of 'isCapturedWrite' to not report
"CAPTURED_VAL_INITIALIZATION" if value is captured by the inline-lambda.

==========
Introduction of EffectSystem: 12/18
2017-10-11 13:34:54 +03:00
Dmitry Savvinov
0dd6d1f4c7 Effects: support assert-like contracts
- Support functions that explicitly express relation between successfull
return and passed arguments (e.g., 'check')
- Note that we have to correct resulting data flow for arguments *after*
resoling (because we get contracts only after resolving). To do so, we
have to extend MutableDataFlowInfoForArguments interface with
'updateResultInfo' method.

==========
Introduction of EffectSystem: 11/18
2017-10-11 13:34:54 +03:00
Dmitry Savvinov
72b0d31329 Effects: support contracts with conditional returns
Support functions which have explicitly expressed relation between
return-value and arguments. If we have observed that function returned
this value, get additional information from effect system.

==========
Effect System introduction: 10/18
2017-10-11 13:34:54 +03:00
Dmitry Savvinov
87b0bc43d5 Effects: support parsing of functions contracts
Make a fastcheck for a presence of contract-declaration in function
body of FunctionDescriptorResolver. If there's something that looks like
contract and we need resolve to make a final decision, then prepare
LazyContractProvider key in UserDataMap of function's descriptor.

Note that we can't passively wait with contracts resolving until the
function body is analyzed, because we may need it earlier. However, we
can't force body resolve straight during descriptors resolving, because
we can run into recursive problems. That's why we are saving deferred
resolving of functions body via LazyContractProvider.

Also, we have to pass DataFlowInfo into
initializeFunctionDescriptorAndExplicitReturnType, because we save
deferred body resolving inside, which needs DataFlowInfo.

==========
Effect System introduction: 9/18
2017-10-11 13:34:54 +03:00
Dmitry Savvinov
175d23155e Effects: add (de)serialization of contracts in metadata
- Introduce new definitions in descriptors.proto
- Add new corresponding values in Flags.java
- Introduce ContractSerializer and ContractDeserializer, responsible for
for conversion ContractDescription <-> ProtoBuf.Contract
- Add dependency of 'serialization' module on 'resolution' so that it
could see contracts model.

Note that here we do a lot of seemingly unnecessary hoops, which in fact
necessary to respect existing module system (in particular, to be able
to extract ContractDescription declarations from 'descriptors' module to
make them invisible from reflection)

==========
Effect System introduction: 8/18
2017-10-11 13:34:54 +03:00
Dmitry Savvinov
2c0ef592e6 Effects: add DSL for declaration of contracts
- Introduce DSL for declaration of contracts. Functions and classes in
this DSL do not bear any computational semantics: in fact, they all do
not exist on runtime. Whole work of extracting semantics from such calls
is done by special parts of compiler

- To make distinguishing those declarations more robust and
convenient, introduce internal annotation @ContractsDSL

- Turn off InlineChecker inside contracts DSL. We do this, because some
functions from DSL should take any possible lambda, so we can't write
any type besides 'Function<R>'. However, InlineChecker will complain if
we will pass inlined lambda in such function -- though, this is false
positive because we know that functions from contracts DSL will never be
executed

- Change testData on HierarchyTestWithLib, where new enum from
kotlin.internal changed expected output

==========
Effect System introduction: 7/18
2017-10-11 13:34:54 +03:00
Dmitry Savvinov
b347e31fc4 Effects: add facade of EffectSystem
- Add facade of effect system in form of EffectSystem class, as well as
some other utility classes.

- Inject effect system facade classes into ExpressionTypingComponents

- Call to ContractParsingServices in ExpressionTypingVisitor to record
function contract (if any)

- Introduce FilteringTrace

- Create new FilteringTrace for statement in ExpressionTypingServices
that will serve as a cache for EffectSystem, filtering ES-related
slices from committing into parent.

- Extract and expose ConditionalDataFlowInfo

==========
Effect System introduction: 6/18
2017-10-11 13:34:54 +03:00
Dmitry Savvinov
a46ccdbae1 Effects: add parsing of contracts from PSI
- Introduce part of effect system responsible for parsing
contracts which were expressed in sources using DSL from stdlib

- Add new errors to Errors.java related to contracts and corresponding
messages.

==========
Effect System introduction: 5/18
2017-10-11 13:34:54 +03:00
Dmitry Savvinov
32d80f322e Effects: add new slices in BindingContext
==========
Effect System introduction: 4/18
2017-10-11 13:34:54 +03:00
Dmitry Savvinov
d2e582698e Effects: add interpreters of ContractDescription
Interpreters convert declarative representation of contracts
(ContractDescription) in internal representation convenient for usage
inside compiler (Computations, Effects, etc.)

==========
Effect System introduction: 3/18
2017-10-11 13:34:54 +03:00
Dmitry Savvinov
afc15e9211 Effects: Add inner representation of contracts
Add model of contracts used by compiler during analysis. It should be
thought of as structure which used by the compiler to implement
semantics, expressed by the ContractDescription.

==========
Effect System introduction: 2/18
2017-10-11 13:34:54 +03:00
Dmitry Savvinov
ba84bd3f19 Effects: Add declarations for description of contracts
Add ContractDescription structure which is used for declarative representation
of function's contract.

Also, add corresponding LanguageFeatures.

==========
This is the first commit from a series of 18 commits which gradually
introduce effect system into the compiler. All such commits will be
marked with appropriate comment and index in that series.

While each one of such commits separately shouldn't break compiler (i.e
you can checkout any of them and expect compiler to build and pass
tests successfully, e.g. for bissecting purposes), semantically they
all are one big feature and not entirely independent. Please bear that
in mind while working with/changing only some of them -- some strange
effects can happen.
2017-10-11 13:34:54 +03:00
Dmitry Jemerov
ee72cc268c Fix NSEE if there's no JVM implementation module (KT-20638) 2017-10-11 12:27:01 +02:00
Dmitry Jemerov
dc7ffdcbe4 Add missing read action 2017-10-11 12:26:59 +02:00
Dmitry Jemerov
6c7f558d36 Add missing FileModificationService call (EA-107395) 2017-10-11 12:26:39 +02:00
Dmitry Jemerov
c2efdfe243 Add space before 'where' keyword
#KT-19213 Fixed
2017-10-11 12:25:53 +02:00
Dmitry Jemerov
f2a7e7f238 Show argument name hints for function type calls only for known names
#KT-19216 Fixed
2017-10-11 12:25:52 +02:00
Dmitry Jemerov
af09f5a49f Enable argument name hints for annotations
#KT-19146 Fixed
2017-10-11 12:25:51 +02:00
Nikolay Krasko
8a46968292 Fix JUnit3RunnerWithInners runner for gradle execution (KT-20684)
#KT-20684 Fixed
2017-10-11 12:43:44 +03:00
Nikolay Krasko
aaa3dd8e70 Don't filter out inner classes when running tests (KT-20684)
#KT-20684 In Progress
2017-10-11 12:43:43 +03:00
Ilya Gorbunov
456c26cdae Remove "EXPERIMENTAL" from 1.2 version description in tests and gradle options 2017-10-11 08:50:30 +03:00
Ilya Gorbunov
b901a8946c Set 1.2-SNAPSHOT in maven build 2017-10-11 08:50:30 +03:00
Ilya Gorbunov
cffab8d3ef Set 1.2-SNAPSHOT in gradle build 2017-10-11 08:50:30 +03:00
Ilya Gorbunov
968c9c2034 Set LATEST_STABLE language version and current version of stdlib to 1.2 2017-10-11 08:50:30 +03:00
Sergey Igushkin
17eac133a2 (minor) Make a test running on Gradle 4.0+ check the classes correctly 2017-10-11 02:25:30 +03:00
Mikhail Zarechenskiy
e9aad54664 Add intrinsics to mark and choose special api calls
#KT-20585 Fixed
2017-10-11 01:37:05 +03:00
Mikhail Glukhikh
e37bfa13e3 Related to KT-20713: add test for find usages in script 2017-10-10 22:48:42 +03:00
Mikhail Glukhikh
c5cb45794a Fix CCE in ReplaceAddWithPlusAssignIntention #KT-20183 Fixed 2017-10-10 22:48:39 +03:00
Mikhail Glukhikh
fd95769780 Code cleanup: ReplaceAddWithPlusAssignIntention 2017-10-10 22:48:37 +03:00
Mikhail Glukhikh
45c9be2945 Fix problem with mutable map in "simplifiable call chain"
So #KT-20315 Fixed
2017-10-10 22:48:35 +03:00
Mikhail Glukhikh
8e59d3e379 Handle modifiers correctly in "val to object" #KT-18919 Fixed 2017-10-10 22:48:33 +03:00
Mikhail Glukhikh
0b5b5d8e89 Suggest primitive array type for collection literals in "add type" fix
So #KT-18549 Fixed
2017-10-10 22:48:30 +03:00
Mikhail Glukhikh
e65112fcab Disable "Replace camel-case name with spaces" intention for JS / common
So #KT-18773 Fixed
2017-10-10 22:48:28 +03:00
Ilya Gorbunov
43e6106791 Bootstrap selection: allow to specify teamcity project with a parameter 2017-10-10 21:00:32 +03:00
Ilya Gorbunov
39c8bae134 Minor: move extra property initialization 2017-10-10 21:00:30 +03:00
Ilya Gorbunov
712d0e0777 Remove redundant repositories 2017-10-10 20:50:03 +03:00
Ilya Gorbunov
5f51a293ba Use 'idea' plugin to specify excluded dirs 2017-10-10 20:50:03 +03:00
Ilya Gorbunov
a8766a00c6 Remove unused property jdk16.home 2017-10-10 20:50:03 +03:00
Zalim Bashorov
a4722a4000 Make "js.tests" depends on ":kotlin-test:kotlin-test-js" since it's used on runtime inside JS tests.
Transform dependency on ":kotlin-stdlib-js" to testRuntime since it's required only on runtime.

And remove unnecessary dependency from jsCompilerTest.
2017-10-10 20:19:07 +03:00
Zalim Bashorov
eb1c76ecc4 Make :kotlin-test-js:distJs depends on compileKotlin2Js to avoid running the task too early 2017-10-10 20:19:07 +03:00
Sergey Igushkin
205df7b1f3 ~ Remove debug port 2017-10-10 19:40:18 +03:00
Sergey Igushkin
8e967c9b6b Move existing multiplatform tests to separate class; add options test. 2017-10-10 19:40:18 +03:00
Sergey Igushkin
6fd9eb2711 Add kotlinOptions to KotlinCompileCommon 2017-10-10 19:40:18 +03:00
Sergey Igushkin
8046959017 Refactor existiong *OptionsImpl classes. 2017-10-10 19:40:17 +03:00
Sergey Igushkin
cce7b3cfdf Create KotlinMultiplatformCommonOptionsImpl.kt 2017-10-10 19:40:17 +03:00
Sergey Igushkin
e06d60174d Generate KotlinMultiplatformCommonOptions and <...>OptionsBase. 2017-10-10 19:40:17 +03:00
Alexey Andreev
8cdef4139e Fix JS DCE removing reachable functions 2017-10-10 18:59:18 +03:00
Denis Zharkov
cb7d561c6c Add cache for declaration names in StubBasedPackageMemberDeclarationProvider
#KT-20683 Fixed
2017-10-10 18:34:31 +03:00
Denis Zharkov
082ed62cd5 Optimize ConstraintSystemBuilderImpl::generateNewBound
Do not process the bound if it's just the same
This situation can actually happen in case of adding bound
containing type variable itself
2017-10-10 18:27:00 +03:00
Denis Zharkov
3a9650d0fc Introduce cache for KotlinBuiltins::builtInClassesByName
There are a lot of places requesting nothing/any/.. instances
and just asking the scopes isn't very effecient:
see org.jetbrains.kotlin.builtins.KotlinBuiltIns#createPackage
having ChainedMemberScope and a `map` call
2017-10-10 18:27:00 +03:00
Denis Zharkov
e3b453ada4 Do not create redundant temporary trace
It will be commited after use in any case
2017-10-10 18:27:00 +03:00
Denis Zharkov
00df41ee25 Optimize subtyping for simple cases 2017-10-10 18:27:00 +03:00
Denis Zharkov
d5376fa8ba Drop effectively unused parameter with default value 2017-10-10 18:27:00 +03:00
Denis Zharkov
6e59799b54 Get rid of a couple of usages of simpleTypeWithNonTrivialMemberScope
The simple versions of KotlinTypeFactory::simpleType may lead
to smaller number of KotlinType instances
(defaultType from descriptor are used if there are no arguments)
2017-10-10 18:27:00 +03:00
Denis Zharkov
1c9b454d90 Rename KotlinTypeFactory::simpleType to simpleTypeWithNonTrivialMemberScope
To state it must be used only for limited number of cases
2017-10-10 18:27:00 +03:00
Denis Zharkov
20334a2321 Cache virtualFilePath for KtFile
Because of com.intellij.openapi.vfs.local.CoreLocalVirtualFile#getPath
that has a rather slow implementation calling String::replace on each call

At the same time this method gets called very frequently when
recording lookups
2017-10-10 18:27:00 +03:00
Denis Zharkov
bb6a52c0cc Optimize subtyping for case of objects identity
It may be rather frequent (e.g. in case of types without arguments or
for dispatch receiver parameters)
2017-10-10 18:27:00 +03:00
Denis Zharkov
f81c7a1a47 Add explicit fast path in TypeCheckerContext::anySupertype 2017-10-10 18:27:00 +03:00
Denis Zharkov
b99658b8eb Optimize CandidateResolver::checkReceiver
- Do not calculate smart cast variants unless they're not necessary
- Avoid calling subtyping twice just to know if smart cast is necessary
  (now the needed info is contained in ReceiverSmartCastResult)
2017-10-10 18:27:00 +03:00
Denis Zharkov
9fdb702688 Minor. Drop unused method 2017-10-10 18:27:00 +03:00
Denis Zharkov
457b57ace2 Inline TypeCheckerContext::anySupertype
This method is a hot spot, since it's may be called
several times during one isSubtypeOf call and it contains
two lambdas, so it's worth inlining it
2017-10-10 18:27:00 +03:00
Denis Zharkov
2fa82edd85 Use smaller default deque size for BFS over supertypes
The default value (16) seems to be rather big
2017-10-10 18:27:00 +03:00
Denis Zharkov
df88926ef8 Minor. Get rid of redundant var
The lazyness here is redundant since SmartList doesn't make a lot of
harm, but at the same time `var` here leads to another
kotlin/jvm/internal/Ref$ObjectRef instance
2017-10-10 18:27:00 +03:00
Denis Zharkov
bca53e6c1c Optimize type checking for common cases
- Type equality for simple constructors (no arguments)
- Subtyping on final classes
2017-10-10 18:27:00 +03:00
Denis Zharkov
e519095e9e Minor. Move local functions as a private to class 2017-10-10 18:27:00 +03:00
Denis Zharkov
79a7c01eac Fix obviously wrong !is check in type checker 2017-10-10 18:27:00 +03:00
Simon Ogorodnik
3ca47f5f4a Revert "Add note about automatic dev plugin updates to ReadMe"
This reverts commit c92408e
2017-10-10 18:25:27 +03:00
Simon Ogorodnik
b7e78e6625 Revert "Add note about bootstrap plugin"
This reverts commit 722345d
2017-10-10 18:25:21 +03:00
Simon Ogorodnik
722345d14e Add note about bootstrap plugin 2017-10-10 18:07:51 +03:00
Simon Ogorodnik
c92408eec9 Add note about automatic dev plugin updates to ReadMe 2017-10-10 18:07:51 +03:00
Mikhael Bogdanov
a79c2bf999 Write script descriptor type to ASM_TYPE slice
#KT-20707 Fixed
2017-10-10 17:01:23 +02:00
Nikolay Krasko
eb32f5478a Minor: use special extension 2017-10-10 16:29:22 +03:00
Nikolay Krasko
6664b7759b Configure kotlin.stdlib for gradle projects (KT-19207)
#KT-19207 Fixed
2017-10-10 16:29:22 +03:00
Nikolay Krasko
023067aaf2 Allow to use folders for gradle configuration tests 2017-10-10 16:29:22 +03:00
Nikolay Krasko
cc0a9070b9 Add kotlin.stdlib to module-info when configure Maven project (KT-19207)
#KT-19207 In Progress
2017-10-10 16:29:22 +03:00
Nikolay Krasko
c0e6cb8b92 Log module name when maven project wasn't found in manager 2017-10-10 16:29:21 +03:00
Nikolay Krasko
f05e4c922b Minor: use another method 2017-10-10 16:29:21 +03:00
Nikolay Krasko
65798cdd81 Minor: optimize imports and clean up 2017-10-10 16:29:21 +03:00
Nikolay Krasko
9d122a275a Update module-info only for Java configurator (KT-19207)
#KT-19207 Fixed
2017-10-10 16:29:21 +03:00
Ilya Gorbunov
fe9ef04cae Make a task to count dex methods in kotlin-stdlib and kotlin-reflect 2017-10-10 14:48:20 +03:00
Alexander Udalov
00c846a160 Write patch version for VersionRequirement correctly 2017-10-10 13:21:50 +02:00
Alexander Udalov
6f2e6db131 Check the RequireKotlin annotation value
Similarly to SinceKotlin
2017-10-10 13:21:50 +02:00
Alexander Udalov
a96861c353 Support version kind for RequireKotlin
#KT-20584 Fixed
2017-10-10 13:21:49 +02:00
Alexander Udalov
4532f7556c Introduce internal RequireKotlin annotation 2017-10-10 13:19:18 +02:00
Alexander Udalov
8962911503 Rename SinceKotlinInfo -> VersionRequirement 2017-10-10 13:19:18 +02:00
Alexey Andreev
8f9fc100a3 Fix compilation of JS stdlib
1. Don't import intrinsics when compiling stdlib, use declarations
   from current module instead
2. Add constructor with one argument to SourceFilePathResolver,
   to fix bootstrapping issues.
3. Pass correct source roots to compiler when building
   stdlib, since now we pass module root by default,
   while stdlib source roots are outside of module root.
2017-10-10 14:11:15 +03:00
Alexey Sedunov
ea8f3dcc65 Go to Implementation: Support suspend functions 2017-10-10 13:15:16 +03:00
Alexey Sedunov
21bf4d3f24 Rename: Suspend function support 2017-10-10 13:15:15 +03:00
Toshiaki Kameyama
c5b7d0f0df Remove parentheses after deleting the last unused constructor parameter
So #KT-16636 Fixed
2017-10-10 11:55:27 +03:00
Mikhail Glukhikh
7ade2bb708 Move CreateActualFix to expectactual package 2017-10-10 10:45:12 +03:00
Mikhail Glukhikh
104826e0a9 Line markers: use descriptors in isExpect/ActualDeclaration 2017-10-10 10:45:10 +03:00
Mikhail Glukhikh
1bf0424b1c Set line marker on expect constructor '(' if no constructor keyword 2017-10-10 10:44:51 +03:00
Mikhail Glukhikh
4bfaa46c15 Add correct mapping of module descriptor to implementedDescriptor
Now implements dependency is taken into account here
Old commonModuleOrNull() was deleted
Test (JVM + 2xCommon) was added
2017-10-10 10:44:44 +03:00
Mikhail Glukhikh
b5e2fa5f94 Add line marker test for type aliases #KT-20164 Fixed 2017-10-10 10:44:39 +03:00
Mikhail Glukhikh
eec8be2c21 Add line marker test for primary constructors #KT-20254 Fixed 2017-10-10 10:44:38 +03:00
Mikhail Glukhikh
0ebe9d576a Add line marker test for sealed classes #KT-20043 Fixed 2017-10-10 10:44:36 +03:00
Mikhail Glukhikh
4e56fda439 Introduce isExpect/ActualDeclaration in KotlinLineMarkerProvider
Treat every member of expect declaration as expect declaration itself
So #KT-18455 Fixed
2017-10-10 10:44:35 +03:00
Mikhail Glukhikh
ceab148b09 Expect/actual markers: handle secondary constructors correctly
So #KT-20309 Fixed
2017-10-10 10:44:33 +03:00
Dmitry Petrov
26136cd0fe Check constness of 'apiVersionIsAtLeast' arguments 2017-10-10 09:04:51 +03:00
Dmitry Petrov
23d8b4cefe Do not run CCE if there were no apiVersionIsAtLeast calls 2017-10-10 09:04:51 +03:00
Dmitry Petrov
fd16035bbd API version calls preprocessing, 1st passing test 2017-10-10 09:04:51 +03:00
Dmitry Petrov
4e7c4c3976 Minor: inline single use of 'analyzeMethodNodeBeforeInline' 2017-10-10 09:04:51 +03:00
Dmitry Petrov
a89f978597 Provide configurable constructor call normalization
Three modes:

- 'disable' (default): normalize constructor calls in coroutines only
  (required because uninitialized objects can't be stored in fields),
  don't insert additional code for forced class initialization;

- 'enable': normalize constructor calls,
  don't insert additional code for forced class initialization;

- 'preserve-class-initialization': normalize constructor calls,
  insert additional code for forced class initialization.
2017-10-10 08:49:19 +03:00
Dmitry Petrov
e71090ae4c Spill stack for inline functions only if it's required
Stack should be spilled before inline function call and restored after
call only if one of the following conditions is met:
- inline function is a suspend function
- inline function has try-catch blocks
- inline function has loops (backward jumps)

Note that there're quite some "simple" inline functions in Kotlin stdlib
besides run/let/with/apply. For example, many string operations are
implemented as inline wrappers over Java method calls.
2017-10-10 08:49:19 +03:00
Mikhail Zarechenskiy
1845a87813 Provide no-arg constructors for common expected annotations in stdlib
This is needed because we treat `expect` classes as not having implicit default constructors (see more in KT-15522, f3344ec)
2017-10-09 18:50:38 +03:00
Mikhael Bogdanov
bd9ac65eaf Update stdlib jre8 test jvm-target 2017-10-09 16:38:56 +02:00
Mikhael Bogdanov
3c81430bb9 Update cli module jvm-target
#KT-20671 Fixed
2017-10-09 16:38:56 +02:00
Kirill Rakhman
91c35a6c59 Support listOfNotNull in SimplifiableCallChainInspection #KT-20410 Fixed 2017-10-09 16:38:52 +03:00
Dmitry Petrov
82a9c35194 Fix self-reference to singleton in initializer
Singleton instance is "initialized" by delegating constructor call,
which is superclass constructor call in case of singletons (because
singletons can't have more than one constructor).

Singleton constructor is effectively split into two stages:
- before a super constructor call;
- after a super constructor call.

Before super constructor call, singleton instance can't be used directly
(see KT-20662), because neither 'this' nor static instance is
initialized yet. However, it can be used in closures, in which case a
static instance should be used (escaping uninitialized this is
prohibited by JVM). Actually using this static instance before it is
initialized (e.g., invoking a method that uses this singleton) will
cause a correct ExceptionInInitializerError.

After a super constructor call, static instance of a singleton may be
not initialized yet (in case of enum entries and interface companion
objects). However, we already have an initialized 'this', which we
should use for singleton references.

 #KT-20651 Fixed
2017-10-09 16:27:34 +03:00
Vyacheslav Gerasimov
62d0e4a51a Add name for GradleProjectImportProvider
#KT-20648 Fixed
2017-10-09 14:40:35 +03:00
Alexander Udalov
6d9e8c9414 Add Gradle tasks to generate protobuf, update readme 2017-10-09 12:35:46 +02:00
Alexander Udalov
450bfca41f Move dependency generators->protobufFull up in the list
Otherwise protobufLite (required by compiler modules) wins, and
GenerateProtoBufCompare cannot be run
2017-10-09 12:35:42 +02:00
Alexander Udalov
2699868586 Add "-Duser.country=US" to gradle.properties
To make Gradle daemon which is run from IntelliJ IDEA use the same
environment as the daemon run by the "gradlew" command (the latter is
always using US)
2017-10-09 12:34:02 +02:00
Dmitry Petrov
a4918748a5 Specialize not-null values using information from current analysis pass
Instead of a separate analysis pass to determine variable types at the
point of null checks, use current data flow information and transform
possibly nullable values to definitely non-null values using a special
intrinsic.

This allows to perform a single data flow analysis pass per RNCE
transformation pass (instead of two passes).
2017-10-09 12:20:40 +03:00
Dmitry Petrov
d31efaa7ac Don't analyze method in RNCE if there're no optimizable instructions 2017-10-09 12:20:40 +03:00
Toshiaki Kameyama
0bda2732e5 Fix for KT-19134 IntelliJ Color Scheme editor - allow changing color of colons and double colons (#1314) 2017-10-09 11:02:02 +02:00
Nicolay Mitropolsky
d609579e55 FakeFileForLightClass tries to use ktFile.originalFile.virtualFile 2017-10-06 23:53:33 +03:00
Dmitry Jemerov
703d053157 Additional fixes for consistent parent conversion 2017-10-06 20:51:04 +02:00
Dmitry Jemerov
bde7a657cf Adapt to new equality rules due to lazy parent calculation 2017-10-06 20:51:04 +02:00
Dmitry Jemerov
ada695bd17 Fix loop in parent structure on 'when' condition with expression 2017-10-06 20:51:03 +02:00
Dmitry Jemerov
31fb34d9af Fix and add some required type checks 2017-10-06 20:51:03 +02:00
Vyacheslav Gerasimov
b12f24b41c Fix KtLightClass conversion and testParameterPropertyWithAnnotation 2017-10-06 20:51:03 +02:00
Dmitry Jemerov
fe021afa37 Temp disable UAST caching 2017-10-06 20:51:03 +02:00
Dmitry Jemerov
bab2641bed Don't test parent structure consistency in irrelevant cases 2017-10-06 20:51:03 +02:00
Dmitry Jemerov
61f6db87c4 Use convertOpt() for getting inner classes of script 2017-10-06 20:51:02 +02:00
Dmitry Jemerov
a4f5a1335a Fix convering parents of annotations on primary constructor parameters 2017-10-06 20:51:02 +02:00
Dmitry Jemerov
56168b4a09 Fix destructuring declaration test 2017-10-06 20:51:02 +02:00
Dmitry Jemerov
a7efc4f5da Return correct parent for parts of converted elvis expression 2017-10-06 20:51:02 +02:00
Dmitry Jemerov
e55f4c6e78 Return correct parent element for destructuring declaration initializer 2017-10-06 20:51:02 +02:00
Dmitry Jemerov
a44dff6803 Take into account annotation use site target when converting parent 2017-10-06 20:51:01 +02:00
Dmitry Jemerov
d976c1d594 Correctly convert KtProperty with no backing field to UAST 2017-10-06 20:51:01 +02:00
Dmitry Jemerov
e63838703a Consistently convert local functions to UAST 2017-10-06 20:51:01 +02:00
Dmitry Jemerov
942fe11020 Correctly convert KtParameter to UAST 2017-10-06 20:51:01 +02:00
Dmitry Jemerov
adf1df3eb0 Return correct parent for elements under when expression body 2017-10-06 20:51:01 +02:00
Dmitry Jemerov
c98c3a7033 Work in progress on consistent UAST structure 2017-10-06 20:51:00 +02:00
Dmitry Jemerov
a5a5b37e1e Don't duplicate UAST parent calculation logic 2017-10-06 20:51:00 +02:00
Dmitry Jemerov
b638febc41 Fix conversion of destructuring declarations 2017-10-06 20:51:00 +02:00
Dmitry Jemerov
40daeb13d1 Evaluate parents of UAST elements lazily
Also add tests for UAST consistency in various cases
2017-10-06 20:51:00 +02:00
Dmitry Jemerov
91459bbd6a Enable caching of converted UElements for Kotlin 2017-10-06 20:50:59 +02:00
Ilya Chernikov
cff6d8cf17 Refactor context classpath discovery, share it to idea's jsr223 host...
...from script-util
fix daemon usage in repls
define compiler classpath for script-util tests explicitly
minor refactorings in the build scripts for better import into idea
2017-10-06 20:12:51 +02:00
xiexed
12e35ccf96 KotlinUastBindingContextProviderService moved to plugin.xml (#1303) 2017-10-06 19:17:25 +02:00
Raluca Sauciuc
768710676b AndroidExtensionsReferenceSearchExecutor should also require a read action (#1327)
... just like AndroidReferenceSearchExecutor does. Otherwise, we get
com.intellij.openapi.application.impl.ApplicationImpl$NoReadAccessException
     [java]    [uitest]         at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1070)
     [java]    [uitest]         at com.intellij.psi.impl.source.tree.CompositeElement.textToCharArray(CompositeElement.java:291)
     [java]    [uitest]         at com.intellij.psi.impl.source.tree.CompositeElement.getText(CompositeElement.java:261)
     [java]    [uitest]         at com.intellij.psi.impl.source.xml.XmlAttributeValueImpl.getValue(XmlAttributeValueImpl.java:72)
     [java]    [uitest]         at org.jetbrains.android.dom.wrappers.ValueResourceElementWrapper.getValue(ValueResourceElementWrapper.java:458)
     [java]    [uitest]         at org.jetbrains.kotlin.AndroidExtensionsReferenceSearchExecutor.processQuery(AndroidExtensionsReferenceSearchExecutor.kt:42)
     [java]    [uitest]         at org.jetbrains.kotlin.AndroidExtensionsReferenceSearchExecutor.processQuery(AndroidExtensionsReferenceSearchExecutor.kt:38)
     [java]    [uitest]         at com.intellij.openapi.application.QueryExecutorBase.execute(QueryExecutorBase.java:87)
     [java]    [uitest]         at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:45)
     [java]    [uitest]         at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:79)
     [java]    [uitest]         at com.intellij.util.UniqueResultsQuery.process(UniqueResultsQuery.java:66)
     [java]    [uitest]         at com.intellij.util.UniqueResultsQuery.forEach(UniqueResultsQuery.java:56)
     [java]    [uitest]         at com.intellij.psi.search.QuerySearchRequest.runQuery(QuerySearchRequest.java:53)
     [java]    [uitest]         at com.intellij.psi.impl.search.PsiSearchHelperImpl.appendCollectorsFromQueryRequests(PsiSearchHelperImpl.java:635)
     [java]    [uitest]         at com.intellij.psi.impl.search.PsiSearchHelperImpl.processRequests(PsiSearchHelperImpl.java:596)
     [java]    [uitest]         at com.intellij.psi.search.SearchRequestQuery.processResults(SearchRequestQuery.java:45)
     [java]    [uitest]         at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:79)
     [java]    [uitest]         at com.intellij.util.MergeQuery.processSubQuery(MergeQuery.java:85)
     [java]    [uitest]         at com.intellij.util.MergeQuery.forEach(MergeQuery.java:57)
     [java]    [uitest]         at com.intellij.util.MergeQuery.findFirst(MergeQuery.java:51)
     [java]    [uitest]         at com.intellij.util.UniqueResultsQuery.findFirst(UniqueResultsQuery.java:51)
     [java]    [uitest]         at com.android.tools.idea.editors.theme.ThemeEditorComponent$19.doInBackground(ThemeEditorComponent.java:895)
     [java]    [uitest]         at com.android.tools.idea.editors.theme.ThemeEditorComponent$19.doInBackground(ThemeEditorComponent.java:891)
     [java]    [uitest]         at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
     [java]    [uitest]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
     [java]    [uitest]         at javax.swing.SwingWorker.run(SwingWorker.java:334)
     [java]    [uitest]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
     [java]    [uitest]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
     [java]    [uitest]         at java.lang.Thread.run(Thread.java:745)
     [java]    [uitest] [  72230]  ERROR - plication.impl.ApplicationImpl - Android Studio 3.1 Canary  Build #171.SNAPSHOT
2017-10-06 19:11:59 +02:00
Ilya Gorbunov
8b70767d76 Configure pom signing before deployment
Use groovy where kotlin dsl lacks of typed api
2017-10-06 19:50:22 +03:00
Alexey Andreev
eaa8729259 Fix embedding sources to source maps when compiling JS stdlib 2017-10-06 18:26:15 +03:00
Alexey Andreev
3b3fd0fa0d JS: fix DCE limits in test data to fit new kotlin.js size
The size has increased due to new implementation of KClass
2017-10-06 18:16:51 +03:00
Anton Bannykh
997aecfcab JS: default to enabled TypedArrays translation when configuration key is not present 2017-10-06 17:14:23 +03:00
Mikhail Glukhikh
e1ccd3afc5 Inspection: do not report anything with manual INFORMATION level offline
So #KT-20369 Fixed
So #KT-20333 Fixed
2017-10-06 16:21:04 +03:00
Toshiaki Kameyama
ec64a7e422 Insert brackets in "Convert reference to lambda" if necessary
So #KT-16394 Fixed
2017-10-06 16:20:45 +03:00
Leonid Stashevsky
0348561cd2 Add annotation for default parameter value 2017-10-06 15:45:38 +03:00
e5l
62e87c873c Add annotation for parameter name in signatures 2017-10-06 15:45:37 +03:00
Dmitry Jemerov
8201ff3006 Fix properties plugin dependency for AS 2.3 2017-10-06 14:43:22 +02:00
Dmitry Jemerov
d79b9c1b51 Allow plugin dependencies to be optional (no Maven in Android Studio) 2017-10-06 14:43:22 +02:00
Dmitry Jemerov
85254838f6 Allow building UAST for in-memory virtual files 2017-10-06 14:43:22 +02:00
Leonid Stashevsky
a54c71eb30 Escape separator in jsr305 CLI tests 2017-10-06 15:34:33 +03:00
Alexey Andreev
9008791a54 JS: generate paths in source maps relative to .map file location
See KT-19818
2017-10-06 15:24:25 +03:00
Alexey Andreev
93a3026c6d JS: improve representation of KClass for primitive types
See KT-17933, KT-17629, KT-17760
2017-10-06 15:21:38 +03:00
Toshiaki Kameyama
bbb571260b Fix 'Redundant override' when delegated member hides super type override
So #KT-20231 Fixed
2017-10-06 14:58:15 +03:00
Dmitry Savvinov
3daee25ce8 Fix tests generators 2017-10-06 13:18:53 +03:00
Mikhail Glukhikh
12ad1b2494 Open created actual class in editor #KT-20135 Fixed 2017-10-06 12:29:00 +03:00
Mikhael Bogdanov
d9df2416a6 Refactor KotlinMultiplatformPlugin to allow Native extend it 2017-10-06 10:56:15 +02:00
Mikhail Glukhikh
8a3fed15f8 Report NO_ACTUAL_FOR_EXPECT etc. on relevant declaration
So #KT-20398 Fixed
2017-10-06 10:48:34 +03:00
Mikhail Glukhikh
472e6f462f Report some actual declaration problems on declaration name
Related to KT-20398
2017-10-06 10:48:24 +03:00
Ilya Gorbunov
5b7c3ee655 Advance bootstrap version to 1.1.60-dev-277 2017-10-05 22:48:12 +03:00
Sergey Igushkin
f4ec8df187 Remove erroneous mavenCentral() from plugins DSL tests 2017-10-05 21:07:46 +03:00
Sergey Igushkin
df99c4fe28 Fix compiler classpath discovery:
* Fix accidental filtering out the stdlib and reflect
* Fix module search in classpath: use moduleId instead of k-c-embeddable
2017-10-05 21:05:06 +03:00
Sergey Igushkin
a2df5c38dd Remove the Kotlin version suffix from PluginsDslIT.kt 2017-10-05 21:05:06 +03:00
Sergey Igushkin
769759d6ce Add jcenter() to testProject repositories where needed. 2017-10-05 21:05:06 +03:00
Sergey Igushkin
ad4fc7363e Install annotation-processor-example for Gradle integration tests. 2017-10-05 21:05:06 +03:00
Sergey Igushkin
feee93186b Replace kotlin-annotation-processing -> (...)-gradle for Kapt 2017-10-05 21:05:06 +03:00
Ilya Gorbunov
ae28af03d1 Add mavenCentral or jcenter to fetch external dependencies of our gradle plugin and stdlib 2017-10-05 21:05:05 +03:00
Ilya Gorbunov
865f2464ab Add aggregation task for gradle integration tests, rename task for gradle tests 2017-10-05 21:05:05 +03:00
Ilya Gorbunov
6a61d22ad3 Correctly setup maven local repository path and kotlin version for gradle integration tests 2017-10-05 21:05:05 +03:00
Sergey Igushkin
7af7696c44 Refactor UpToDatenessIT.kt
(cherry picked from commit 878ec8b)
2017-10-05 20:44:55 +03:00
Sergey Igushkin
5f593ac3f8 Add @Input to compiler args and compiler JAR. Add up-to-date-ness tests.
Issue #KT-20036 Fixed
Issue #KT-3463 Fixed
Issue #KT-16299 Fixed
Issue #KT-16915 Fixed

(cherry picked from commit e6d867f)
2017-10-05 20:24:01 +03:00
Sergey Igushkin
ba649d0869 Fix POM attributes missing form Gradle plugins
(cherry picked from commit bc447e8)
2017-10-05 19:21:04 +03:00
Alexey Sedunov
3df43ccc6a Gradle: Respect 'implement' when collecting transitive dependencies of
IDEA module

This covers the cases when module is transitively reachable via
sequence of "compile"/"implement" dependencies
with at least one "implement" present (cases when module is transitively
reachable via "compile" only are handled automatically)

 #KT-16926 Fixed
2017-10-05 17:30:26 +03:00
Ilya Chernikov
69e5f11889 Fix test generation on some platforms 2017-10-05 16:14:27 +02:00
Ilya Chernikov
f00fcddc76 Fix ide dependencies in gradle-plugin module 2017-10-05 16:14:26 +02:00
Ilya Chernikov
f48d0f4b15 Revert accidental test ignoring 2017-10-05 16:14:26 +02:00
Sergey Igushkin
28567570ea Changes related to the 'expectedBy' Gradle configuration:
* Remove the `extendsFrom` relation;
* Refactor, reword warnings;
* Add the new expectedBy name to `KotlinGradleModelBuilder.kt`.

(cherry picked from commit de198f0)
2017-10-05 15:37:44 +03:00
Sergey Igushkin
ff687131b1 Rename implement to expectedBy in Gradle, deprecate the old name
Issue #KT-20618 Fixed

(cherry picked from commit 6e0d378)
2017-10-05 15:37:43 +03:00
Mikhail Glukhikh
aff689afba Allow "create actual" for function even if partially-compatible exists
So #KT-20163 Fixed
2017-10-05 15:28:37 +03:00
Mikhail Glukhikh
e8321be380 Handle interface / abstract members correctly in "Create actual" fix
So #KT-20243 Fixed
2017-10-05 15:28:33 +03:00
Mikhail Glukhikh
fe786ad7f3 Set primary constructor and its properties actual in "create actual"
So #KT-20044 Fixed
2017-10-05 15:28:30 +03:00
Mikhail Glukhikh
d85c2dbe1f Specify relevant declaration type in "create actual" fix #KT-20325 Fixed 2017-10-05 15:28:28 +03:00
Mikhail Glukhikh
93109c0d0e Generate actual keyword for secondary constructors #KT-20008 Fixed 2017-10-05 15:28:25 +03:00
Mikhail Glukhikh
1e79d9791d Generate actual nested classes for actual owner class #KT-19937 Fixed 2017-10-05 15:28:22 +03:00
Mikhail Glukhikh
e47feaf0b8 Add test for KT-20007 2017-10-05 15:28:21 +03:00
Stanislav Erokhin
4c456983eb Fix javac tests (add separate descriptor rendering) 2017-10-05 15:11:45 +03:00
Stanislav Erokhin
208051b314 Do not run annotation processor in javac integrated tests
Annotation processor can be found in javaslang-2.0.6.jar library.
This jar should be in classpath because it used in compiler
(not as annotation processor of course).
Before migration to GSK this library was also in classpath and it isn't
clear, why it not recognised as an annotation processor.
Anyway, for this tests we should'nt run annotation processors
2017-10-05 15:11:44 +03:00
Toshiaki Kameyama
e92af08c98 Introduce "Assign to property" quick-fix #KT-17204 Fixed 2017-10-05 14:25:28 +03:00
Dmitry Petrov
67a50e92d0 Load annotations for default getter and setter
#KT-14697 Fixed
2017-10-05 10:24:29 +03:00
Mikhail Zarechenskiy
c6a00af2f0 Fix test data after f3344ec 2017-10-05 10:21:26 +03:00
Ilya Gorbunov
3fd1a0f14b Update maven-archetype plugin to 3.0.1
To get the fix for https://issues.apache.org/jira/browse/ARCHETYPE-488
2017-10-05 02:45:01 +03:00
Mikhail Zarechenskiy
a06203512f Minor, rename variable: expected -> actual 2017-10-05 00:10:46 +03:00
Mikhail Zarechenskiy
68a2ba4918 Fix function, expected declaration can be without expect modifier
For example, for nested classes of expected class
2017-10-05 00:10:45 +03:00
Mikhail Zarechenskiy
4b2fc9a325 Don't offer to remove empty primary constructor of expect class 2017-10-05 00:10:44 +03:00
Mikhail Zarechenskiy
f3344ec2b2 Treat expect classes as not having implicit default constructors
#KT-15522 Fixed
2017-10-05 00:10:42 +03:00
Ilya Gorbunov
887e71a7c1 Provide kotlin bootstrap source options 2017-10-04 20:02:26 +03:00
Ilya Gorbunov
5483de276e Specify bootstrap version with gradle props instead of system props
Make bootstrap dependency version explicit
2017-10-04 20:02:12 +03:00
Ilya Gorbunov
b7d21ab4da Use embeddedKotlinVersion to compile buildSrc, but make it possible to override it 2017-10-04 19:27:28 +03:00
Ilya Gorbunov
2627fe8387 Upgrade to gradle 4.2 2017-10-04 19:27:28 +03:00
Ilya Gorbunov
cfdcc9eb03 Minor: fix description typo #KT-20600 Fixed 2017-10-04 19:15:33 +03:00
Ilya Gorbunov
0898897057 Remove crossinline restriction from synchronized in js and common
#KT-20596 Fixed
2017-10-04 19:15:33 +03:00
Ilya Gorbunov
409f361a7c Pass project version as kotlinVersion to archetype integration tests
Verify that the projects created from archetypes can actually be built.
2017-10-04 19:05:31 +03:00
Sergey Igushkin
31c9e0072e Merge pull request #1289 from gildor/KT-18765
Move incremental compilation message from Gradle's warning to info logging level
Issue #KT-18765 Fixed
2017-10-04 16:52:35 +03:00
Simon Ogorodnik
237284d247 Fix ISE already disposed DefaultPicoContainer in Compiler Tests
Some test's won't create their own application, and assumes
that ApplicationManager.getApplication() is null

But CompilerEnvironmentTest had created application
somewhere inside compiler, disposed it, but forgot to reset
variable, causing few tests to fail because of not overridden
application
2017-10-04 15:36:46 +03:00
Yoshinori Isogai
0381b74fed Delete "Running specific generated tests" (#1329)
This section is valid before kotlin is built by gradle. Since there is
no working directory setting in run configuration, we need to delete
this document
2017-10-04 14:15:16 +02:00
Dmitry Petrov
a88de2b0da Ignore testSuspendInTheMiddleOfObjectConstructionEvaluationOrder in JS 2017-10-04 13:57:01 +03:00
Dmitry Petrov
7e808bd3ea Add more tests for constructor call evaluation order
- break in arguments
- continue in arguments
- early return in arguments
- non-local return in arguments
- nested constructor call in arguments
2017-10-04 13:39:48 +03:00
Dmitry Petrov
c3d74bdabb Support jump out of the constructor call in suspend functions
Jump out from expression (e.g., break or continue expression in call
arguments) requires stack normalization, which inserts POP instructions.
POPping an uninitialized value is similar to ASTORE, except that it
doesn't store a value to a local variable. Such POP instructions should
be removed during postprocessing of the uninitialized stores.
2017-10-04 13:39:48 +03:00
Dmitry Petrov
da6841163b Maintain evaluation order for suspend calls in constructor arguments
Insert 'Class.forName(...)' in place of NEW instruction, so that the
corresponding class will be initialized if required.
2017-10-04 13:39:48 +03:00
Dmitry Petrov
533c1d2541 Reject bytecode manipulating with uninitialized values on stack
NB this will break parcel-related tests in android-extensions compiler
plugin
2017-10-04 13:39:48 +03:00
Dmitry Petrov
3405ae30a1 Inner classes of generic classes can't extend Throwable
Do it in the same way as Java: prohibit inner classes (including
anonymous inner classes) capturing type parameters from outer classes
(but not outer methods) extending Throwable.

See KT-17981:
- Deprecated in 1.2
- Error in 1.3
2017-10-04 12:43:50 +03:00
Andrey Mischenko
e4fe9be5e7 Merge branch 'master' into KT-18765 2017-10-04 17:43:11 +08:00
Alexey Andreev
27e319a279 JS: fix parsing of object literals in js() function.
Also, fix generation of source maps of content of js() function.

See KT-19794
2017-10-04 12:01:51 +03:00
Alexey Andreev
c15847a957 JS: support non-local return from secondary constructor
See KT-14549
2017-10-04 12:00:53 +03:00
Alexey Andreev
e323da3c5e Fix compilation of Maven JS plugin 2017-10-03 17:23:02 +03:00
e5l
cbaf38f793 Add CLI test on new jsr305 flag values 2017-10-03 16:44:02 +03:00
e5l
1e157d6480 Use report policy from TypeQualifierDefault annotation if possible 2017-10-03 16:44:02 +03:00
e5l
c512db8e1c Validate -Xjsr305 value in CLI 2017-10-03 16:44:02 +03:00
Leonid Stashevsky
95d32d8d1e Add @UnderMigration annotation and options for report level 2017-10-03 16:44:02 +03:00
Nikolay Krasko
a524bde9b7 Rename: JetRunConfiguration* -> KotlinRunConfiguration* 2017-10-03 16:18:54 +03:00
Nikolay Krasko
0bffd04ef1 Add kotlin.stdlib requirement to module-info on configure (KT-19207)
KotlinAddRequiredModuleFix is almost copy ofAddRequiredModuleFix from
the platform but it moves actual fix method to static with less
parameters and checks directive presence before add.

 #KT-19207 Fixed
2017-10-03 16:18:53 +03:00
Nikolay Krasko
2634ed15fa Configure sdk properly in configure Kotlin tests 2017-10-03 16:10:33 +03:00
Nikolay Krasko
0f61a0f7bd Fix file root access failure in configure tests 2017-10-03 16:10:33 +03:00
Nikolay Krasko
dc86f8c432 Refactoring: extract "kotlin.stdlib" to constant
It will be used in IDE as well.
2017-10-03 16:10:33 +03:00
Nikolay Krasko
3145c096a7 Refactoring: introduce Sdk.version extension
(cherry picked from commit d387e6e)
2017-10-03 16:10:33 +03:00
Nikolay Krasko
4cdd4c04a3 Run configurations with module path for Java 9 named modules (KT-19886)
#KT-19886 Fixed

(cherry picked from commit 1e12828)
2017-10-03 16:10:33 +03:00
Nikolay Krasko
166682937f Copy mock JDK 9 from intellij idea
(cherry picked from commit aef9220)
2017-10-03 16:10:33 +03:00
Nikolay Krasko
8aa4b75e1c Quick fix for module is absent in module-info requirements (KT-20108)
#KT-20108 Fixed
2017-10-03 16:10:32 +03:00
Simon Ogorodnik
228588a87c Fix TestExecutedOnlyOnceTest by properly setting RunWith
When test contains nested test classes
Both root and nested classes should be annotated with
`@RunWith(JUnit3RunnerWithInners.class)`
to avoid running tests twice
2017-10-03 15:45:36 +03:00
Simon Ogorodnik
289b0862a7 Fix MavenTestCase to use Maven mirror only when it available 2017-10-03 15:18:04 +03:00
Alexey Andreev
10f7f61991 Fix compilation of Gradle JS task 2017-10-03 14:50:24 +03:00
Alexey Andreev
21e91c4052 JS: rename -source-map-source-roots to -source-map-base-dirs
See KT-19906
2017-10-03 14:26:37 +03:00
Mikhail Glukhikh
b3fe572447 Minor fix for EA-108087 2017-10-03 11:05:21 +03:00
Mikhail Glukhikh
5c4c77a80a Determine enclosing element correctly inside base constructor
So #KT-17680 Fixed
So #KT-18740 Fixed
So EA-76201 Fixed
2017-10-03 11:05:21 +03:00
Nicolay Mitropolsky
b839081349 Support for collections literals in LightAnnotations (KT-20543) 2017-10-02 18:44:23 +03:00
Alexey Sedunov
b288406e3c Multiplatform: Fix dependencies of implementing module descriptors cache
This fixes some failing tests
2017-10-02 18:14:05 +03:00
Alexey Sedunov
67798d73a1 Minor: Fix multi-module test data
This is required since "implements" dependency is now specified
explicitly in the Kotlin facet configuration
2017-10-02 18:14:04 +03:00
Alexey Sedunov
ea99a2b537 Kotlin Facet: Fix deserialization of "implements" dependency 2017-10-02 18:14:04 +03:00
Alexey Sedunov
9afd2d367b Minor: Fix ReferenceResolveTestGenerated test data 2017-10-02 18:14:04 +03:00
Alexey Sedunov
aabe23d410 Minor: Fix coroutine package name in quick fix tests 2017-10-02 18:14:04 +03:00
Toshiaki Kameyama
2121322665 Fix useless "Remove curly braces" before Chinese character
So #KT-20409 Fixed
2017-10-02 17:46:07 +03:00
Mikhail Glukhikh
912ddfcb2b Build name correctly in ShadowedDeclarationsFilter
So #KT-16383 Fixed
Also should fix EA-104812, EA-99338, EA-107064
2017-10-02 17:41:24 +03:00
Mikhail Glukhikh
9aa25f8af8 Code cleanup: shadowed declarations filter 2017-10-02 17:41:24 +03:00
Denis Zharkov
edbf360852 Do not render trivial variables in DataFlow tests
The reason is that while there are optimizations for them
definition of their state is both rather simple and may be
confusing in testData
2017-10-02 10:04:16 +03:00
Denis Zharkov
477aeef90c Update test data for rendered CFA results after optimizations 2017-10-02 10:04:16 +03:00
Denis Zharkov
a51078fda6 Turn off optimizations in case of do-while presence 2017-10-02 10:04:16 +03:00
Denis Zharkov
c31b5beb9e Remove redundant check for a variable being initialized after write
It's anyway is obvious for write instruction, while effectively
after optimizations we treat val with syntactic initializer
uninitialized until their immediate initiazer
2017-10-02 10:04:16 +03:00
Denis Zharkov
8eb36947ca Minor. Invert and extract condition for checkAssignmentBeforeDeclaration 2017-10-02 10:04:16 +03:00
Denis Zharkov
527daced46 Optimize CFG for cases of simple variables
Parameters/vals with an immediate initializer (which we assume is a
rather common situation) do not require any kind of complicated CFA

- Unused vals can be simply determined by linear traversal of
  the pseudocode
- Definite assignment is a bit more complicated: a read-instruction of val
  can be considered as a safe if it's located *after* the first write in
  the pseudocode. It works almost always beside the case with do/while
  (see the test changed). This case will be fixed in the further commits

The test for kt897.kt will also be fixed further, all other changes
might be considered as minor as they mostly change diagnostics for
already red code
2017-10-02 10:04:16 +03:00
Denis Zharkov
4b79269cec Extract ReadOnly*ControlFlowInfo interfaces from *ControlFlowInfo
It's necessary for further optimizations: not for all cases we actually
need to build a map

The naming is still a subject for discussion
2017-10-02 10:04:16 +03:00
Ilya Gorbunov
791bfde64b Fork ivy download process
Helps to fix download hangs under some circumstances.
2017-10-02 05:24:28 +03:00
Alexey Tsvetkov
72d2e7dd45 Minor: restore accidentally removed import 2017-09-29 21:40:54 +03:00
Alexey Tsvetkov
a8cfe19769 Add option to debug Kotlin daemon in Gradle integration tests 2017-09-29 15:19:36 +03:00
Alexey Tsvetkov
39f49f1449 Ensure dependencies are installed before running Gradle integration tests 2017-09-29 15:19:36 +03:00
Alexander Udalov
5348d2e43a Consider module output as part of the same Java module
This fixes incremental compilation for explicit Java 9 modules

 #KT-20064 Fixed
 #KT-20082 Fixed
2017-09-29 15:10:38 +03:00
Alexander Udalov
0a9c21dbc8 Refactor roots computation in ClasspathRootsResolver 2017-09-29 15:10:37 +03:00
Alexander Udalov
848be226ed Minor, invert JavaModule.isBinary -> isSourceModule 2017-09-29 15:10:37 +03:00
Alexander Udalov
8496944a36 Refactor JavaModule, support several roots in one module
In case of partial/incremental compilation, a module usually consists of
two roots, one of which is source and another is binary. Thus, it's
incorrect to divide modules into "binary" and "non-binary", and only
look for .class files in "binary" modules in
CliJavaModuleResolver.findJavaModule. The more correct way is to think
of a module as a collection of roots, and every root is either binary or
source
2017-09-29 15:10:37 +03:00
Simon Ogorodnik
03f97ff7f1 Revert "Add 1.2-Beta to changelog"
This reverts commit 676e5d2a88.
2017-09-29 14:54:23 +03:00
Sergey Mashkov
49cbb2219c Maven: reduce maven plugin output
#KT-20400 Fixed
2017-09-29 14:49:41 +03:00
Alexey Sedunov
be21a84778 Configuration: Fix modification checking in compiler settings UI
#KT-18996 Fixed
2017-09-29 14:37:04 +03:00
Alexey Sedunov
b4847e69e8 Minor: Fix test data 2017-09-29 14:37:04 +03:00
Alexey Sedunov
f63e33b23d Modules: Support production-on-test dependency
This feature is supported in IDEA project configuration
and can be used in Maven/Gradle-based projects

 #KT-20112 Fixed
2017-09-29 14:37:04 +03:00
Alexey Andreev
0269c3309a JS: fix parsing of wrong delete operation in js function.
See KT-15294
2017-09-29 14:32:49 +03:00
Alexey Andreev
bad50c03a7 JS: support cross-module inlining of suspend functions
See KT-18063
2017-09-29 14:32:49 +03:00
Alexey Andreev
992cc61abc JS: prove that KT-15292 is no more reproducible 2017-09-29 14:32:48 +03:00
Alexey Andreev
bf87826dd1 JS: add test to prove that KT-15622 is no more reproducible 2017-09-29 14:32:47 +03:00
Alexey Andreev
43c6f8b9b1 JS: fix copying fun with default args from interface to abstract class
See KT-20451
2017-09-29 14:32:47 +03:00
Simon Ogorodnik
676e5d2a88 Add 1.2-Beta to changelog 2017-09-29 14:20:26 +03:00
Denis Zharkov
13bf35f48e Make TYPE_USE default qualifiers overriding all other applicabilities
If there is default qualifier with TYPE_USE closer than one with METHOD
then its nullability should be considered even when enhancing return type

 #KT-20016 Fixed
2017-09-29 10:01:04 +03:00
Alexey Tsvetkov
62f293280c Gradle: compile tests incrementally when main is changed
#KT-17674 fixed
2017-09-29 05:11:20 +03:00
Ilya Gorbunov
779b9c6fcc Change TeamCity build status badge to point to the compiler build configuration 2017-09-28 22:02:53 +03:00
Francesco Vasco
9ffd0db4a8 Avoid ISUB in kotlin.repeat 2017-09-28 22:02:53 +03:00
Anton Bannykh
ab615b7d70 Merge pull request #1321 from JetBrains/abannykh/fix-npm-publish
Don't set publish tag in package.json since it overrides the CLI flags
2017-09-28 19:50:11 +03:00
Anton Bannykh
796e0feaa4 Don't set publish tag in package.json since it overrides the CLI flags 2017-09-28 19:45:44 +03:00
Mikhail Glukhikh
e8682fa9b9 Use diagnoseDescriptorNotFound() in findClassDescriptor 2017-09-28 18:43:39 +03:00
Mikhail Glukhikh
5c0bc266b3 Do not use unsafe getClassDescriptor() inside resolveToDescriptor
Introduce getClassDescriptorIfAny / findClassDescriptorIfAny instead
May fix KT-18740 / EA-76201
2017-09-28 18:43:38 +03:00
Mikhail Glukhikh
adf0b25c0b LazyDeclarationResolver.kt: convert to Kotlin 2017-09-28 18:43:38 +03:00
Mikhail Glukhikh
04157c4137 LazyDeclarationResolver.java --> kt 2017-09-28 18:43:38 +03:00
Mikhail Glukhikh
5c5776a6b5 Use resolveToDescriptorIfAny in IDELightClassGenerationSupport 2017-09-28 18:43:38 +03:00
Denis Zharkov
5b7c766a54 Use Jsr305State.DEFAULT instead of IGNORE as a default value 2017-09-28 15:38:27 +03:00
Denis Zharkov
dd2630e5c6 Fix loading additional compiler arguments from facets for libraries 2017-09-28 15:38:11 +03:00
Mikhail Glukhikh
43f1dbeabf Introduce cached ModuleDescriptor.implementingDescriptors
This property is used instead of findImplementingDescriptors,
which is basically too slow
2017-09-28 15:15:03 +03:00
Mikhail Glukhikh
fa23471397 Add test for KT-19222 to fix behaviour
Issue was fixed together with KT-17374
So #KT-19222 Fixed
2017-09-28 15:15:02 +03:00
Mikhail Glukhikh
5687fe6e39 Introduce ModuleDescriptor.findImplementingDescriptor() via facets
This function is now used instead of allImplementingCompatibleModules,
thus allowing it to be deleted together with allImplementingModules

So #KT-17369 Fixed
So #KT-17374 Fixed
May fix also some other MPP issues
2017-09-28 15:15:02 +03:00
Mikhail Glukhikh
c9f11e4bc2 Add implements common dependency for regular multiplatform tests 2017-09-28 15:15:02 +03:00
Mikhail Glukhikh
848a80a266 Add test (with incorrect work yet) for KT-17374 2017-09-28 15:15:01 +03:00
Mikhail Glukhikh
390de737e7 Fix messages in some multi platform highlighting tests 2017-09-28 15:15:01 +03:00
Mikhail Glukhikh
5edeb359c8 Split multi module and multi platform highlighting tests
Now both of them can execute without problems
2017-09-28 15:15:01 +03:00
Dmitry Petrov
3158700500 Add test for generic setValue called via synthetic accessor
Synthetic accessor for 'setValue' was generated incorrectly,
specific case of KT-20491 (Incorrect synthetic accessor generated for a
generic base class function specialized with primitive type).

Make sure there's no equivalent of KT-20387 for delegated properties.
2017-09-28 14:55:11 +03:00
Dmitry Petrov
f4f1ea91d9 Use accessible get/set arguments for collection element receiver
When generating collection element receiver (such as 'a[i]'), accessible
descriptor for get/set operator should be used.
Otherwise, if the corresponding get/set operator fun is called via an
accessor, its argument types may be different in case of generic fun
specialized with primitive types.

 #KT-20387 Fixed
2017-09-28 14:55:11 +03:00
Dmitry Petrov
3994034f46 Keep track of synthetic accessor parameter types
Accessor parameter types may be different from callee parameter types
in case of generic methods specialized by primitive types:

  open class Base<T> {
    protected fun foo(x: T) {}
  }

  // in different package
  class Derived : Base<Long> {
    inner class Inner {
      fun bar() { foo(42L) }
    }
  }

Synthetic accessor for 'Base.foo' in 'Derived' has signature '(J)V'
(not '(Ljava.lang.Object;)V' or '(Ljava.lang.Long;)V'),
and should box its parameter.

Note that in Java the corresponding synthetic accessor has signature
'(Ljava.lang.Long;)V' with auto-boxing at call site.

 #KT-20491 Fixed
2017-09-28 14:55:11 +03:00
Dmitry Petrov
73724bcdc7 Do not copy immediately created arrays in spread arguments
E.g., 'foo(x = *intArrayOf(42))'.

 #KT-20462 Fixed
2017-09-28 14:55:11 +03:00
Denis Zharkov
0d5a2a7e18 Minor. Drop unused class ScopeLevelsAndSkippedForLookups 2017-09-28 14:01:30 +03:00
Denis Zharkov
12b348ae48 Fix incorrectly configured IDE tests
The important changes are in ideaTestUtils.kt:
`configureByFiles` must be called on the relative to testData dir path,
otherwise java files in the project belong to src/idea/testData/.../A.java
instead of src/A.java and can't be found in the root package

New updates in resolution when resolving A() call is now asking whether
<root>.A exists in PsiPackage::getClasses instead of
PsiPackage::findClassByShortName that can find a class even if it's located
in the wrong directory
2017-09-28 14:01:30 +03:00
Denis Zharkov
5b01a32bd3 Extract val isNameForHidesMember 2017-09-28 14:01:30 +03:00
Denis Zharkov
1f23d610a6 Extract TowerResolver.Task::processImplicitReceiver 2017-09-28 14:01:30 +03:00
Denis Zharkov
6b97203979 Move all state from TowerResolver.Task::run to Task class
Also extract local functions from it and introduce
TowerData.ForLookupForNoExplicitReceiver class
2017-09-28 14:01:30 +03:00
Denis Zharkov
c7fda42ccc Introduce TowerResolver.Task class
Its main purpose is code simplification: ImplicitScopeTower::run
contains a lot of local functions that are needed because of
lots of shared state

So, we're moving the state to the Task class instead

NB: This change doesn't change the code of `run`, it will be done
in further commits
2017-09-28 14:01:30 +03:00
Denis Zharkov
b77cc54122 Update lookupTracker testData
Just the order of lookups has been changed
2017-09-28 14:01:30 +03:00
Denis Zharkov
b1387b2ae7 Make call resolution responsible for calling recordLookups
The idea is that all tower levels are partitioned into two groups:
- ones that may contain the target name or INVOKE; they're processed as usual
- ones that can't contain the name; they're simply skipped until
the end of resolution process when it's being passed to scope processors
to allow them record necessary lookups
2017-09-28 14:01:30 +03:00
Denis Zharkov
265794e712 Add necessary ResolutionScope::recordLookup implementations 2017-09-28 14:01:30 +03:00
Denis Zharkov
580a7e3e4d Drop location parameter from ResolutionScope::definitelyDoesNotContainName
definitelyDoesNotContainName is called too eagerly sometimes and it leads
to obviously redundant lookups

The idea is to put responsibility for calling recordLookup to resolution
itself
2017-09-28 14:01:30 +03:00
Denis Zharkov
37440c70e2 Optimize invoke processors
- Avoid creating of empty KnownResultProcessor for variables
- Do not consider definetely inapplicable tower data
2017-09-28 14:01:30 +03:00
Denis Zharkov
860951748f Filter out inapplicable member scopes in resolution 2017-09-28 14:01:30 +03:00
Denis Zharkov
d0bf0f5fb3 Filter out inapplicable non-local levels for implicit receivers 2017-09-28 14:01:30 +03:00
Denis Zharkov
51d3969822 Do not run resolution processors for inapplicable statics 2017-09-28 14:01:30 +03:00
Denis Zharkov
c018a76aaa Use the same default import scopes for all files in module 2017-09-28 14:01:30 +03:00
Denis Zharkov
3322ed6e04 Implement LazyImportResolver::definitelyDoesNotContainName 2017-09-28 14:01:30 +03:00
Denis Zharkov
6e766634c1 Add location parameter to ResolutionScope::definitelyDoesNotContainName
It should be used to record lookups in case of fast paths
in resolution
2017-09-28 14:01:30 +03:00
Denis Zharkov
69f3b01e98 Introduce ImportingScope::computeImportedNames 2017-09-28 14:01:30 +03:00
Denis Zharkov
cd3edfc5b2 Introduce MemberScope::classifierNames and some implementations
It aims to help with further optimizations
2017-09-28 14:01:30 +03:00
Denis Zharkov
1b255b4ed0 Implement LazyPackageMemberScope::getFunctions/VariableNames
It's necessary for future optimizations
Although current implementation is rather conservative,
it should be enough for current needs
2017-09-28 14:01:30 +03:00
Denis Zharkov
688a359985 Avoid running scope processors on hides-member for not-forEach names 2017-09-28 14:01:30 +03:00
Denis Zharkov
fb80e19b88 Filter out inapplicable local scopes in call resolution
The idea is that resolution has an approximate complexity
close to (n + n*m) * 3
Where n is a number of scopes, m is a number of receivers
and 3-constant is used because each of these combinations
runs through 3 processors for functions.

And while call resolver seems to be a hot spot, it should be
useful to decreate the value of n
2017-09-28 14:01:30 +03:00
Denis Zharkov
94356e891b Introduce ResolutionScope::definitelyDoesNotContainName
Also add some obvious implementations

This method might be used in resolution to filter out
inapplicable scopes
2017-09-28 14:01:30 +03:00
Mikhail Glukhikh
7b5842a088 Fix inspection test 2017-09-28 14:00:56 +03:00
Mikhael Bogdanov
e7e28419e4 Migrate CodegenJdkCommonTestSuite.kt to gradle 2017-09-28 12:36:31 +02:00
Stanislav Erokhin
4a0ad54829 Fix Working with the project in IntelliJ IDEA instruction 2017-09-27 21:23:00 +03:00
Alexander Udalov
77765a8064 Do not run proguard by default, unless "kotlin.build.proguard" is "true" 2017-09-27 20:15:31 +03:00
Dmitry Jemerov
16a97a8917 Mark multiplatform projects as experimental in the UI 2017-09-27 17:18:12 +02:00
Alexander Udalov
a7443adb65 Remove obsolete dependency on cli-parser 2017-09-27 15:47:35 +03:00
Alexander Udalov
24b0b75d8e Do not output compiler jar path during configuration of libraries 2017-09-27 15:47:34 +03:00
Alexey Andreev
3b5c2bbcaa Add Gradle task to run JS tests without DCE
This should be helpful when frequently testing changes in JS BE.
2017-09-27 14:22:15 +03:00
Dmitry Petrov
c0a83c3c8a KT-19251 Process uninitialized stores in mandatory bytecode pass
See
https://youtrack.jetbrains.com/issue/KT-19251
https://github.com/puniverse/quasar/issues/280
https://bugs.openjdk.java.net/browse/JDK-8046233

Inline function calls (as well as try/catch expressions) in constructor
arguments produce bytecode that spills stack, and stores uninitialized
objects (created by 'NEW C', but not initialized by 'C.<init>') to
local variables. Such bytecode is valid according to the JVM spec, but
confuses Quasar (and other bytecode postprocessing tools),
and fails to verify under some (buggy) versions of JDK 8.

In order to avoid that, we apply 'processUnitializedStores' already
implemented for coroutines. It moves 'NEW' instructions after the
constructor arguments evaluation, producing code like

<initialize class C using Class.forName>
<evaluate constructor arguments>
<store constructor arguments to variables>
NEW C
DUP
<load constructor arguments from variables>
INVOKESPECIAL C.<init>(...)

NB some other expressions, such as break/continue in the constructor
arguments, also can produce "weird" bytecode: object is created by a
'NEW C' instruction, but later (conditionally) POPped from stack and
left uninitialized. This, as we know, also can screw bytecode
postprocessing. However, it looks like we can get away with it ATM.
Otherwise it looks like we'd have to analyze constructor arguments, see
if the evaluation can "jump out", and perform argument linearization in
codegen.
2017-09-27 12:38:52 +03:00
Andrey Mischenko
3d8486e8a6 Allow to use Gradle property to configure JDK path 2017-09-26 18:14:45 +02:00
Yoshinori Isogai
4428ba0bb7 Add "Generate Tests" run configuration (#1318) 2017-09-26 18:02:03 +02:00
Denis Zharkov
d6ee774243 Load some of the TYPE_USE annotations in fast class reading mode
Only top-level types on fields, methods' return types and
value parameters are supported to catch-up how class-files are loaded
in IntelliJ (see IDEA-153093)

NB: this commit also affects
ForeignJava8AnnotationsNoAnnotationInClasspathWithFastClassReadingTestGenerated
that were failing before

 #KT-20016 Fixed
2017-09-26 16:40:47 +03:00
Denis Zharkov
08f3dbce67 Fix configuration for FastClassReading foreign-annotations tests
Prior to this change USE_FAST_CLASS_FILES_READING actually
has not worked because the flag is being read in the KotlinCoreEnvironment
constructor 🤦‍♂️
2017-09-26 16:40:47 +03:00
Denis Zharkov
fd9025a4fb Add Java8 foreign-annotations tests without jsr305.jar in the classpath
Some of them are expected to fail since neither IntelliJ class reading
nor our fast class reading can read annotations on type arguments
2017-09-26 16:40:47 +03:00
Denis Zharkov
58a0ca61a9 Minor. Fix java test data to make it actually compilable 2017-09-26 16:40:47 +03:00
Denis Zharkov
fdc6b37264 Obtain default type qualifiers from value parameters too
#KT-20016 In Progress
2017-09-26 16:40:47 +03:00
Denis Zharkov
71f85812d6 Improve support for TYPE_USE default qualifiers
- Apply default qualifiers to type arguments if they contain TYPE_USE
in applicability list
- Read TYPE_USE placed default qualifier annotations

 #KT-19592 Fixed
 #KT-20016 In Progress
2017-09-26 16:40:47 +03:00
Denis Zharkov
69665e7560 Minor. Convert function to block body, extract val 2017-09-26 16:40:47 +03:00
Denis Zharkov
bd809c872a Minor. Move local functions to file and inline parameter 2017-09-26 16:40:47 +03:00
Denis Zharkov
775d6988e8 Preserve flexibility for Java types annotated with @NonNull(UNKNOWN)
Before this chanhe, these annotations are simply ignored, but they should
preserve flexibility in case of enhanced nullability obtained from
enclosing default qualifier

 #KT-20158 Fixed
2017-09-26 16:40:47 +03:00
Denis Zharkov
d0e912167e Minor. Simplify handling nullablility for warning 2017-09-26 16:40:47 +03:00
Denis Zharkov
02d3d9785c Move JSR-305 tests to one directory and strip common name prefix 2017-09-26 16:40:47 +03:00
Denis Zharkov
8a66919a5c Support @NonNull(when = NEVER) nullability annotation
#KT-20131 Fixed
2017-09-26 16:40:47 +03:00
Alexey Tsvetkov
1c7b8ec938 Change test data so IC and non IC warnings count match
When IC is on and new Kotlin class is referencing
new Java class, new Kotlin file is compiled twice,
because JPS thinks new Kotlin class is affected by
new Java class (see https://youtrack.jetbrains.com/issue/KT-20318).

This does not happen when IC is off, and KotlinBuilder
requests chunk rebuild (see previous commit).

I decided to remove the reference, because the issue
is now known, and the reference is non critical for the test.
2017-09-26 16:35:24 +03:00
Alexey Tsvetkov
7a5e0e1107 Request CHUNK_REBUILD when IC is off and there are dirty Kotlin files
Otherwise unexpected compile error might happen,
when there are Groovy files, but they are not dirty,
so Groovy builder does not generate source stubs,
and Kotlin builder is filtering out output directory
from classpath (because it may contain outdated Java classes).

Previously the issue was not detected,
because it was not possible to turn off the IC completely (in JPS),
only switch to the legacy IC.

    #KT-20138
2017-09-26 16:35:24 +03:00
Dmitry Jemerov
c290212901 Allow to suppress "Kotlin not configured" notification per-module 2017-09-26 14:52:10 +02:00
Dmitry Jemerov
572ec19c55 SuppressNotificationState: J2K 2017-09-26 14:46:40 +02:00
Dmitry Jemerov
e02d121438 SuppressNotificationState: rename to .kt 2017-09-26 14:46:40 +02:00
Dmitry Jemerov
09f826b68d Enable UI Designer instrumentation in Gradle build 2017-09-26 14:43:01 +02:00
Mikhail Zarechenskiy
8a545f05de Provide quick fix for migration of single elements in named arguments
See more in KT-20171
2017-09-26 14:49:43 +03:00
Mikhail Zarechenskiy
8ab7c26cae Provide quick fix for named arguments to varargs in annotations
See more in KT-20171
2017-09-26 14:49:43 +03:00
Mikhail Zarechenskiy
66cb8db12a Support LANGUAGE_VERSION directive in quick fix tests 2017-09-26 14:49:43 +03:00
Mikhail Zarechenskiy
69e3dd89f6 Split diagnostic factory for the ease of code evolution and tooling 2017-09-26 14:49:42 +03:00
Alexey Andreev
3b2d634cea JS: optimize variable representation in coroutines
Don't convert local variables to fields of coroutine object
when variable is both used and defined in a single block.
2017-09-26 13:56:20 +03:00
Alexey Andreev
b852f73dd2 JS: make string template optimization more conservative
See KT-18548
2017-09-26 13:56:20 +03:00
Alexey Andreev
ca014468ee JS: improve name clash checker to handle complicated cases
See KT-18010
2017-09-26 13:56:19 +03:00
Alexey Andreev
95566b1374 JS: fix serialization of fileId in case of incremental compilation 2017-09-26 13:56:19 +03:00
Nikolay Krasko
3bbf054f0a Fix memory leak from SpecifyTypeExplicitlyIntention 2017-09-26 13:48:22 +03:00
Sergey Igushkin
40ec513c68 Fix tests compilation: cuplicate compileOnly dependencies to testCompile 2017-09-26 13:11:02 +03:00
Kirill Rakhman
1db365bb59 Insert explicit property type while converting accessor to block body
So #KT-20417 Fixed
2017-09-26 12:16:14 +03:00
Nikolay Krasko
31f5c105f3 Remove "javax.annotation.Nullable" usage and clean up file 2017-09-25 20:41:54 +03:00
Nikolay Krasko
412fb62bbb Fix de-reference nullable virtual file (EA-107980) 2017-09-25 20:41:54 +03:00
Nikolay Krasko
500d192063 Remove null assert (EA-107777) 2017-09-25 20:41:53 +03:00
Nikolay Krasko
98c50d3bfb Do not try to create ExactJavaBreakpointVariant with null position (EA-107577) 2017-09-25 20:41:53 +03:00
Nikolay Krasko
8b1fbc9828 fixHost might be null (EA-107022) 2017-09-25 20:41:53 +03:00
Nikolay Krasko
fc54018313 Don't convert to PropertyDescriptor without check (EA-92870) 2017-09-25 20:41:53 +03:00
Nikolay Krasko
d51f54693f Exist if no identifier found (EA-91332) 2017-09-25 20:41:53 +03:00
Nikolay Krasko
2e7be02d51 Add settings for protobuf plugin 2017-09-25 20:41:53 +03:00
Nikolay Krasko
ed2c7d3a9f Minor: fix warnings in increment-version.kts 2017-09-25 20:41:53 +03:00
Sergey Igushkin
a23532d1ee Replace the compile dependency on the Gradle API with a compileOnly one 2017-09-25 18:42:39 +03:00
Mikhail Glukhikh
e8b95b971d Make parentheses necessary for '(x op return y) op z' #KT-16808 Fixed 2017-09-25 18:16:42 +03:00
Mikhail Glukhikh
426a54c3ab Do not count callable reference as recursive property access
So #KT-20104 Fixed
2017-09-25 18:16:42 +03:00
Dmitry Petrov
8f9ea3e08b Fix const range bounds generation 2017-09-25 17:49:33 +03:00
Kirill Rakhman
e82544ffb0 build.gradle.kts: replace listOf().filterNotNull() with listOfNotNull() 2017-09-25 16:32:08 +03:00
Mikhail Glukhikh
253ae10e5f Array equality: replace Arrays.equals with contentEquals in intention 2017-09-25 16:27:51 +03:00
Mikhail Zarechenskiy
32531b3afc Allow to have all parameters with default values in actual annotation
#KT-19656 In Progress
2017-09-25 16:19:05 +03:00
Toshiaki Kameyama
8b135c12e7 Delete useless assert() after simplify comparison #KT-14695 Fixed 2017-09-25 15:35:11 +03:00
Alexey Sedunov
e87f9633be Copy: Do not check conflicts for cross-project copying
#KT-19949 Fixed
 #KT-19972 Fixed
 #EA-105637 Fixed
2017-09-25 14:40:17 +03:00
Alexey Sedunov
6e59cc2140 Copy: Copy entire file if it contains just a selected declaration 2017-09-25 14:40:17 +03:00
Alexey Sedunov
c8c0ab1647 Copy: Fix import insertion on declaration copying
#KT-19909 Fixed
2017-09-25 14:40:17 +03:00
Alexey Sedunov
0beadddb7f Copy: Improve file copying
- Do not copy individual declarations if entire file is selected
  (keeping original content with comments, formatting, etc.)
- Update package directive when original file packages matches
  its directory

 #KT-20092 Fixed
 #KT-18196 Fixed
2017-09-25 14:40:17 +03:00
Alexey Sedunov
fbf6bd534c Move: Disable MoveDeclarationsCopyPasteProcessor in dumb mode
#KT-20199 Fixed
2017-09-25 14:40:16 +03:00
Alexey Sedunov
963747ce04 Move: Optimize conflict analysis
- Do not process conflicts twice wgen moving a directory
- Check move target before resolving usage context declaration
- Skip visibility check for usages referring to public declarations
- Skip module conflict check for declarations with unchanged module
- Do not report lambdas as usage container (use enclosing declaration)
2017-09-25 14:40:16 +03:00
Alexey Sedunov
fefa2304a0 Move to Separate File: Optimize usage search/processing
- Import optimization is already performed by refactoring helper,
so running optimizer explicitly is unnecessary

- Do not search external usages for declarations with unchaged package
and module

 #KT-18823 Fixed
2017-09-25 14:40:16 +03:00
Alexey Sedunov
0a0457298b Misc: Run MoveKotlinDeclarationsProcessor.findUsages() under progress
#KT-20205 Fixed
2017-09-25 14:40:16 +03:00
Alexey Sedunov
c37489ab8b Kotlin Facet: Do not restrict API version list by stdlib version
#KT-19955 Fixed
2017-09-25 14:40:16 +03:00
Alexey Sedunov
1e82b23321 Minor: Drop unnecessary non-null assertion
#EA-107378 Fixed
2017-09-25 14:40:16 +03:00
Toshiaki Kameyama
1043284afe Add data modifier to a class quickfix #KT-18220 Fixed 2017-09-25 14:17:35 +03:00
Toshiaki Kameyama
f08e9832a6 Show warning also if arrays are compared by '!=' #KT-20259 Fixed 2017-09-25 12:15:17 +03:00
Kirill Rakhman
93252926ba Introduce additional quick-fix for (collection) type mismatch
This fixed inserts conversion .toSequence/Array/Iterable/Collection/List
So #KT-19735 Fixed
2017-09-25 12:10:28 +03:00
Alexander Udalov
7f5b9b1760 Add tests on quick fix that adds 'actual' to platform declaration
#KT-18454
2017-09-25 12:00:18 +03:00
Alexander Udalov
60430828cf Deduplicate code in AbstractQuickFixMulti{File,Module}Test 2017-09-25 12:00:18 +03:00
Alexander Udalov
113c83b47a Minor, cleanup AbstractQuickFixMultiFileTest 2017-09-25 12:00:18 +03:00
Alexander Udalov
23d6690581 Fix codegen for multifile class parts with type aliases only
#KT-20337 Fixed
2017-09-25 11:58:20 +03:00
Alexander Udalov
09f36927a5 Do not try to generate 'expect' declarations in multifile classes
Similarly to PackageCodegenImpl#generateFile

 #KT-15754 Fixed
 #KT-17478 Fixed
2017-09-25 11:58:20 +03:00
Alexander Udalov
3f1ee74475 Minor, refactor compiler-running code in multiplatform integration test
The compiler is run twice and outputs are compared for equality. Thus,
if both runs ended with exceptions, the outputs were never equal because
the compiler was run from different places (stack traces were different
in only one line), which was a bit weird. Now outputs are equal and in
case of an exception, a standard "actual data differs from file content"
message is displayed
2017-09-25 11:58:20 +03:00
Alexander Udalov
2d9f07deec Minor, add test for obsolete issue on "actual missing" error
#KT-20142
2017-09-25 11:58:20 +03:00
Alexander Udalov
2281ac842a Prohibit super constructor call for 'expect' class
#KT-15490 Fixed
2017-09-25 11:58:20 +03:00
Alexander Udalov
8ae7343557 Prohibit 'expect' lateinit member properties
#KT-20319 Fixed
2017-09-25 11:58:20 +03:00
Alexander Udalov
1f992ed845 Improve error on 'expect' delegated property
#KT-15054 Fixed
 #KT-15055 Fixed
2017-09-25 11:58:20 +03:00
Mikhail Glukhikh
258e8f73b6 Expect/actual: add inspection for Suppress("DIAGNOSTIC") migration
So #KT-20328 Fixed
2017-09-25 11:48:15 +03:00
Mikhail Glukhikh
0bce06dc0f Synchronize cleanupTool = true with CleanupLocalInspectionTool
So #KT-20366 Fixed
2017-09-25 11:47:11 +03:00
Mikhail Glukhikh
d6028877e1 Add kapt3-idea dependency to gradle script 2017-09-25 11:47:08 +03:00
Mikhail Glukhikh
f348ee9381 Fix a pair of multi-platform messages #KT-20327 Fixed 2017-09-25 11:47:05 +03:00
Alexey Andreev
ee4d790f43 JS: optimize default arguments in cross-module inliner
This reduces size of circlet UI (of approx 2.5 mb) by about 90 kb
2017-09-25 11:29:05 +03:00
Alexey Andreev
e6ab3dc936 JS: generate aliases for intrinsics.
This makes generated code more friendly to UglifyJS.
For example, uglified circlet loses 15 kb.
2017-09-25 11:29:04 +03:00
Ilya Chernikov
80ac8897ff Fix idea plugin jar name and ultimate build 2017-09-22 17:41:52 +02:00
Sergey Igushkin
25ca079fc5 Fix agp25 source set Kotlin classes not included in kotlin-gradle-plugin 2017-09-22 17:30:01 +03:00
Nikolay Krasko
1d51e5b59b Refactoring: reuse implementation 2017-09-22 16:51:08 +03:00
Nikolay Krasko
5a8c957edc Fix null-pointer template apply (EA-102391) 2017-09-22 16:51:08 +03:00
Nikolay Krasko
a8211a77d4 Fix null-pointer because of nullable elementAt (EA-99963)
#EA-99963 Fixed
2017-09-22 16:51:08 +03:00
Nikolay Krasko
a51a9795ae Fix null-pointer because of nullable elementAt (EA-101762)
#EA-101762 Fixed
2017-09-22 16:51:08 +03:00
Ilya Gorbunov
00fa8ee464 Setup JRE version for codegen tests
Add camelCase task name aliases for codegen tests
2017-09-22 15:37:38 +03:00
Ilya Gorbunov
43e2be26f8 Advance stdlib version to 1.1.60 2017-09-22 15:37:38 +03:00
Dmitry Jemerov
0682f74560 Avoid duplicate file type calculation 2017-09-22 14:30:36 +02:00
Denis Zharkov
c7812beea4 Fix SOE in SignatureEnhancement::extractNullability
The problem was that `resolveTypeQualifierAnnotation` actually doesn't
guarantee that `typeQualifierAnnotation` is javax.annotation.NonNull
with argument

It could be just any type qualifier (see the test)
2017-09-22 14:15:11 +03:00
Ilya Chernikov
1953f8e945 Fix build-common publishing 2017-09-21 20:34:10 +02:00
Ilya Chernikov
0b34dde905 Add android-extensions-runtime to the dist 2017-09-21 20:34:08 +02:00
Ilya Chernikov
b5d68515e8 Fix path to android-extensions-runtime in ParcelBoxTest 2017-09-21 20:34:07 +02:00
Dmitry Jemerov
4549cc7289 Fix CodeConformanceTest for new gradle build 2017-09-21 18:09:25 +02:00
Dmitry Jemerov
65c0e445fd Don't crash when trying to build stubs for files that have been deleted
Fixes EA-97751
2017-09-21 17:48:06 +02:00
Dmitry Jemerov
690eaa95bd Update expected testdata of live templates test 2017-09-21 17:33:55 +02:00
Dmitry Jemerov
4c04eaa29a Don't hard-code dependency versions in Maven import test 2017-09-21 17:17:44 +02:00
Dmitry Jemerov
7821366f6a Add missing runtime dependency on TestNG and coverage plugins 2017-09-21 16:58:28 +02:00
Dmitry Jemerov
459d4f3ee9 Fix EAP detection regexp for double-digit patch releases
#KT-20331 Fixed
2017-09-21 16:17:51 +02:00
Toshiaki Kameyama
0b7055f7c0 Join lines could "convert to expression body" #KT-15769 Fixed (#1304) 2017-09-21 16:15:44 +02:00
Dmitry Jemerov
ab25beeb37 Fix exception in KotlinExpandNodeProjectViewProvider.modify 2017-09-21 15:19:19 +02:00
Mikhail Glukhikh
658ffa6c49 Add deprecated modifier to cleanup diagnostic list 2017-09-21 16:09:57 +03:00
Jonathan Leitschuh
539aed32d2 Improve information regarding running tests that load resources (#1298)
* Improve information regarding running tests that load resources

Figuring out how to run isolated generated tests is not imidiately straightforward.
This clears up confusion by throwing a more helpful error in the tests and
adding a section to the ReadMe.

* Cleanup ReadMe and comments after review feedback
2017-09-21 11:20:49 +02:00
Andrey Mischenko
4a2ea4de4b KT-18765 Move incremental compilation message from Gradle's warning to info logging level 2017-09-21 14:30:09 +08:00
Dmitry Jemerov
9e3f866831 Update README, remove misleading information (#1306) 2017-09-20 18:56:44 +02:00
Dmitry Jemerov
c8d171b543 Don't show "Run tests" gutter icon when there's nothing to run
#KT-20338 Fixed
2017-09-20 18:49:25 +02:00
Ilya Gorbunov
7e0f38e07a Rename run configuration (IDEA insists on it) 2017-09-20 18:47:57 +03:00
Ilya Gorbunov
3708a96d91 Add KEEP issues reference pattern 2017-09-20 18:47:27 +03:00
Simon Ogorodnik
d9b6495f01 Remove obsolete libraries xml's 2017-09-20 18:04:54 +03:00
Simon Ogorodnik
25f0322791 Apply code style settings migration 2017-09-20 18:00:58 +03:00
Simon Ogorodnik
228927f948 Remove obsolete run configurations and artifacts 2017-09-20 18:00:10 +03:00
Ilya Gorbunov
d91cedc0e5 Root project idea module with folder exclusions 2017-09-20 15:51:45 +03:00
Ilya Chernikov
ce18c2bf26 Fix readme - only basic corrections 2017-09-20 14:30:04 +02:00
Ilya Chernikov
d9e0486061 Fix ultimate tests 2017-09-20 11:52:07 +02:00
Ilya Chernikov
0f199835a3 Fix idea-gradle tests 2017-09-20 11:52:07 +02:00
Ilya Gorbunov
83908388db Remove coverage section from run configurations (IDEA 172 insists on it) 2017-09-20 11:52:06 +02:00
Ilya Gorbunov
701f24ead5 Split apply block, so that gradle scripts are imported separately, one after other 2017-09-20 11:52:05 +02:00
Ilya Gorbunov
1c6b858153 Do not hardcode kotlin version into maven plugin smoke test 2017-09-20 11:52:04 +02:00
Ilya Gorbunov
c29e44f057 Correct setup for the mavenDeployer 2017-09-20 11:52:03 +02:00
Ilya Gorbunov
4a3c8286a3 Fix developer organization in pom, make artifact manifests same as in libraries 2017-09-20 11:52:03 +02:00
Ilya Gorbunov
d441f7ad9a Remove unused and duplicate gradle files 2017-09-20 11:52:02 +02:00
Ilya Gorbunov
678caa5676 Setup project versions
Build parameters (with corresponding project properties):
- build.number (buildNumber) - build number from build server, goes into manifest, by default snapshot
- deployVersion (kotlinVersion, project.version) - version of artifacts, by default build.number
- bootstrap.kotlin.version (bootstrapKotlinVersion) - version of bootstrap compiler
2017-09-20 11:52:01 +02:00
Ilya Chernikov
df04efcf14 Rename artifacts, fix dependencies and artifact contents 2017-09-20 11:52:00 +02:00
Ilya Chernikov
d61695be55 Fix embeddable compiler dependencies, fix dist task, use runtimeJar...
dependencies where appropriate, some helpers refactoring
2017-09-20 11:52:00 +02:00
Ilya Chernikov
b7226951b6 introduce ideaPlugin task as a replacement for idea-plugin...
leave idea-plugin as a reference to the new one for compatibility
2017-09-20 11:51:59 +02:00
Ilya Chernikov
372138977d Fix compiler archives config contents - fixes signing, add some utils 2017-09-20 11:51:58 +02:00
Ilya Chernikov
8d0694c129 Rename kotlin-plugin project to idea-plugin 2017-09-20 11:51:57 +02:00
Alexander Udalov
8f5dae8f57 Do not set KOTLIN_HOME env var for tests
Instead, rework the (already suspicious) KotlinPaths-finding code in
PathUtil to support the new model of running tests (the compiler is
split into several jars according to the project structure) instead of
the old one (where class files were not in the jars, but in the out/
directory).

This fixes Java9ModulesIntegrationTest
2017-09-20 11:51:56 +02:00
Ilya Chernikov
630d090103 Fix after rebasing on master 2017-09-20 11:51:56 +02:00
Ilya Chernikov
4073280b50 Comment out obsolete kannotator tests
(cherry picked from commit b318d97)
2017-09-20 11:51:55 +02:00
Ilya Chernikov
51efd717f6 Extract jvm6-specific test utils, add codegen on specific jdk tests 2017-09-20 11:51:54 +02:00
Ilya Chernikov
82690fe6b3 Switch to new bootstrap, fix after rebase 2017-09-20 11:51:53 +02:00
Ilya Chernikov
bb72da7d10 Add kapt3-idea to gradle build 2017-09-20 11:51:53 +02:00
Ilya Chernikov
5e108d8efd Fix stdlib test in compiler in the gradle environment 2017-09-20 11:51:52 +02:00
Ilya Chernikov
dfb0a47260 attempt to fix chained test failures
- commenting out potentially "bad" test
- calculating homedir only once
2017-09-20 11:51:51 +02:00
Ilya Chernikov
e92ef59873 Delete obsolete tests - we have no more iml files in the repo 2017-09-20 11:51:50 +02:00
Ilya Chernikov
c4de5ee6b7 Fix ScriptGen tests 2017-09-20 11:51:50 +02:00
Ilya Chernikov
bcf08c2246 Fix TestExecutedOnlyOnceTest 2017-09-20 11:51:49 +02:00
Ilya Chernikov
099bd2f564 Fix test ProtoBufCompareConsistencyTest.testAlreadyGenerated on ubuntu agents 2017-09-20 11:51:48 +02:00
Ilya Chernikov
fc540b2d63 Fix android tests 2017-09-20 11:51:47 +02:00
Ilya Chernikov
4eb4466314 Fix home dir definition in some compiler tests 2017-09-20 11:51:47 +02:00
Ilya Chernikov
51fc3da2f5 Implement compiler classpath config property in gradle...
instead of compiler jar
And add stdlib/reflect/script_runtime to the classpath on detection
2017-09-20 11:51:46 +02:00
Ilya Chernikov
776f1c8d19 Do not shade com.intellij in embeddable compiler 2017-09-20 11:51:45 +02:00
Ilya Chernikov
1862c78bdc Fix projects for gradle integration tests 2017-09-20 11:51:44 +02:00
Ilya Gorbunov
8ec5cc7d16 Rename composite tasks to use camelCase convention 2017-09-20 11:51:44 +02:00
Ilya Gorbunov
6fc3f269a6 Change logical path of kotlin-test-js-it project, fix paths to outputs
Fix paths to kotlin-test-js and kotlin-test-js-it outputs
2017-09-20 11:51:43 +02:00
Ilya Gorbunov
cf5dcb7b5c Advance bootstrap version 2017-09-20 11:51:42 +02:00
Ilya Gorbunov
99f2cc3d00 Fix paths to stdlib-jre6 test output 2017-09-20 11:51:41 +02:00
Ilya Gorbunov
e3899ff7ee Serialize builtins *before* compiling builtins in stdlib 2017-09-20 11:51:41 +02:00
Ilya Gorbunov
47eedd1941 Add missing dependencies for commit dcd966f7 2017-09-20 11:51:40 +02:00
Ilya Gorbunov
479a8b7578 Add property for plugin artifact dir to zip artifacts from KotlinUltimate
Do not delete artifact dir after packing as we may need them later for tests
2017-09-20 11:51:39 +02:00
Ilya Chernikov
d92cce6e6a Fix build after rebase on master 2017-09-20 11:51:38 +02:00
Ilya Chernikov
46884bec84 Add missing artifact, fix some deps and publishing 2017-09-20 11:51:38 +02:00
Ilya Chernikov
a8c45819a1 Fix sources/javadoc artifactsi in gradle tools, separating android extensions runtime 2017-09-20 11:51:37 +02:00
Ilya Gorbunov
403f2c6f99 Fix dependencies of kotlin-compiler(+embeddable), remove them from kotlin-maven-plugin 2017-09-20 11:51:36 +02:00
Ilya Gorbunov
ec2e7bb43c Fix manifest classpath in kotlin-compiler 2017-09-20 11:51:35 +02:00
Ilya Gorbunov
6e75d44bc3 Declare shared shadow plugin version and use it consistently 2017-09-20 11:51:35 +02:00
Ilya Gorbunov
6d97866a3a Fix module name to avoid changes in binary classes 2017-09-20 11:51:34 +02:00
Ilya Chernikov
0e306ac889 Fix install task config 2017-09-20 11:51:33 +02:00
Ilya Chernikov
fc3dda47c0 Update compiler artifact according to the changes in master 2017-09-20 11:51:32 +02:00
Ilya Chernikov
02ec70e9f1 Fix kotlin-daemon-client project config and publications, fix problem with uploadArchives task 2017-09-20 11:51:32 +02:00
Simon Ogorodnik
5dfcac18b7 Add no process canceled exception configurations 2017-09-20 11:51:31 +02:00
Simon Ogorodnik
bcd31de84a Implement ultimate-runner 2017-09-20 11:51:30 +02:00
Ilya Chernikov
cf7312dea8 Add gradle plugin markers 2017-09-20 11:51:29 +02:00
Ilya Chernikov
9df5d53a9d Add classes dirs artifact helpers, minor cleanup 2017-09-20 11:51:29 +02:00
Ilya Chernikov
4b3936b598 Revert to default build dirs, add missing projects 2017-09-20 11:51:28 +02:00
Simon Ogorodnik
3262ac0129 Fix compileJava not found when running idea:test 2017-09-20 11:51:27 +02:00
Simon Ogorodnik
129dc42a25 Fix JPS classpath 2017-09-20 11:51:26 +02:00
Ilya Chernikov
a63d1a53c3 Reduce memory requirements for gradle and js backend tests 2017-09-20 11:51:25 +02:00
Ilya Chernikov
c428f12d71 Add Idea Ultimate plugin build 2017-09-20 11:51:25 +02:00
Ilya Chernikov
8c44b62d16 Fix recursive task dependency helpers 2017-09-20 11:51:24 +02:00
Ilya Chernikov
95035b3d72 Fix various tests 2017-09-20 11:51:23 +02:00
Simon Ogorodnik
98413f200f Disable test optimization on patterns with wildcards 2017-09-20 11:51:22 +02:00
Simon Ogorodnik
34ac3a818a Optimize run tests 2017-09-20 11:51:21 +02:00
Ilya Chernikov
3aabeca191 Fix maven and android tests after modularizing and rebasing 2017-09-20 11:51:21 +02:00
Ilya Chernikov
3a55ed31a6 Rearrange and add aggregate tests tasks 2017-09-19 23:58:42 +02:00
Simon Ogorodnik
360a692af8 Apply rri/yole/modularize, create gradle run configuration for IDEA 2017-09-19 23:58:41 +02:00
Ilya Chernikov
7cb8a90513 Strip maven build from moved parts 2017-09-19 23:58:40 +02:00
Ilya Chernikov
f7b9ae2556 Add missing dist jars 2017-09-19 23:58:39 +02:00
Ilya Chernikov
aa34c7d32a Fix tests after projects rearrangement 2017-09-19 23:58:39 +02:00
Ilya Chernikov
0676ebd530 Fix after rebase on master 2017-09-19 23:58:38 +02:00
Ilya Chernikov
b4c9422376 Rearrange and rename idea-plugin related and annotation-processing modules 2017-09-19 23:58:37 +02:00
Simon Ogorodnik
e23c26b5d1 Fix j2k tests failing if started after web demo tests 2017-09-19 23:58:36 +02:00
Ilya Chernikov
e7ac8443ee Implement proper artifacts signing, add missing install and publish tasks 2017-09-19 23:58:35 +02:00
Ilya Chernikov
08e2ee0951 Restore legacy kotlin-runtime maven artifact 2017-09-19 23:58:34 +02:00
Ilya Chernikov
19e0cfeb9e Add annotation processing into dist, publish & tests 2017-09-19 23:58:33 +02:00
Ilya Chernikov
c0572aeb34 Refactor mock-runtime build to avoid source roots conflicts 2017-09-19 23:58:33 +02:00
Ilya Chernikov
fd1b677904 Switch reflect to compiled core classes 2017-09-19 23:58:32 +02:00
Ilya Chernikov
d89b53dfea Reorganize builtins built and use in the projects 2017-09-19 23:58:31 +02:00
Ilya Chernikov
d039d191f2 Fix tests in the new build infrastructure 2017-09-19 23:58:30 +02:00
Ilya Chernikov
a61facf3d1 Clean most of the shared source roots conflicts 2017-09-19 23:58:29 +02:00
Ilya Chernikov
e26b421e6c Add JDK detection 2017-09-19 23:58:29 +02:00
Ilya Chernikov
0c085cd0a2 Remove gradle files from obsolete gradle build parts 2017-09-19 23:58:28 +02:00
Alexander Podkhalyuzin
3f8170d369 Clean idea files generated on the gradle import, add them to .gitignore 2017-09-19 23:58:27 +02:00
Ilya Chernikov
3e46c59187 Clean unused dependencies, minor refactorings 2017-09-19 21:37:27 +02:00
Ilya Chernikov
27968c8e13 Set proper jvmTarget for projects 2017-09-19 21:37:27 +02:00
Ilya Chernikov
deda50dbbb Continue switching projects to improved dsl: sourceSets and test running 2017-09-19 21:37:26 +02:00
Ilya Chernikov
336e24b837 Fix project structure after rebase on master 2017-09-19 21:37:25 +02:00
Ilya Chernikov
d0b8767536 Enable gradle build-scan 2017-09-19 21:37:24 +02:00
Ilya Chernikov
46c10157d3 Add aggregate tests tasks 2017-09-19 21:37:23 +02:00
Ilya Chernikov
b6c255cea5 Refactor: project renaming, using improved build dsl 2017-09-19 21:37:22 +02:00
Ilya Chernikov
8e24383428 Improve build DSL 2017-09-19 21:37:22 +02:00
Ilya Chernikov
a87396b070 Add scripting projects from libraries 2017-09-19 21:37:21 +02:00
Ilya Chernikov
87726b38b6 Add generated project-schema extensions, example refactoring 2017-09-19 21:37:20 +02:00
Ilya Chernikov
24c192135f Control plugin version and repo from properties 2017-09-19 21:37:19 +02:00
Ilya Chernikov
96d5e0bb21 Refactoring - renaming projects, applying sourceSets DSL 2017-09-19 21:37:18 +02:00
Ilya Chernikov
a6aaee3fe0 Add system property/environment var for -kotlin-home compiler option 2017-09-19 21:37:17 +02:00
Ilya Chernikov
fac2c16999 Fix generators tests compilation 2017-09-19 21:37:16 +02:00
Ilya Chernikov
513ab08edd Refactor and clean preloader project 2017-09-19 21:37:16 +02:00
Ilya Chernikov
1d56730538 Separate j2k and eval4j tests from idea tests 2017-09-19 21:37:15 +02:00
Ilya Chernikov
e18b77af21 Refactor compiler-related published projects
- move preparation into separate projects
- rename projects for publishing
- add compiler plugins
2017-09-19 21:37:14 +02:00
Ilya Chernikov
aa4fdaa713 Implement publishing in the build 2017-09-19 21:37:13 +02:00
Ilya Chernikov
438525dfff Proper import of the gradle part:
- using non-shadowed libs
- stop preshgadowing plugins
- switch to project dependencies
- add annotation processing module
2017-09-19 21:37:12 +02:00
Ilya Chernikov
3caa426b76 Switching library projects to java 8 compilation with exceptions for stdlib/runtime/reflect/test 2017-09-19 21:37:11 +02:00
Ilya Chernikov
fca9478fd8 Tweak dependencies loading and other minor infrastructure changes 2017-09-19 21:37:10 +02:00
Ilya Chernikov
06532cefa2 Fix teamcity build 2017-09-19 21:37:09 +02:00
Ilya Chernikov
628927782a Fix tests in the gradle environment 2017-09-19 21:37:09 +02:00
Ilya Chernikov
f053ed968f Change core env and proguard config for compatibility with new gradle build
(the build.xml should be modified to support the proguard config in this form)
2017-09-19 21:37:08 +02:00
Ilya Chernikov
6b22282ad4 Change previous gradle build for compatibility with the centralized build
incompatible with the main build yet
2017-09-19 21:37:07 +02:00
Ilya Chernikov
61dfb75e0e Implement Gradle Kotlin DSL build 2017-09-19 21:37:06 +02:00
Ilya Chernikov
f5d6e41993 Update gradle wrapper 2017-09-19 21:37:05 +02:00
Ilya Gorbunov
095aacecac Minor, test: align assertion with the expectation message 2017-09-19 17:57:18 +03:00
Mikhail Glukhikh
38ddc731ea Do not check 'isArrayOfMethod' using BuiltInsPackageFragment
So #KT-18631 Fixed
2017-09-19 17:14:22 +03:00
Mikhail Glukhikh
bf739198aa Fix regular quick-fix test with multi-platforms required 2017-09-19 17:13:58 +03:00
Mikhail Glukhikh
ef6a00f477 Fix completion tests 2017-09-19 17:13:37 +03:00
Valentin Kipyatkov
454c5229f9 Ability to disable caches reset on ProcessCanceledException via internal action 2017-09-19 16:52:20 +03:00
Sergey Igushkin
41b13d25f2 Fix javaOutputDir changed to the JAR, which was breaking unit tests
internal visibility, because they did not get the JAR into classpath

Issue #KT-20212 Fixed

(cherry picked from commit 19e861b)
2017-09-19 15:33:58 +03:00
Sergey Igushkin
5ce514bd42 Changes to configuration of Kotlin source set
* Include the Java source directory set as-is, without iterating over
its srcDirs
* Avoid Java sources duplication with newer Gradle versions.

Issue #KT-16764 Fixed
Issue #KT-17564 Fixed
2017-09-19 15:33:58 +03:00
Alexey Andreev
c5e5a43f68 JS: fix unit materialization in case of null check and elvis operator
See KT-20287
2017-09-19 15:30:55 +03:00
Alexey Andreev
b4c622d433 JS: optimize destructuring declaration when possible
See KT-8285
2017-09-19 15:30:26 +03:00
Alexey Andreev
a2bfaf4fc8 Fix multiplatform test (use expect/actual instead of header/impl) 2017-09-19 15:21:30 +03:00
Nikolay Krasko
1b447a0231 Execute action without writeActionPriority in tests 2017-09-19 11:27:23 +03:00
Dmitry Jemerov
c05c359703 Correctly detect multiplatform modules in run code
LanguageVersionSettings doesn't mean that the module is actually
multiplatform; it only means that it _could_ be one. Use
platform and information from facet instead.

Also fix detection of common stdlib version and add tests for common
run config.
2017-09-18 19:23:22 +02:00
Dmitry Jemerov
dd34c67849 Add missing dependencies 2017-09-18 19:23:22 +02:00
Alexey Sedunov
04a4bef615 Misc: Fix multiplatform test configuration 2017-09-18 19:43:41 +03:00
Vyacheslav Gerasimov
43ee2bd9c4 Add new Gradle with Kotlin DSL project wizard for Kotlin, KotlinJS, Java, Groovy
#KT-20308 Fixed Target Version 1.2
2017-09-18 17:15:54 +03:00
Vyacheslav Gerasimov
3d71fa85be Copy initial new gradle project wizard files from idea gradle plugin 2017-09-18 17:15:50 +03:00
Stanislav Erokhin
e8d42e4dde Increase stub version because we add new soft-keywords: expect and actual 2017-09-18 16:37:36 +03:00
Alexey Sedunov
7c26f87b0c Misc: Fix multiplatform test configuration 2017-09-18 16:30:28 +03:00
Mikhail Glukhikh
9b0f15137f Expect/actual: introduce DEPRECATED_MODIFIER instead of ..._FOR_TARGET 2017-09-18 16:19:41 +03:00
Mikhail Glukhikh
721889600f Expect/actual: fix some error messages 2017-09-18 16:09:18 +03:00
Nikolay Krasko
98e9238763 Force canceling injection search when it's executed without progress (KT-19901)
More accurate fix for KT-19901.
There're cases when injectors are counted without progress indicator but
under read action. In that cases typing can't be started until exit from
the computing that produces lags in typing.

Tested with long spek-like test file.

 #KT-19901 Fixed
2017-09-18 14:56:46 +03:00
Alexey Sedunov
bd3d79d318 Minor: Do not specify platform for project-level language settings 2017-09-18 14:55:16 +03:00
Mikhail Glukhikh
79308287be Minor: rename directory in quick-fix test data 2017-09-18 14:40:14 +03:00
Denis Grachev
0722c5c13a KT-19565: J2K: Determine mutability using iterator
#KT-19565 fixed
2017-09-18 14:07:57 +03:00
Alexey Andreev
d312996f3a JS: generate import statement for COROUTINE_SUSPENDED property
This makes code with lots of corutines more feasible for uglification
2017-09-18 13:13:40 +03:00
Alexey Andreev
9771a3c66e JS: prove that KT-8282 is no more reproducible 2017-09-18 13:13:00 +03:00
Alexey Andreev
aa35d4ed36 JS: prove that KT-8315 is no more reproducible 2017-09-18 13:13:00 +03:00
Alexey Andreev
6ba0ac1238 JS: prove that KT-7011 is no more reproducible 2017-09-18 13:12:59 +03:00
Alexey Andreev
a66cd8b309 Fix name clash in JS implementation of multiplatform extension property
See KT-18756
2017-09-18 13:10:51 +03:00
Toshiaki Kameyama
1c7d66c803 Do not suggest "Redundant Unit return type" for Nothing-typed expression
So #KT-20261 Fixed
2017-09-18 13:02:03 +03:00
Toshiaki Kameyama
d87c0b164f Add quick-fix for CANNOT_CHECK_FOR_ERASED #KT-18742 Fixed 2017-09-18 12:11:15 +03:00
Mikhail Zarechenskiy
6a1b6d10d8 Setup JDK roots and initialize JDK_HOME in common core environment
#KT-20167 Fixed
2017-09-18 08:19:41 +03:00
Stanislav Erokhin
6d26d1fb67 Minor. rename header -> commonModule 2017-09-16 19:47:47 +03:00
Stanislav Erokhin
91a99b4726 Migrate impl to actual in libraries projects 2017-09-16 19:47:46 +03:00
Stanislav Erokhin
481cbd0850 Migrate header to expect in libraries projects 2017-09-16 19:47:45 +03:00
Stanislav Erokhin
7cd5eeb24d Regenerate common stdlib: use 'expect' instead 'header' 2017-09-16 19:47:44 +03:00
Mikhail Glukhikh
e12de11ce9 Fix add modifier for replacement case, add expect/actual order tests 2017-09-16 19:47:43 +03:00
Mikhail Glukhikh
2c521727c3 Add header/impl/expect/actual into modifiers order list 2017-09-16 19:47:42 +03:00
Mikhail Glukhikh
c0dd97b40d Migration to expect/actual: fix CLI tests 2017-09-16 19:47:41 +03:00
Mikhail Glukhikh
a18e9436a1 Migration to expect/actual: change diagnostics rendering 2017-09-16 19:47:40 +03:00
Stanislav Erokhin
7982f3489e Rename compiler key -Xno-check-impl to -Xno-check-actual 2017-09-16 19:47:39 +03:00
Mikhail Glukhikh
2fe7cc5534 Add more tests for KT-20262 2017-09-16 19:47:38 +03:00
Mikhail Glukhikh
77f625bfc8 Include ReplaceModifierFix in cleanup #KT-20262 Fixed 2017-09-16 19:47:37 +03:00
Stanislav Erokhin
7849452b66 Rename ALLOW_HEADER_WITHOUT_IMPLS to ALLOW_EXPECT_WITHOUT_ACTUAL 2017-09-16 19:47:36 +03:00
Vyacheslav Gerasimov
bba2d27e82 UAST: Fix getType and getText for UastKotlinPsiVariable 2017-09-16 13:21:44 +03:00
Vyacheslav Gerasimov
14742a6048 UAST: Fix getContainingFile, should return KtFile instead of FakeFileForLightClass
#KT-20170 Fixed
2017-09-16 13:02:08 +03:00
Vyacheslav Gerasimov
6d7c88a2bc Fix KotlinWithGradleConfigurator, get psi files under read action
EA-106672 Fixed
2017-09-16 13:02:07 +03:00
Alexander Udalov
37a23f0958 Use JVM package name in Java 9 module accessibility checks
This fixes Java9ModuleIntegrationTest.testDependencyOnStdlibJdk78 from
the 1.2 branch
2017-09-15 20:30:29 +03:00
Mikhail Glukhikh
d3082b0e62 Migration to expect/actual: change some comments in compiler 2017-09-15 18:30:32 +03:00
Mikhail Glukhikh
fcc84d00c3 Migration: make header/impl/expect/actual contradictory to each other 2017-09-15 18:30:25 +03:00
Mikhail Glukhikh
fc4ff3b760 Migration to expect/actual: renames in DeclarationResolver 2017-09-15 18:30:18 +03:00
Mikhail Glukhikh
afdd647df1 Migration to expect/actual: renames in DeclarationsChecker 2017-09-15 18:30:11 +03:00
Mikhail Glukhikh
c5c6050baa Migration to expect/actual: renames in ExpectedActualDeclarationChecker 2017-09-15 18:30:04 +03:00
Stanislav Erokhin
88644001d3 Rename heared/impl around highlighter markers 2017-09-15 18:29:57 +03:00
Stanislav Erokhin
8d8f683042 Fix header/impl in LazyClassDescriptor.toString 2017-09-15 18:29:50 +03:00
Stanislav Erokhin
956b0aca92 Rename header/impl in DescriptorRendererModifier 2017-09-15 18:29:43 +03:00
Stanislav Erokhin
194d16176c Rename protobuf header/impl flags 2017-09-15 18:29:36 +03:00
Stanislav Erokhin
2b186909d4 Migrate diagnostic names for header/impl 2017-09-15 18:29:29 +03:00
Mikhail Glukhikh
d20ba5d082 Migration to expect/actual minor: rename icon constants 2017-09-15 18:29:21 +03:00
Mikhail Glukhikh
19b8ecab61 Migration to expect/actual: KotlinSafeDeleteProcessor 2017-09-15 18:29:13 +03:00
Mikhail Glukhikh
6e41bbc2a7 Migration: header->expect & impl->actual in IDEA test data 2017-09-15 18:29:06 +03:00
Mikhail Glukhikh
32cc619f15 Migration to expect/actual: fix multiplatform highlighting tests 2017-09-15 18:28:57 +03:00
Mikhail Glukhikh
85d6a4d1af Migration to expect/actual: fix multiplatform integration tests 2017-09-15 18:28:50 +03:00
Mikhail Glukhikh
27615209ed Migration to expect/actual: remove header/impl from completion, tests 2017-09-15 18:28:43 +03:00
Mikhail Glukhikh
6766196bd8 Migration to expect/actual: correct multi-module QF tests 2017-09-15 18:28:36 +03:00
Mikhail Glukhikh
bc78d672c1 Migration: add quick-fix to replace header->expect & impl->actual 2017-09-15 18:28:28 +03:00
Mikhail Glukhikh
e896a1f5ea Migration: add check for illegal expect on nested in non-expect class 2017-09-15 18:28:21 +03:00
Mikhail Glukhikh
5d25106267 Migration: deprecation tests for header/impl 2017-09-15 18:28:14 +03:00
Mikhail Glukhikh
dd8bed8b46 Migration: expect/actual in diagnostic tests 2017-09-15 18:28:07 +03:00
Mikhail Glukhikh
1a2dc4c96c Migration: expect/actual in descriptor renderer 2017-09-15 18:28:00 +03:00
Mikhail Glukhikh
205272f51b Migration: add expect/actual to hasExpected... / hasActualModifier 2017-09-15 18:27:53 +03:00
Mikhail Glukhikh
0640d5618c Migration: make modifiers HEADER & IMPL deprecated 2017-09-15 18:27:47 +03:00
Mikhail Glukhikh
6650340716 Migration: expect/actual in OverrideMemberChooserObject 2017-09-15 18:27:40 +03:00
Mikhail Glukhikh
b909704bb9 Migration: expect/actual in KotlinSafeDeleteProcessor 2017-09-15 18:27:33 +03:00
Mikhail Glukhikh
31f4f2d0c9 Migration: add actual instead of impl on IMPL_MISSING 2017-09-15 18:27:26 +03:00
Mikhail Glukhikh
89c8ee8614 Migration: hasImpl -> hasExpectedModifier (OverrideMemberChooserObject) 2017-09-15 18:27:19 +03:00
Mikhail Glukhikh
280a60af6f Migration to expect/actual: some intentions 2017-09-15 18:27:12 +03:00
Mikhail Glukhikh
62ec4b5a31 Migration to expect/actual: KeywordCompletion 2017-09-15 18:27:05 +03:00
Mikhail Glukhikh
9f02a8b2a8 Migration: PlatformHeaderAnnotator -> PlatformExpectedAnnotator 2017-09-15 18:26:59 +03:00
Mikhail Glukhikh
74f81f38ba Migration to expect/actual: highlighter markers 2017-09-15 18:26:46 +03:00
Mikhail Glukhikh
2d0ac0011a Migration to expect/actual: ExpectedActualDeclarationChecker 2017-09-15 18:26:23 +03:00
Mikhail Glukhikh
c4fd1a8e5c Migration to expect/actual: ModifierCheckerCore 2017-09-15 18:26:16 +03:00
Mikhail Glukhikh
fba1a2a2db Migration to actual/expect: quick-fix CreateActualFix with tests 2017-09-15 18:26:09 +03:00
Mikhail Glukhikh
810d62bbaf Add expect & actual to MODIFIERS_TO_REPLACE table 2017-09-15 18:26:02 +03:00
Mikhail Glukhikh
eb648e20c6 Add expect & actual modifiers 2017-09-15 18:25:56 +03:00
Stanislav Erokhin
e86d2f00ff Rename isImpl to isActual in descriptors 2017-09-15 18:25:49 +03:00
Stanislav Erokhin
c8ee424f67 Rename isHeader to isExpect in descriptors 2017-09-15 18:25:41 +03:00
Stanislav Erokhin
fd6eab38e5 Regenerate comments in protobuf files for isHeader -> isExpect 2017-09-15 18:25:34 +03:00
Stanislav Erokhin
4dc47c734c Rename has[Header|Impl]Modifier() to has[Expect|Actual]Modifier() 2017-09-15 18:25:27 +03:00
Stanislav Erokhin
0bf7dc3e0c Refactoring. Replace hasModifier(IMPL_KEYWORD) to hasImplModifier() 2017-09-15 18:25:20 +03:00
Stanislav Erokhin
1ebfe1af43 Refactoring. Replace hasModifier(HEADER_KEYWORD) to hasHeaderModifier() 2017-09-15 18:25:13 +03:00
Yan Zhulanow
79b2b40289 Allow access to effectively invisible declarations in evaluator (KT-18775) 2017-09-15 17:54:46 +03:00
Yan Zhulanow
5641909d1d Parcel: Invoke box tests as an external process to prevent class clashes with IntelliJ platform 2017-09-15 17:54:46 +03:00
Mikhail Zarechenskiy
11b6382518 Revert "Setup JDK roots and initialize JDK_HOME in common core environment"
This reverts commit 05dd4714045494dcc648412t 2ea2179a242991639.
2017-09-15 16:47:42 +03:00
Mikhail Zarechenskiy
05dd471404 Setup JDK roots and initialize JDK_HOME in common core environment
#KT-20167 Fixed
2017-09-15 16:34:12 +03:00
Anton Bannykh
373bd5ff17 JS: throw exception on access to an uninitialized local variable (KT-20248 fixed) 2017-09-15 14:46:26 +03:00
Nikolay Krasko
aa442860c2 Run inline usages search in debugger under progress indicator (KT-19974)
#KT-19974 Fixed
2017-09-15 12:27:41 +03:00
Mikhail Zarechenskiy
bbf4c56c06 Update generated tests 2017-09-15 11:47:16 +03:00
Mikhail Glukhikh
faaddacec6 Fix "unexpected error type" exception in constructor conversion
So #KT-20218 Fixed
2017-09-15 11:17:21 +03:00
Mikhail Glukhikh
13fc526695 Fix "unexpected error type" exception in initializer -> getter
So #KT-19674 Fixed
2017-09-15 11:16:51 +03:00
Mikhail Glukhikh
a9ece23e63 Remove BodyResolveMode.FULL from OverrideImplementMembersHandler 2017-09-15 11:15:44 +03:00
Mikhail Zarechenskiy
a63495aa0b Use language version settings of definitely known module 2017-09-15 08:16:25 +03:00
Yan Zhulanow
26af128694 Parcelable: produce error on "CREATOR" companion object 2017-09-14 19:36:48 +03:00
Yan Zhulanow
d9f99971bb Disable old Parcelable quickfixes if @Parcelize annotation is present 2017-09-14 19:36:47 +03:00
Yan Zhulanow
e6171dc4c5 Parcelable: Add quick fixes 2017-09-14 19:36:24 +03:00
Yan Zhulanow
8eeed17b65 Add android-extensions-runtime.jar to CLI libs 2017-09-14 19:29:11 +03:00
Yan Zhulanow
9984b6f9d1 Minor: Refactoring 2017-09-14 19:29:10 +03:00
Yan Zhulanow
2fb2211a4d Kapt: Prevent kaptGenerateStubsTask from being UP-TO-DATE when there is no incremental data generated for some reason 2017-09-14 19:16:55 +03:00
Yan Zhulanow
83bf257666 Kapt: Attach kapt stub location when reporting annotation processor errors 2017-09-14 19:16:55 +03:00
Yan Zhulanow
4ac8a98050 Kapt: Hide fake "Error while annotation processing" error in Android Studio build console 2017-09-14 19:16:54 +03:00
Yan Zhulanow
69051a4764 Simplify KotlinOutputParser, remove old reflection-based logic that didn't work well with the newer versions of Android Studio 2017-09-14 19:16:53 +03:00
Anton Bannykh
74bda80ec2 JS: added forgotten JsLegacyPrimitiveArraysBoxTestGenerated.java 2017-09-14 18:55:12 +03:00
Yan Zhulanow
8e72a1211b Kapt: Add IDEA integration (KT-19097, KT-17923, KT-19823) 2017-09-14 18:40:55 +03:00
Mikhail Zarechenskiy
b574ddfba0 Deprecate syntax for assigning single named arguments to varargs
See more in KT-20171
2017-09-14 18:27:43 +03:00
Mikhail Zarechenskiy
68259f7939 Allow assigning array to vararg in named form in annotations
See more in KT-20171
2017-09-14 18:27:41 +03:00
Mikhail Zarechenskiy
f905d56b38 Don't try to get KtFile on random element as it can throw exception
For example, this can be for copied elements (DummyHolder)
2017-09-14 18:27:40 +03:00
Mikhail Zarechenskiy
b1d9abdf83 Propagate languageVersionSettings to resolution context 2017-09-14 18:27:34 +03:00
Denis Zharkov
6336ad874b Get rid of ParametersAreNonnullByDefault copy in test data 2017-09-14 18:05:32 +03:00
Denis Zharkov
24b1f2ed1f Minor. Update CliTestGenerated.Jvm::testExtraHelp test data 2017-09-14 18:05:32 +03:00
Denis Zharkov
4d95c30360 Restore -Xjsr305-annotations flag as a deprecated 2017-09-14 18:05:32 +03:00
Denis Zharkov
97fed6336b Add cli tests on different options of -Xjsr305 flag 2017-09-14 18:05:32 +03:00
Denis Zharkov
363d345752 Make default value for -Xjsr305 flag to be WARN 2017-09-14 18:05:32 +03:00
Denis Zharkov
2ca220d442 Ignore built-in type qualifier defaults when Jsr305State=IGNORE 2017-09-14 18:05:32 +03:00
Denis Zharkov
b744ed0fd3 Minor. Remove unused properties 2017-09-14 18:05:32 +03:00
Denis Zharkov
943dd96a87 Fix Jsr305State::STRICT description 2017-09-14 18:05:32 +03:00
Alexander Udalov
d32e101802 Support deprecatedName for advanced CLI arguments 2017-09-14 18:05:32 +03:00
Mikhail Glukhikh
92215b41b9 Replace resolveToDescriptor with unsafeResolveToDescriptor
Now unsafeResolveToDescriptor is equivalent to resolveToDescriptorIfAny
but throws exception in case no descriptor is found.
Old version of resolveToDescriptor is kept intact but made deprecated.
Some clarifying comments were added
2017-09-14 17:20:37 +03:00
Toshiaki Kameyama
cd6201c5df Java class with static-only methods can contain 'protected' members (#1257)
#KT-19651 Fixed
2017-09-14 15:47:10 +03:00
Mikhail Glukhikh
0f9d31c9d1 Patch resolveToDescriptorIfAny() for parameter case
Now property descriptor is returned for primary constructor val / var,
otherwise parameter descriptor is returned.
2017-09-14 15:08:06 +03:00
Mikhail Glukhikh
04b8f1db6e Minor: convert to expression body applied (resolutionApi) 2017-09-14 15:08:05 +03:00
Mikhail Glukhikh
71c2489ade Use safe resolveToDescriptorIfAny() when possible (related to EA-105681) 2017-09-14 15:08:04 +03:00
Nikolay Krasko
94e3a51a45 Test no psi stub mismatch for light classes with suspend in overloads
IdeCompiledLightClassTestGenerated is relevant.
2017-09-14 12:28:26 +03:00
Nikolay Krasko
74043089ab Generate modifier list stub under nullable type for suspend functions (KT-20185)
Otherwise there's a PSI and Stub mismatch error produced.

 #KT-20185 Fixed
2017-09-14 12:28:26 +03:00
Nikolay Krasko
b9872b7651 Render annotations in suspend functions in single modifier list (KT-20185)
#KT-20185 Fixed
2017-09-14 12:28:26 +03:00
Dmitry Petrov
d20af1133a Use captured instance in interface companion object initializer
Similar to enum entry initialization, when we have a companion object
in an interface, its constructor (or clinit) initializes its state
before the instance field in corresponding interface is initialized.
So, interface companion object must be accessed via a captured object
reference (#0, or #0.this$0 for inner anonymous objects).
2017-09-14 10:26:35 +03:00
Dmitry Petrov
179e720e4a Provide fallback flag for KT-19174
-Xno-exception-on-explicit-equals-for-boxed-null

Also unify corresponding names.
2017-09-14 10:15:28 +03:00
Dmitry Petrov
773eff1de8 Update IEEE 754 'equals' tests for LV 1.2
NB IEEE 754 doesn't say anything about nulls.
2017-09-14 10:15:01 +03:00
Dmitry Petrov
a3c4850f0d Fail with NPE on explicit 'equals' call for null platform type value 2017-09-14 10:15:01 +03:00
Dmitry Petrov
4c2cfd3ea9 Synthesized 'copy' in data classes cannot override anything since 1.3
Synthesized 'copy' introduces default values for parameters, which is
prohibited for regular overrides.
Report warning in language version 1.2-, error in 1.3+.
2017-09-14 10:13:22 +03:00
Alexander Udalov
9ae6feb2c5 Temporarily remove JvmPackageName and tests, but keep the implementation
This is needed because we want the compiler code to stay as much the
same in master and in 1.2 as possible
2017-09-13 23:23:36 +03:00
Alexander Udalov
e8e38d90ff Validate JvmPackageName annotation value and placement
- do not allow it to be used together with JvmMultifileClass (otherwise
  implementation becomes complex)
- do not allow to declare classes in a JvmPackageName-annotated file
  (similarly, the implementation of this would be much harder in the
  compiler, and there would need to be special support in the IDE)
- check that the value is a valid FQ name
- do not allow root package just in case
2017-09-13 22:59:03 +03:00
Alexander Udalov
2bb437b219 Do not load JvmPackageName-annotated parts on Kotlin < 1.2 2017-09-13 22:59:03 +03:00
Alexander Udalov
70ae1596fb Support JvmPackageName annotation in binary format
The main changes are in jvm_package_table.proto and ModuleMapping.kt.
With JvmPackageName, package parts can now have a JVM package name that
differs from their Kotlin name. So, in addition to the old package parts
which were stored as short names + short name of multifile facade (we
can't change this because of compatibility with old compilers), we now
store separately those package parts, which have a different JVM package
name. The format is optimized to avoid storing any package name more
than once as a string.

Another notable change is in KotlinCliJavaFileManagerImpl, where we now
load .kotlin_module files when determining whether or not a package
exists. Before this change, no PsiPackage (and thus, no JavaPackage and
eventually, no LazyJavaPackageFragment) was created unless there was at
least one file in the corresponding directory. Now we also create
packages if they are "mapped" to other JVM packages, i.e. if all package
parts in them have been annotated with JvmPackageName.

Most of the other changes are refactorings to allow internal names of
package parts/multifile classes where previously there were only short
names.
2017-09-13 22:59:03 +03:00
Alexander Udalov
d07b628e0c Support JvmPackageName annotation in JVM back-end
This annotation is currently internal because we only commit to its
support for our own libraries. It will be used to change JVM package
names of declarations in JDK-specific stdlib additions (now called
kotlin-stdlib-jre7/8), both to preserve source compatibility of the old
Kotlin code and to solve the split package problem (KT-19258)
2017-09-13 22:59:03 +03:00
Alexander Udalov
234148518e Temporarily remove isInitialized and tests, but keep the implementation
This is needed because we want the compiler code to stay as much the
same in master and in 1.2 as possible
2017-09-13 22:51:23 +03:00
Alexander Udalov
7d80afbe63 Avoid getting invisible_fake visibility for properties in ExpressionCodegen
Before this change, we were computing the visibility of an inherited
private property setter, and ISE at AsmUtil.getVisibilityAccessFlag
happened ("invisible_fake is not a valid visibility in backend")
2017-09-13 22:49:26 +03:00
Alexander Udalov
c6263ac8e6 Support isInitialized intrinsic for lateinit properties
See https://github.com/Kotlin/KEEP/pull/73

 #KT-9327 Fixed
2017-09-13 22:49:26 +03:00
Ilya Gorbunov
08052e63e9 Test to ensure fixed typed char array content[Deep]ToString, relates to #KT-16056 2017-09-13 20:53:17 +03:00
Anton Bannykh
2249675e59 JS: throw exception when accessing uninitialized lateinit property (KT-14964) 2017-09-13 20:16:01 +03:00
Anton Bannykh
49bc9249a1 JS: add support for the ::foo syntax (callable reference with empty LHS) 2017-09-13 20:12:48 +03:00
Anton Bannykh
497251a6d7 Revert "JS: use Mocha + NodeJs instead of Karma + PhantomJs to run stdlib tests" so that it wouldn't clash with Gradle Build transition
This reverts commit 11c83ad
2017-09-13 20:11:11 +03:00
Anton Bannykh
11c83ad0fc JS: use Mocha + NodeJs instead of Karma + PhantomJs to run stdlib tests 2017-09-13 19:43:53 +03:00
Anton Bannykh
22dc36a596 JS: enable translation of primitive arrays to TypedArray's by default (KT-17137) 2017-09-13 18:45:19 +03:00
Dmitry Jemerov
cc8fbf6078 Store third-party annotations in a separate directory 2017-09-13 17:25:20 +02:00
Alexander Udalov
296638a7c4 Minor, fix test after 60c735f2fd 2017-09-13 18:13:39 +03:00
Nikolay Krasko
cad6fdb323 Reenable workaround for JVMTI_ERROR_WRONG_PHASE in debugger tests
It was fixed in custom intellij jdk and disabled in DescriptorTestCase.
2017-09-13 16:29:51 +03:00
Nikolay Krasko
75fa982370 Minor: split long line in KotlinDebuggerSettings.kt 2017-09-13 16:29:51 +03:00
Alexander Udalov
1b45e9d517 Minor, fix before vs after in some tests 2017-09-13 15:46:37 +03:00
Alexander Udalov
b01a3eb747 Drop JvmFileClassesProvider and inline implementations
Both of its implementations called the same static function; inline
those and move related utilities to JvmFileClassUtil
2017-09-13 15:46:36 +03:00
Alexander Udalov
16c5fb6f6b Refactor and simplify JvmFileClassUtil 2017-09-13 15:46:35 +03:00
Denis Zharkov
28d785854c Optimize codegen for generic SAM types
Search abstract members in unsubstituted scope to avoid computation
of substituted descriptors for each type (effectively for each SAM call)

 #KT-20055 In progress
2017-09-13 15:34:14 +03:00
Denis Zharkov
97fd72a1e0 Minor. Drop unused function in resolution 2017-09-13 15:34:14 +03:00
Denis Zharkov
b905ddeac9 Memoize deprecations-related computations
It might be helpful for performance as these methods are called
for each resolution candidate and in the same time they scan
the whole overridden tree of a callable member
2017-09-13 15:34:14 +03:00
Denis Zharkov
4eb0f245a6 Avoid creating substitution instances for empty argument list 2017-09-13 15:34:14 +03:00
Denis Zharkov
fbdcf45976 Optimize AbstractClassTypeConstructor::equals 2017-09-13 15:34:14 +03:00
Denis Zharkov
8753baeab6 Optimize DirectoriesScope::contains
Previously its complexity was O(directoriesCount * pathSize),
now it's O(pathSize) in average
2017-09-13 15:34:14 +03:00
e5l
5bb88b659b Rename flag Xjsr305-annotations->Xjsr305 2017-09-13 15:19:54 +06:00
Zalim Bashorov
30c7f633bd KJS: don't load declarations marked by PlatformDependent annotation
#KT-17450 Fixed
2017-09-13 02:18:43 +03:00
Yan Zhulanow
d7ad973843 Kapt, minor: Remove duplicating 'visitInnerClass()' calls (rebase issue) 2017-09-12 22:17:18 +03:00
Vladimir
9a8699a2ab Kapt: kaptGenerateStubs now depends on kapt build dependencies (KT-20001) 2017-09-12 22:07:18 +03:00
Yan Zhulanow
7b4e24a454 Android Extensions: Allow LayoutContainers in inner/local classes and objects 2017-09-12 22:07:18 +03:00
Yan Zhulanow
07be1e9d10 Android Extensions: Generate proper receiver for clearFindViewByIdCache() call (KT-19742) 2017-09-12 22:07:17 +03:00
Yan Zhulanow
f84df6381e NoArg: Support @MappedSuperclass JPA annotation (KT-19692) 2017-09-12 22:07:16 +03:00
Yan Zhulanow
3f4ddb006a Android Extensions: Fix compilation when LayoutContainer is used as an interface (KT-19753) 2017-09-12 22:07:16 +03:00
Yan Zhulanow
eefb490a8a Parcelable: Use efficient serialize strategy for Java/Kotlin Parcelables only from the current source roots (KT-20029) 2017-09-12 22:07:15 +03:00
Yan Zhulanow
1b688182cd Parcelable: Use specialized write/create methods where available (KT-20057) 2017-09-12 22:07:14 +03:00
Yan Zhulanow
f6d7a17227 Parcelable: Remove 'ACC_STATIC' flag from Creator class, Dalvik dex checker hates it, and it's illegal anyway (KT-20034) 2017-09-12 22:07:13 +03:00
Yan Zhulanow
e0509e8c4d Parcelable: Specify declaration origin for the synthetic descriptors 2017-09-12 22:07:13 +03:00
Yan Zhulanow
033386b47d Parcelable: Do not check property types if the Parcelable class has a custom Parceler implementation (KT-20062) 2017-09-12 22:07:12 +03:00
Yan Zhulanow
89c5f78a8e Parcelable: Use Parcel methods for reading-writing primitive types (KT-20020) 2017-09-12 22:07:11 +03:00
Yan Zhulanow
a03c03c427 Parcelable: Handle nullability in Parcelize Parcelable serializer (KT-20032) 2017-09-12 22:07:11 +03:00
Yan Zhulanow
88138fc420 Parcelable: Use java/lang/Enum methods to read/write enum values (KT-20022) 2017-09-12 22:07:10 +03:00
Yan Zhulanow
7b96c9a003 Parcelable: Give priority to Parcelable type over objects and enums (KT-20021) 2017-09-12 22:07:09 +03:00
Yan Zhulanow
be3273a933 Parcelable: Flags argument should be propagated to the nested Parcelable's writeToParcel() (KT-20019) 2017-09-12 22:07:08 +03:00
Yan Zhulanow
3587a2a08e Parcelable: Use ClassLoader from the container class to load Parcelable (KT-20027)
When the parameter type is just "Parcelable", we would not pick the wrong (system) class loader anymore.
2017-09-12 22:07:08 +03:00
Yan Zhulanow
c9ec1a2511 Parcelable: Array serializer should correctly handle wide primitive types – long, double (KT-20002) 2017-09-12 22:07:07 +03:00
Yan Zhulanow
32fc340d62 Parcelable: Parcelize overrides describeContents despite being already implemented (KT-20026) 2017-09-12 22:07:06 +03:00
Yan Zhulanow
e645da64da Parcelable: Use the Parcelable implementation class as a containing declaration for Creator (KT-19899) 2017-09-12 22:07:06 +03:00
Yan Zhulanow
f8ca714c45 Parcelable: Cast types deserialized with Parcel.readValue() (KT-19747) 2017-09-12 22:07:05 +03:00
Yan Zhulanow
eee28d8507 Parcelable: Fix signature for Serializable Parcel serializer (KT-19749) 2017-09-12 22:07:04 +03:00
Nikolay Krasko
32c02161cd Refactoring: improve isApplicable methods in surrounders 2017-09-12 18:27:47 +03:00
Nikolay Krasko
b925df0e14 Minor: remove '\n' from if surrounder 2017-09-12 18:27:47 +03:00
Nikolay Krasko
239f88e5d3 Refactoring: use sealed classes for try-catch expression surrounders 2017-09-12 18:27:47 +03:00
Kirill Rakhman
08103d1cb4 Implement "Surround with try/catch(/finally)" and "Surround with if/else" for expressions
Fixes #KT-14175
Fixes #KT-19782
2017-09-12 18:27:47 +03:00
Mikhail Zarechenskiy
e16d16fdb7 Do not report diagnostic about annotation with receiver target twice 2017-09-12 17:39:24 +03:00
Mikhail Zarechenskiy
2048a74302 Introduce Language Feature for annotations with wrong targets
#KT-9580 Fixed
2017-09-12 17:39:23 +03:00
Mikhail Zarechenskiy
a4766cc293 Report errors on annotations with wrong use site targets
#KT-9580 In Progress
2017-09-12 17:39:22 +03:00
Mikhail Glukhikh
dafb52a44a CodeBlockModification...: count file as changed when no changed elements
It means that root PSI (KtFile itself) is changed

So #KT-19726 Fixed
So #KT-20157 Fixed
2017-09-12 17:28:32 +03:00
Mikhail Glukhikh
dd1ac5bb6b Add a set of tests for internal callables find usages
Related to KT-19811
2017-09-12 16:51:02 +03:00
Mikhail Glukhikh
97233448d0 Enclosing element: do not handle parameters of for as function ones
So #KT-19626 Fixed
2017-09-12 16:13:56 +03:00
Mikhail Glukhikh
7ae722492f Unused symbol: do not use body of function literal as scope for members
So #KT-10546 Fixed
2017-09-12 16:13:34 +03:00
Mikhail Glukhikh
4b25317ecb Minor: KtPsiUtil: extract isNonLocalCallable 2017-09-12 16:13:15 +03:00
Toshiaki Kameyama
5eb69e0ae4 KT-20010 'Replace safe access expression with 'if' expression' IDEA Kotlin plugin intention may failed (#1288)
* 'Replace safe access expression with 'if' expression' IDEA Kotlin plugin intention may failed #KT-20010 Fixed

* #KT-20010 Fixed
2017-09-12 14:54:50 +02:00
Alexander Udalov
60c735f2fd Do not use deprecated kotlin.reflect API 2017-09-12 15:08:21 +03:00
Alexander Udalov
593d6b7a95 Minor, do not use ".java.kotlin" on KClass instances 2017-09-12 15:02:25 +03:00
Alexander Udalov
ac1c7d9a6a Drop Incompatible.NoImpl, fix no "missing impl" on nested class
Header/impl declarations are now considered fully compatible even in the
case when the impl declaration has no "impl" modifier. The error about
no "impl" is now reported separately and only on the impl declaration,
never on the header declaration

 #KT-20087 Fixed
2017-09-12 14:41:11 +03:00
Vyacheslav Gerasimov
b6c32edc43 Implement Kotlin Script support in UAST
#KT-18353 Fixed
2017-09-12 13:10:38 +03:00
Vyacheslav Gerasimov
89257e6397 Implement light classes for Kotlin scripts 2017-09-12 13:10:38 +03:00
Vyacheslav Gerasimov
26cbcfa1ac J2K: AbstractCompilerLightClassTest java -> kt 2017-09-12 13:10:38 +03:00
Kirill Rakhman
7fe1e4f83e Fix grammar in inspection description 2017-09-12 12:05:30 +03:00
Dmitry Petrov
38d1d06e6e Update modifier applicability tests for LV 1.2 2017-09-12 11:54:04 +03:00
Dmitry Petrov
6b6d1e80f8 Fix enum entry reference from enum entry initialization context
Enum entries are "special" kind of singletons that should be
referenced as a captured 'this' instance inside during entry
initialization, because corresponding static fields in enum class
are not initialized yet.

 #KT-7257 Fixed
2017-09-12 11:00:24 +03:00
Anton Bannykh
40e2046e76 Updated ChangeLog.md 2017-09-11 21:06:32 +03:00
Anton Bannykh
ea9f5a7200 Update ChangeLog.md for version 1.1.50 2017-09-11 21:05:36 +03:00
Dmitry Jemerov
b2e27f9172 Add idea-jvm to ultimate classpath 2017-09-11 15:07:51 +02:00
Dmitry Jemerov
cd44131f88 Add impl module roots also when gradle-aware make is enabled 2017-09-11 15:07:51 +02:00
Dmitry Jemerov
0caadcd2f1 Put Kotlin runner on the first place 2017-09-11 15:07:51 +02:00
Dmitry Jemerov
9d2b9df3b4 Correctly run multiplatform modules
When a JVM run configuration requests compiling a common module,
compile the corresponding JVM module instead.
2017-09-11 15:07:51 +02:00
Dmitry Jemerov
1d05e83401 Recognize common tests marked with annotations typealiased to @Test 2017-09-11 15:07:51 +02:00
Dmitry Jemerov
6d30123c21 Add test dependencies when creating multiplatform projects 2017-09-11 15:07:51 +02:00
Dmitry Jemerov
aed01c8475 Consistent naming: common platform is common, not default 2017-09-11 15:07:51 +02:00
Dmitry Jemerov
62b3059425 Support running main() under JVM in multiplatform projects
#KT-20093 In progress
2017-09-11 15:07:51 +02:00
Dmitry Jemerov
0b143e982f Always delegate build/run actions in MPP projects to Gradle 2017-09-11 15:07:51 +02:00
Alexey Andreev
c90c3e4bf5 Add hack to make JS coercion compatible with older versions of stdlib 2017-09-11 14:34:35 +03:00
Alexey Andreev
0acc96c4f3 Translate reference to kotlin.Unit to a shorter JS code 2017-09-11 14:34:35 +03:00
Alexey Andreev
2656a6a513 Eliminate redundant RHS of JS comma expression 2017-09-11 14:34:34 +03:00
Alexey Andreev
37fa45dc34 Add mechanism for type coercion in JS
Use it for char boxing/unboxing and unit materialization.
Possible to use for other purposes, for example, to add type checks
to dynamics.

See KT-18793, KT-17915, KT-19081, KT-18216, KT-12970, KT-17014,
KT-13932, KT-13930
2017-09-11 14:34:34 +03:00
Mikhail Glukhikh
ae509d5980 Unused symbol: add test to fix behaviour #KT-16318 Obsolete 2017-09-11 12:12:20 +03:00
Mikhail Glukhikh
37d2386a0b Unused symbol: handle imports from nested objects correctly
So #KT-17437 Fixed
2017-09-11 12:12:18 +03:00
Mikhail Glukhikh
7e3d3bde74 Unused symbol: never use VALUE_ARGUMENT scope for members
So #KT-10546 Fixed
2017-09-11 12:12:17 +03:00
Mikhail Glukhikh
5c4e034171 Unused symbol: do not search for internal member light methods
Use direct references search instead
So #KT-19811 Fixed
2017-09-11 12:12:16 +03:00
Dmitry Petrov
4428798c61 Change diagnostic message and rename to NESTED_CLASS_DEPRECATED 2017-09-11 09:42:18 +03:00
Dmitry Petrov
66ece54b25 Fix initialization of inner class instances in enum entries
In an inner class of the enum entry class, enum entry reference should
be generated as an outer 'this', not as a enum entry access, because
enum entry itself may be not initialized yet.
2017-09-11 09:42:18 +03:00
Dmitry Petrov
26b2f59b86 Check that resolve works properly with inner classes in enum entries 2017-09-11 09:42:18 +03:00
Dmitry Petrov
ba2c3136bb Prohibit non-inner classes in enum entries since 1.3 2017-09-11 09:42:18 +03:00
Dmitry Petrov
ea91a0794d Allow modifier 'inner' on a class nested in enum entry class 2017-09-11 09:42:18 +03:00
Dmitry Petrov
488a825349 Specialize diagnostic message for nested classes not allowed 2017-09-11 09:42:18 +03:00
Mikhail Zarechenskiy
dd9ffd10b6 Preserve order of types in new type intersector 2017-09-10 22:29:07 +03:00
Dmitry Jemerov
d8b46406ab Delete unused extension point 2017-09-09 10:01:36 +02:00
Alexey Andreev
24c6f5f0f0 JS: add test to prove that KT-19483 is no more reproducible 2017-09-08 18:27:43 +03:00
Alexey Andreev
c65a79bca4 Fix tests for inline cycle diagnostics in JS 2017-09-08 18:27:42 +03:00
Alexey Andreev
c66bc0b0e9 Remap source maps in JS DCE. Improve JS DCE error logging
See KT-19821
2017-09-08 18:27:41 +03:00
Alexey Andreev
1350e3c4ac JS: improve optimization of for loop over range literals
See KT-18329, partial fix for KT-8372
2017-09-08 18:27:40 +03:00
Alexey Andreev
502c51ccff Sanitize names for backing fields and private declarations in JS BE
See KT-1816
2017-09-08 18:27:40 +03:00
Alexey Andreev
206369c088 JS: fix capturing of reified type parameters when used as class literals
See KT-19891
2017-09-08 18:27:39 +03:00
Mikhail Glukhikh
03ce6d859f Disable destructure inspection by default
Now (by default) action is accessible as intention only
So #KT-15422 Fixed
So #KT-18666 Fixed
2017-09-08 17:41:44 +03:00
Mikhail Glukhikh
c149c37ac7 Do not suggest destructuring for invisible properties #KT-18665 Fixed 2017-09-08 17:41:44 +03:00
Mikhail Glukhikh
c4ebfe8e84 Add accessors: determine header properties more correctly
Related to KT-17322
2017-09-08 16:10:55 +03:00
Mikhail Glukhikh
13775f8637 Fix broken quick-fix tests (related to KT-17322) 2017-09-08 16:10:54 +03:00
Alexey Sedunov
bdad58cec6 Kotlin Facet: Support "implements" relation between modules
#KT-17593 Fixed
2017-09-08 15:38:14 +03:00
Alexey Sedunov
8ebc766b5b Kotlin Ultimate: Support Mocha run configurations for module directory
#KT-16814 In Progress
2017-09-08 15:38:14 +03:00
Alexey Sedunov
8b64a4c8ea Override/Implement: Drop 'impl' modifier for non-impl class members
#KT-18469 Fixed
2017-09-08 15:38:14 +03:00
Alexey Sedunov
6f8503a178 Override/Implement: Do not generate bodies for header class members
#KT-15659 Fixed
2017-09-08 15:38:14 +03:00
Alexander Udalov
6c3620f481 Suppress logging from jline
#KT-19243 Fixed
2017-09-08 15:33:30 +03:00
Nikolay Krasko
69176a146e getModuleInfo.kt: refactor 2017-09-08 15:06:03 +03:00
Pavel V. Talanov
deda5e7eee Fix navigation to script dependency sources failing
Specifically in case where some lib is in project and script dependencies at the same time
2017-09-08 15:06:00 +03:00
Pavel V. Talanov
ebd3ac6dc8 Fix script resolver failing
Specifically the case where some lib is in project dependencies and script dependencies at the same time

 #EA-105435 at least partially fixed
 #KT-19458 Fixed
 #KT-19474 Fixed
2017-09-08 15:05:58 +03:00
Pavel V. Talanov
e9ce5bbb37 Infrastructure to test sharing libs by project and scripts
Allow to test scenario where project and scripts share some jar as dependency
Refactor AbstractScriptConfigurationTest
2017-09-08 15:04:20 +03:00
Pavel V. Talanov
53144def10 AbstractScriptConfigurationTest: rewrite script template setup
Allow simpler setup of common scenarios
Do not require to define DependenciesResolver for every test
Drop redundant template files
2017-09-08 15:04:17 +03:00
Pavel V. Talanov
d7149a4083 getModuleInfo.kt: allow go get all module infos for a given psiElement 2017-09-08 15:04:14 +03:00
Pavel V. Talanov
6bec17246c Fix inspections run for script dependency source files in come cases
This filter defines which files inspections are run for
In most cases other platform code prevented inspections from running for
    library source files but this check is needed to prevent KT-19377

 #KT-19377 Fixed
2017-09-08 15:03:30 +03:00
Nikolay Krasko
6b14d15374 Clean state in AbstractKotlinKapt3IntegrationTest 2017-09-08 12:56:28 +03:00
Nikolay Krasko
c479e585ca Clean project in uast tests 2017-09-08 12:56:28 +03:00
Nikolay Krasko
fcab80db96 Add uast-tests files to our project
Copy files from obsolete project https://github.com/JetBrains/uast
2017-09-08 12:56:28 +03:00
Nikolay Krasko
6fd3ce07b3 Force remove JpsModel in BaseKotlinJpsBuildTestCase tests 2017-09-08 12:56:28 +03:00
Nikolay Krasko
eb7a984843 Store descriptor via soft reference to avoid holding project from debugger 2017-09-08 12:56:28 +03:00
Alexander Udalov
2877314313 Support "::foo" as a short-hand for "this::foo"
#KT-15667 Fixed
2017-09-08 10:59:44 +03:00
Alexey Andreev
d2ff821a3b JS: prove that lambdas in inline function compiled correctly
Obsoletes KT-19712
2017-09-08 10:57:42 +03:00
Alexey Andreev
ff0efe59f6 JS: fix error in generation of if/else statements in some cases
See KT-19495
2017-09-08 10:56:49 +03:00
Alexey Andreev
4779f4fefb JS: don't mark access to captured var as pure
See KT-19108
2017-09-08 10:56:06 +03:00
Alexey Sedunov
f2b6644db5 Kotlin Ultimate: Add JS debugger plugin dependency
This fixes tests failure due to unresolved NodeJS dependency
2017-09-08 03:42:22 +03:00
Ilya Gorbunov
980feffffa Improve @PublishedApi annotation docs #KT-19881 2017-09-07 20:07:27 +03:00
Alexey Sedunov
78b1fb2e93 Kotlin Facet: Avoid reparse of additional arguments during analysis 2017-09-07 17:39:18 +03:00
Alexey Sedunov
dcd966f7c2 Kotlin Ultimate: Support Mocha run configurations for Kotlin sources
#KT-16814 In Progress
2017-09-07 17:39:17 +03:00
Alexey Sedunov
4f647e84c9 Line Marking: Respect @Test/@Ignore annotations in test line markers
#KT-16814 In Progress
2017-09-07 17:39:16 +03:00
Toshiaki Kameyama
5a5a27b983 Intentions to generate accessors for a property #KT-17322 Fixed 2017-09-07 17:33:39 +03:00
Toshiaki Kameyama
fe0f44da94 Added "Add remaining branches with import" quick fix #KT-16033 Fixed 2017-09-07 16:24:35 +03:00
Mikhael Bogdanov
2fa4c28e0f Properly reorder arguments in anonymous object super class constructor
#KT-18356 Fixed
2017-09-07 15:18:05 +02:00
Mikhael Bogdanov
44fd8103d4 Convert ObjectSuperCallArgumentGenerator to Kotlin 2017-09-07 15:18:04 +02:00
Mikhael Bogdanov
ddb6e3307e Rename ObjectSuperCallArgumentGenerator.java to ObjectSuperCallArgumentGenerator.kt 2017-09-07 15:18:04 +02:00
Mikhael Bogdanov
529036eb78 Move ObjectSuperCallArgumentGenerator to separate file 2017-09-07 15:18:03 +02:00
Nikolay Krasko
c327118eac Remove PCE throwing as it can cancel background tasks (KT-19901)
Method can be called from the background task and be paused because
the write action is in progress. Throwing the PCE might stop the whole
task, that is wrong.

Explicit read action seems to be unneeded.

#KT-19901 Fixed
2017-09-07 16:10:09 +03:00
Nikolay Krasko
d38fd0fdf8 Need reformat inspection 2017-09-07 16:10:09 +03:00
scache
ba19931aef Keep braces in redundant cascade if #KT-19704 Fixed 2017-09-07 15:23:04 +03:00
Dmitry Jemerov
97e4dbe330 Add 'multiplatform' to spellchecker dictionary 2017-09-07 12:29:24 +02:00
Dmitry Jemerov
e1b79fc316 Show descriptions for Kotlin Gradle frameworks 2017-09-07 12:29:24 +02:00
Dmitry Jemerov
f840d0df41 Wizard for creating multiplatform projects 2017-09-07 12:29:24 +02:00
Dmitry Jemerov
140db74607 Correctly import 'implements' dependencies on root project 2017-09-07 12:29:24 +02:00
Dmitry Jemerov
369f3d6553 Don't break dependency import on invalid 'implement' dependency 2017-09-07 12:29:24 +02:00
Dmitry Jemerov
e392b4a427 Framework providers for modules of Kotlin multiplatform projects 2017-09-07 12:29:24 +02:00
Mikhail Zarechenskiy
088800d82f Report error about val reassignment via backing field since Kotlin 1.3
Also improve message for current warning

 #KT-16681 Fixed
2017-09-07 12:54:31 +03:00
Mikhail Zarechenskiy
03440210ee Introduce language version 1.3 2017-09-07 12:52:32 +03:00
Alexander Udalov
27b8b209e3 Refactor accessors for backing fields in JVM back-end 2017-09-07 12:24:54 +03:00
Alexander Udalov
326111aece Render .kotlin_module files nicely for tests 2017-09-07 12:24:53 +03:00
Mikhael Bogdanov
1cf8ee9433 Don't remove nullability assertions of anonymous object transformation
#KT-19910 Fixed
2017-09-06 17:48:13 +02:00
Ilya Gorbunov
599113b30f Fix internal KotlinVersion representation that caused invalid comparison 2017-09-06 18:45:33 +03:00
Alexey Andreev
5bf4540458 JS: fix inlining of functions derived from other modules
See KT-16408
2017-09-06 17:55:31 +03:00
Alexey Andreev
361d6dfca0 JS: rewrite source map generator to use specialized JSON writer
Fixes problems with string escaping. See KT-20005
2017-09-06 17:55:06 +03:00
Yan Zhulanow
187ca71dc6 NoArg: Fix compatibility with sealed classes with non-zero-parameter constructors (KT-19687)
Also check if a class has a sealed super class properly.
2017-09-06 17:40:20 +03:00
Yan Zhulanow
cea891c754 Kapt: Do not replace '/' with dots before converting to fqName (KT-19680)
getQualifiedName() converts slashes by itself, and it causes the internal name equality check (it.name == classFromSources.name) to fail.
This reproduces only for the pure synthetic classes (for which we don't generate Java light classes).
2017-09-06 17:40:19 +03:00
Yan Zhulanow
fe3413c291 Parcelable: Add INNERCLASS metadata to Creator factory class and its outer class 2017-09-06 17:40:19 +03:00
Yan Zhulanow
04c2e28341 Kapt: Do not use awkward ('$' -> '/') logic for KAPT3 class builder mode
So (for the most often reproduction case) #KT-19433 Fixed

Before this commit, internal names for nested classes were written as test/Foo/Bar (comparing to test/Foo$Bar in the normal mode), as getting qualified names from such internal names was trivial. But, because of IC, we needed to write class files to the disk, so our decompiler could find such "broken" classes and read it in a wrong way.
2017-09-06 17:40:18 +03:00
Yan Zhulanow
c330285fd0 Parcelable: Use innerClassNameFactory to figure out the internal name of the Creator class (KT-19680)
KAPT3 class builder mode in 1.1.4 replaces '$' (inner class name separators) with '/' by providing special innerClassNameFactory.
We should use it to be compatible with kapt.
2017-09-06 17:40:18 +03:00
Yan Zhulanow
84e59601c1 Kapt: Generic arguments in anonymous type should always be mapped to boxed types (KT-19750) 2017-09-06 17:40:17 +03:00
Yan Zhulanow
4d9a612a64 Kapt: Substitute type parameters from the actual type, not from the anonymous one (KT-19700) 2017-09-06 17:40:16 +03:00
Dmitry Jemerov
4e4291c586 Fix formatting of class headers when "blank lines after class
header" is enabled
2017-09-06 15:11:05 +02:00
Anton Bannykh
f4b329a055 JS: support @Before and @After annotations in kotlin.test 2017-09-06 14:36:45 +03:00
Dmitry Petrov
8c5d18c1f2 Tests for boxing optimization on KClass are JVM-specific 2017-09-06 14:20:05 +03:00
Dmitry Petrov
61faa068d4 Do not optimize == for KClasses in redundant boxing elimination
For primitive wrappers such as java.lang.Integer,
  jlc = java.lang.Integer.class
  jlt = java.lang.Integer.TYPE
  !(ljc.equals(ljt))
However, in Kotlin corresponding KClass instances are equal.

 #KT-17748 Fixed Target versions 1.1.50
 #KT-17879 Fixed Target versions 1.1.50
2017-09-06 09:54:36 +03:00
Dmitry Petrov
2b27e64fc8 Improve diagnostics for "not yet supported in inline"
- Tell user what exactly is not supported (e.g., local inline function)
- Reduce diagnostics range to a keyword or an identifier
  where appropriate

 #KT-16223 Fixed Target versions 1.1.50
2017-09-06 09:46:33 +03:00
Mikhael Bogdanov
160ba0c7c0 Destroy state and environment in android test 2017-09-06 08:20:33 +02:00
Mikhael Bogdanov
71663afbfe Update android test configuration 2017-09-06 08:20:33 +02:00
Mikhael Bogdanov
81a1bf3319 Recalculate max stack on method emitting: optimizations could change it 2017-09-06 08:20:32 +02:00
Nikolay Krasko
638cf346aa Add soutf template for printing current position (KT-19709)
#KT-19709 Fixed
2017-09-05 19:49:58 +03:00
Nikolay Krasko
2ce6a0eaee Minor: fix warnings in TypedHandlerTest.kt 2017-09-05 19:49:02 +03:00
Nikolay Krasko
385ff3f4eb Test for smart indent in parameters (KT-17648)
Fixed in IDEA-173208

#KT-17648 Fixed
2017-09-05 19:49:01 +03:00
Nikolay Krasko
80ffc5cd41 Make local file indent feature work for Kotlin files
Revert "Add language to formatting blocks to fetch indent settings propertly"
This reverts commit d717da5
2017-09-05 19:49:01 +03:00
Toshiaki Kameyama
e01371b231 Redundant getter / setter inspection #KT-19514 Fixed (#1282) 2017-09-05 17:27:56 +02:00
Mikhail Zarechenskiy
a3060f1073 Add test on obsolete issue
#KT-9203 Obsolete
2017-09-05 16:15:18 +03:00
Dmitry Petrov
21cdf9dd5b Add cast to expected type in call-based in-expression generation
#KT-20106 Fixed
2017-09-05 15:32:53 +03:00
Mikhail Zarechenskiy
081b732070 Improve diagnostics for lateinit properties with generic type
#KT-11834 Fixed
2017-09-05 14:44:55 +03:00
Mikhail Zarechenskiy
356f903645 Make classes for CLI public to reuse them in other tools
To configure Kotlin environment and use them in plugins for Eclipse or NetBeans
2017-09-05 14:42:48 +03:00
Mikhail Zarechenskiy
0dc29d6d7e Get rid of passing typeChecker from the call hierarchy 2017-09-05 14:41:46 +03:00
Mikhail Zarechenskiy
e7449a3584 Fix referencing inner class constructor on an outer class instance
#KT-12796 Fixed
2017-09-05 14:41:44 +03:00
Mikhail Zarechenskiy
4a6f35b9c2 Fix exception on invalid code, don't resolve uninitialized type
#KT-11963 Fixed
2017-09-05 14:41:42 +03:00
Mikhail Zarechenskiy
6d4bb229ac Fix compilation exception where overload ambiguity should be
#KT-16246 Fixed
2017-09-05 14:41:40 +03:00
Mikhail Zarechenskiy
ec512d1c8a Add tests on obsolete issues
#KT-11236 Obsolete
 #KT-12399 Obsolete
2017-09-05 14:41:34 +03:00
Dmitry Jemerov
cbe79e94a6 Update testdata 2017-09-04 20:39:52 +02:00
scache
e5b290d77f Fix replacedBaseClause for selector which has implicit receiver
#KT-19666 Fixed
2017-09-04 20:36:07 +02:00
Toshiaki Kameyama
a9a52379ee Quickfix for "variable initializer is redundant" (VARIABLE_WITH_REDUNDANT_INITIALIZER) #KT-5878 Fixed (#1281) 2017-09-04 16:58:32 +02:00
Pavel V. Talanov
653314e671 IDE script support: cancel coroutines on project disposal 2017-09-04 16:35:28 +03:00
Pavel V. Talanov
7f361c7579 Add utility for EDT coroutines to be canceled on project disposal 2017-09-04 16:33:31 +03:00
Dmitry Jemerov
7ca1fe0f55 Fix compilation 2017-09-04 14:39:25 +02:00
Alexey Andreev
b8aa2f81a2 Fix delegate property name clash in JS BE
See KT-19542
2017-09-04 15:35:35 +03:00
Alexey Andreev
28c9d274ec JS: prohibit illegal chars on dynamic call site
See KT-19540
2017-09-04 15:35:00 +03:00
Alexey Andreev
5a984a40e6 Fix JS compiler crash when translating external object fun with vararg
See KT-19793
2017-09-04 15:34:10 +03:00
Alexey Andreev
989cebe79e JS: fix bug in temporary variable eliminator
The problem was in considering `a` as trivial in following case:

```
var a = b;
```

However, that's wrong assumption, since `b` can be temporary variable
itself which is further substituted by a non-trivial expression.
2017-09-04 15:33:16 +03:00
Alexey Andreev
abb254297a Properly rename local name aliases when merging JS fragments together 2017-09-04 15:33:16 +03:00
Alexey Andreev
593aa72439 Fix bug in new JS inliner when inlining nested calls 2017-09-04 15:33:15 +03:00
Alexey Andreev
63855af026 Raise JS metadata version due to incompatible changes in inliner 2017-09-04 15:33:14 +03:00
Alexey Andreev
df7d69b5b4 Minor refactoring after improving JS inliner 2017-09-04 15:33:14 +03:00
Alexey Andreev
918ce78c5a Support inlining internal functions to friend modules in JS BE
There's one exception: if an inline internal function calls
private function, this will fail at run time.
2017-09-04 15:33:13 +03:00
Alexey Andreev
41140d00b1 JS: do not copy declarations from inline function wrapper more than once 2017-09-04 15:33:13 +03:00
Alexey Andreev
1260146d25 Use local aliases for char boxing and unboxing in JS BE 2017-09-04 15:33:12 +03:00
Alexey Andreev
7646c2fc72 Use local aliases for Kotlin runtime functions in JS BE 2017-09-04 15:33:11 +03:00
Alexey Andreev
8c256b24dc Avoid duplication of imports introduced during JS inlining 2017-09-04 15:33:10 +03:00
Alexey Andreev
f2b2e20331 Minor cleanup in JS backend 2017-09-04 15:33:10 +03:00
Alexey Andreev
b90885d1cb Support new inline function format in JS DCE tool 2017-09-04 15:33:09 +03:00
Alexey Andreev
901346243d JS: fix inlining of function that calls functions from other modules 2017-09-04 15:33:08 +03:00
Alexey Andreev
6bb5d00700 Fix inlining of default arguments in JS BE 2017-09-04 15:33:07 +03:00
Alexey Andreev
834cd1d93d Fix testdata for new JS inliner 2017-09-04 15:33:07 +03:00
Alexey Andreev
61ba6e528a Fix JS line number tests 2017-09-04 15:33:06 +03:00
Alexey Andreev
df782eaadd Fix incremental compilation to JS with new inliner 2017-09-04 15:33:06 +03:00
Alexey Andreev
eb6186b74d Fix translation of classes to work with new JS inliner 2017-09-04 15:33:05 +03:00
Alexey Andreev
8e6b1da592 Generate less JS inline function wrappers 2017-09-04 15:33:04 +03:00
Alexey Andreev
aaf3380050 Add optimizer for trivial functions with wrappers in JS BE 2017-09-04 15:33:04 +03:00
Alexey Andreev
445a80c755 Support new JS inline function format in multi-module projects 2017-09-04 15:33:03 +03:00
Alexey Andreev
7c421b0b83 Refactor JS translator to generate code for new inliner 2017-09-04 15:33:03 +03:00
Nicolay Mitropolsky
29857e48c8 KtLightAnnotationTest fix for oddly broken annotations getter 2017-09-04 15:20:20 +03:00
Nicolay Mitropolsky
be4b86e3d9 KtLightAnnotationForSourceEntry fix for smart-pointers creating
`LightElementValue` made PsiCompiledElement to make it properly anchorable when creating smartpointers, when still use `kotlinOrigin.containingFile` for it to be able to `registerProblem` on such elements. (refs KT-18054)
2017-09-04 15:20:20 +03:00
Dmitry Jemerov
b0fb3370e3 Correctly get qualified name for properties without backing field
#KT-19903
2017-09-04 13:21:03 +02:00
Dmitry Jemerov
cc6bfcfc7c Attach super line marker to name identifier
#KT-19843 Fixed
2017-09-04 13:21:03 +02:00
Dmitry Jemerov
f008736ef7 Fix package name convention pattern
#KT-19927 Fixed
2017-09-04 13:21:03 +02:00
Dmitry Jemerov
f709bd869a Accept invalid patterns in naming convention settings
#KT-19926 Fixed
2017-09-04 13:21:03 +02:00
Dmitry Jemerov
f74416a151 Cache the result of hasTopLevelCallables() for a KtFile
#KT-19885 Fixed
2017-09-04 13:21:03 +02:00
Dmitry Jemerov
839f197a1e KtFile: J2K and cleanup 2017-09-04 13:21:03 +02:00
Dmitry Jemerov
ebef2dc0cf KtFile: rename to .kt 2017-09-04 13:21:03 +02:00
dzieciolowski
80f1a1bde8 Update gradle.xml - remove typo (#1279) 2017-09-04 13:11:24 +02:00
Alexander Udalov
840fce520c Update KotlinVersion.CURRENT to 1.1.50 2017-09-04 13:09:52 +03:00
Dmitry Jemerov
2d10df1541 Fix red code: mark dependency as exported 2017-09-01 16:59:03 +02:00
Dmitry Jemerov
81d0445775 Fix master-171 build: don't use API introduced in newer IDEA 2017-09-01 16:54:24 +02:00
Dmitry Jemerov
ad37626af3 Fix compilation of KotlinBytecodeToolWindow 2017-09-01 16:41:26 +02:00
Dmitry Jemerov
59976baac2 Fix path to generated test 2017-09-01 15:27:44 +02:00
Dmitry Petrov
76acd23bd7 Revert "Fix synthetic accessor generation for properties"
This reverts commit 2427b2c
2017-09-01 16:09:29 +03:00
Dmitry Jemerov
db840a73a9 Set scope of all plugin module dependencies to provided 2017-09-01 14:06:39 +02:00
Alexander Udalov
05290c3ed2 Fix AssertionError on incompatible scopes with impl typealias
This has been introduced in 9ecd04f628
2017-09-01 14:47:29 +03:00
Pavel V. Talanov
f695ff96e8 IDEKotlinBinaryClassCache: store soft reference in UserData
Storing hard reference leads to binary headers being stored indefinitely
2017-09-01 14:30:27 +03:00
Dmitry Jemerov
0fa4e1cbaf Set scope of plugin dependencies to provided 2017-09-01 13:11:39 +02:00
Vyacheslav Gerasimov
5220dfc0ad Android: Add inspection & quickfix to convert findViewById to api 26
#KT-19940 Fixed Target Version 1.1.5
2017-09-01 13:32:52 +03:00
Vyacheslav Gerasimov
be900a76d8 Android Lint: check for array initializer in SuppressLint 2017-09-01 13:32:08 +03:00
Vyacheslav Gerasimov
f4da6c2cc6 UAST: findAttributeValue returns default value when no declared value found 2017-09-01 13:32:00 +03:00
Vyacheslav Gerasimov
56a075eab6 UAST: Fix annotation arguments processing
multiple unnamed arguments represented as value named expression with array initializer
 call kind for array in annotation argument should be "array initializer" instead of "method call"

 #KT-16600 Fixed Target Versions 1.1.5
2017-09-01 13:31:50 +03:00
Dmitry Jemerov
e0bf438195 Move .xml files back to main idea module 2017-09-01 11:57:37 +02:00
Dmitry Jemerov
895d5fda46 Extract parts of plugin that depend on Java-only plugins to idea-jvn 2017-09-01 11:57:37 +02:00
Dmitry Jemerov
8b0d606ab5 Move Android .xml file to idea-android module 2017-09-01 11:57:37 +02:00
Dmitry Jemerov
9eace7b295 Move Gradle tests to idea-gradle module; remove idea dep on idea-gradle 2017-09-01 11:57:37 +02:00
Dmitry Jemerov
d2972314bc Remove duplicate version detection code from AddKotlinLibQuickFix 2017-09-01 11:57:37 +02:00
Dmitry Jemerov
92103ff393 Add tests for "add kotlin-reflect.jar" quickfix 2017-09-01 11:57:37 +02:00
Dmitry Jemerov
feeacda12b Extract logic of adding a dependency to KotlinProjectConfigurator 2017-09-01 11:57:37 +02:00
Dmitry Jemerov
f5cea51d21 idea no longer depends on idea-maven 2017-09-01 11:57:37 +02:00
Dmitry Jemerov
bf639b1272 Move logic of EnableUnsupportedFeatureFix into KotlinProjectConfigurator 2017-09-01 11:57:37 +02:00
Dmitry Jemerov
6fbb370eae Move coroutine state update logic to KotlinProjectConfigurator 2017-09-01 11:57:37 +02:00
Dmitry Jemerov
e781b70170 Remove unnecessary dependency 2017-09-01 11:57:37 +02:00
Dmitry Jemerov
6f9869ae11 Remove unnecessary dependency 2017-09-01 11:57:37 +02:00
Dmitry Jemerov
d8b6bd5cb3 Decouple idea-analysis from Android
Introduce API for extending syntax highlighting; use it in android
component
2017-09-01 11:57:37 +02:00
Dmitry Jemerov
982461e207 Remove unnecessary dependencies 2017-09-01 11:57:37 +02:00
Dmitry Petrov
5d44e095c8 Nullability assertions for extension receiver
In Kotlin 1.1 and before, there were no nullability assertions on
extension receivers, because receiver is resolved with NO_EXPECTED_TYPE.
So, if an expression of platform type is passed as an extension receiver
to a non-private function, it would fail with IllegalArgumentException.
However, if the function is private, then we generated no parameter
assertions under assumption that such function can be called from Kotlin
only, and all arguments are checked on the call site. Thus 'null' could
propagate indefinitely.

In Kotlin 1.2, we do the following:
- Generate nullability assertions for expression receivers.
NB nullability assertions are stored for ReceiverValue instances, not
for expressions: given expression can act as receiver in different
calls, each with an expected receiver type of its own.
- Generate nullability assertions for extension receivers of private
operator functions.
NB it still can throw NPE for some particular "optimized" cases, but at
least those nulls would not propagate indefinitely.

This behavior is disabled by an "advanced" command-line option
'-Xno-receiver-assertions'.
2017-09-01 09:49:21 +03:00
Dmitry Petrov
2427b2cc6c Fix synthetic accessor generation for properties
Generate synthetic accessors for property accessors only if the
corresponding methods are accessible in the current context.

 #KT-19306 Fixed Target versions 1.1.5
2017-09-01 09:48:26 +03:00
Mikhail Zarechenskiy
dde0efd8ab Refactoring: extract anonymous objects to classes, rename variable 2017-09-01 02:24:35 +03:00
Mikhail Zarechenskiy
f5222600d8 Improve diagnostics for fake calls when type inference failed
#KT-13665 Fixed
2017-09-01 02:05:58 +03:00
Mikhail Zarechenskiy
17b4874c37 Refactor FakeCallResolver, make error reporting simpler 2017-09-01 02:05:50 +03:00
Sergey Igushkin
ff1c5ad793 Merge pull request #1260 from JetBrains/kotlinx.serialization.patches/gradle
Support for gradle subplugins in Kotlin2JS compilation
2017-09-01 01:03:37 +03:00
Leonid Startsev
a0ddef22ef Extension points for serialization plugin in JS translator:
* Plugins for JS CLI compiler now can be loaded via -XPlugin option
* New extension point in project
* JS translator modified to accept synthetic declarations and call
 extension.
* Some functions made public to create a small API
2017-09-01 00:50:46 +03:00
Toshiaki Kameyama
0246b82833 @deprecated with multi-line message in Javadoc converted to @Deprecated("long ugly string") #KT-19644 Fixed (#1253) 2017-08-31 14:15:15 +02:00
Denis Zharkov
4e4bf31016 Fix loading JSR-305 nicknames for @CheckForNull annotation
For sake of working without jsr305.jar in the classpath `resolveTypeQualifierAnnotation`
may return javax.annotation.CheckForNull (although the latter is nickname itself)

 #KT-19985 Fixed
2017-08-31 15:13:26 +03:00
Denis Zharkov
ed79891ee6 Fix type mapping for parameter of Collection<Int>::remove override
In the case the single parameter of override has `Integer` type instead
of `int` type (while in common case it would be just `int`)

See the comment inside forceSingleValueParameterBoxing for clarification

 #KT-19892 Fixed
2017-08-31 12:38:08 +03:00
Denis Zharkov
73c139d250 Minor. Drop unused ExpressionCodegen::expressionJetType 2017-08-31 12:35:41 +03:00
Denis Zharkov
6af91b8c97 Drop redundant tests erroneously added in c8d25c587a 2017-08-31 12:35:05 +03:00
Denis Zharkov
80a90572d6 Fix target for annotations/metadata on open suspend functions
Get rid of rewriting of vars in FunctionCodegen::generateMethod,
just extracted generateMethodBody instead

 #KT-19814 Fixed
2017-08-31 12:27:28 +03:00
Dmitry Petrov
742fecf69c Minor: readability improvements after code review 2017-08-31 11:28:08 +03:00
Dmitry Petrov
21e3051a78 Use Name instead of String for lateinit-related StackValues
to emphasize that this is a descriptor name, not a JVM name
2017-08-31 11:28:08 +03:00
Dmitry Petrov
c8d25c587a Do not use reflection it local/top-level lateinit tests 2017-08-31 11:28:08 +03:00
Dmitry Petrov
638eb28692 Unify code for lateinit properties and local variables checking 2017-08-31 11:28:08 +03:00
Dmitry Petrov
b12e20b2a3 Minor: move local lateinit tests to lateinit/local 2017-08-31 11:28:08 +03:00
Dmitry Petrov
bbf9bf91fc Check language feature support for local and top-level lateinit vars 2017-08-31 11:28:08 +03:00
Dmitry Petrov
01cce59c35 Make sure lateinit top-level properties work in JVM BE 2017-08-31 11:28:08 +03:00
Dmitry Petrov
d951e957ea Support lateinit modifier on top-level properties
Allow lateinit modifier on top-level properties.
Modifiers 'lateinit' and 'header' are incompatible.
2017-08-31 11:28:08 +03:00
Dmitry Petrov
78b69cad77 Support lateinit local vars in redundant null check elimination
Lateinit local vars are guaranteed to be non-null after store.
So we mark such stores as storing non-null value
(could be useful for some other constructs, too),
and optimize null checks accordingly.
2017-08-31 11:28:08 +03:00
Dmitry Petrov
d0b0fdd732 Ignore lateinit local vars tests in JS and Native 2017-08-31 11:28:08 +03:00
Dmitry Petrov
c5b9d500bc Support lateinit local vars in JVM BE 2017-08-31 11:28:08 +03:00
Dmitry Petrov
53961e8df0 Check lateinit applicability for local variables
TODO probably should be refactored together with DeclarationsChecker
2017-08-31 11:28:08 +03:00
Dmitry Petrov
3bae430d49 Resolve lateinit variables
Do not report UNINITIALIZED_VARIABLE on lateinit variables
Provide delegating constructors for descriptors for compatibility.
2017-08-31 11:28:08 +03:00
Dmitry Petrov
f88cd5ed3d Allow 'lateinit' modifier on local variables 2017-08-31 11:28:08 +03:00
Pavel V. Talanov
352071dc4a Avoid creating ModuleSourceInfo instances with empty content
This is overall desirable because it means less ModuleDescriptor
    instances which is good for IDE analysis performance
2017-08-30 19:22:30 +03:00
Dmitry Jemerov
a623fb5312 Cleanup 2017-08-30 15:37:03 +02:00
Toshiaki Kameyama
29d2482b62 J2K RemovePartsFromPropertyFix 2017-08-30 15:36:58 +02:00
Toshiaki Kameyama
350cea7afd move RemovePartsFromPropertyFix.java to RemovePartsFromPropertyFix.kt 2017-08-30 15:36:26 +02:00
Toshiaki Kameyama
be64a6feeb INAPPLICABLE_LATEINIT_MODIFIER should have a quickfix to remove initializer #KT-18826 Fixed 2017-08-30 15:36:25 +02:00
Dmitry Jemerov
a68312379e Update ReadMe.md (#1274) 2017-08-30 15:25:48 +02:00
Denis Zharkov
aef5911c7e Obtain original suspend function view for inline codegen
It's necessary for generic inline suspend as a codegen
for it uses binding slice SUSPEND_FUNCTION_TO_JVM_VIEW
to generate fake continuation parameter, so all the
descriptors that are used for body generation must be
obtained from the SUSPEND_FUNCTION_TO_JVM_VIEW

 #KT-19528 Fixed
2017-08-30 16:19:43 +03:00
Alexander Udalov
abb07ced6d Minor, improve kdoc on JvmStatic 2017-08-30 15:51:30 +03:00
Alexander Udalov
fb4bf4e5b8 Report error if Java 9 module "kotlin.stdlib" is not found in the graph
Use "-Xallow-kotlin-package" to suppress this error

 #KT-19176 Fixed
2017-08-30 15:47:54 +03:00
Alexander Udalov
f47093dc45 Allow to access unexported package of named module in unnamed module in IDE
#KT-19492 Fixed
2017-08-30 15:45:45 +03:00
Alexander Udalov
290deb6ba4 Minor, improve test on Java 9 modules
Test that unnamed module does not read unexported package of a named
module
2017-08-30 15:45:45 +03:00
Alexander Udalov
09c1115ff9 Report errors on usages of unnamed module from named modules in IDE
#KT-19493 Fixed
2017-08-30 15:45:45 +03:00
Denis Zharkov
0d7c0d4e5e Add auto-generated tests after d6fbb084b1 2017-08-30 15:07:31 +03:00
Mikhael Bogdanov
b231bf0207 Switch custom jre path for run configuration from 9-ea to 9 jdk 2017-08-30 13:18:43 +02:00
Mikhael Bogdanov
ce0fb60ff4 Switch custom jre path for run configuration from 9-ea to 9 jdk 2017-08-30 12:52:44 +02:00
Denis Zharkov
d6fbb084b1 Use the same temporary trace for analyzing all candidate calls
Otherwise, when completing all the unsuccessfull candiates,
resolution of each lambda-arguments starts repeatedly for each candidate
that leads to exponential time

NB: Changes in `completeArguments` are necessary because otherwise
nested lambdas will be analyzed twice:
once for the main resolved call, and then for all candidates
that again leads to exponential complexity

 #KT-16672 Fixed
 #KT-19457 Fixed
2017-08-30 12:51:29 +03:00
Mikhael Bogdanov
84c2e01161 Update changelog for 1.1.4-3 2017-08-30 10:43:11 +02:00
Mikhael Bogdanov
68522b9f1e Use lazy logging in lowers 2017-08-30 10:41:55 +02:00
Dmitry Jemerov
dce6cb0cfc Highlight Kotlin files in build output
#KT-12246 Fixed
2017-08-30 10:18:00 +02:00
Pavel V. Talanov
4ada692421 Provide correct resolve scope to binaries in script dependencies
#KT-16760 Fixed
2017-08-29 20:55:20 +03:00
Pavel V. Talanov
a120130069 Workaround NonClasspathClassFinder not supporting inner classes
Explicitly split qualified names, can be removed once platform is fixed

 #KT-19310 Fixed
2017-08-29 20:54:25 +03:00
Toshiaki Kameyama
a6c2135851 Counter loop in Java is transformed to less effective loop in Kotlin #KT-19337 Fixed 2017-08-29 17:37:58 +02:00
Dmitry Jemerov
eefc6ebcc9 Add missing read action in KotlinBuildScriptManipulator 2017-08-29 17:33:42 +02:00
baratynskiy
67fdd9f76e javac-wrapper: fixes after rebase and review 2017-08-29 18:01:36 +03:00
baratynskiy
2dc0c55e76 javac-wrapper: get rid of TreePath because it is slow 2017-08-29 18:01:36 +03:00
baratynskiy
1b0d7ff5be javac-wrapper: constant evaluator 2017-08-29 18:01:36 +03:00
baratynskiy
4f180e1292 javac-wrapper: identifier resolver 2017-08-29 18:01:36 +03:00
baratynskiy
01883a41cb javac-wrapper: refactoring, fixes and tests 2017-08-29 18:01:36 +03:00
baratynskiy
8494e54608 javac-wrapper: -Xuse-javac -> -Xuse-javac and -Xcompile-java 2017-08-29 18:01:36 +03:00
Nicolay Mitropolsky
2224720a90 findClass is nullable in IDEA 171, so !! added 2017-08-29 17:40:53 +03:00
Nicolay Mitropolsky
108a40261b KtLightAnnotationForSourceEntry fix for reading unnamed java-annotation parameter 2017-08-29 17:32:07 +03:00
Sergey Igushkin
e1924e0d2f (minor) Modify warning logic for separate classes dirs opt-out flag
(cherry picked from commit 0dfe1a1)
2017-08-29 14:39:17 +03:00
Sergey Igushkin
0e28d612e7 Add a test for the opt-out flag for disabling separate classes directory
(cherry picked from commit 393966d)
2017-08-29 14:39:17 +03:00
Sergey Igushkin
0263919dbd Provide an opt-out flag for separate classes dirs with Gradle 4.0+
Issue #KT-19774 Fixed

(cherry picked from commit 2aa6f5a)
2017-08-29 14:39:17 +03:00
Dmitry Jemerov
843a9871b1 Detect library kind field based on type, not name 2017-08-29 10:29:22 +02:00
Dmitry Jemerov
106db13a6a Add missing read action (EA-105188 - assert: FileManagerImpl.findFile) 2017-08-29 10:16:35 +02:00
Dmitry Jemerov
f37cc9c8ef Start read action at correct time (EA-105045) 2017-08-29 10:16:35 +02:00
Dmitry Jemerov
f7f3bacc8e Add missing write action (EA-102929) 2017-08-29 10:16:34 +02:00
Dmitry Jemerov
cc5d23440e Correctly check for project disposed (EA-103064) 2017-08-29 10:16:33 +02:00
Alexey Tsvetkov
ac3beabf43 Update 'idea.plugins.compatible.build' in KotlinCoreEnvironment
When compiler test was run before Intellij tests,
KotlinCoreEnvironment set the 'idea.plugins.compatible.build'
system property to '171.9999', which then prevented
Kotlin plugin from loading in Intellij tests (so all these tests failed),
because Kotlin plugin has 'sinceBuild' set to '172.1'.
2017-08-29 04:28:10 +03:00
Alexey Tsvetkov
cb1ffdccd7 Add test where unused file is removed 2017-08-29 04:28:10 +03:00
Alexey Tsvetkov
10feac9402 Remove CacheVersionChangedIT#testExperimentalCacheVersionChanged
experimental-format-version.txt was removed recently.
See also 534db2d45b
2017-08-29 04:28:09 +03:00
Alexey Tsvetkov
8e10a22aab Use correct task name in KaptIncrementalIT test 2017-08-29 04:28:09 +03:00
Alexey Tsvetkov
66a77c7ec2 Fix Gradle IC cache version checking 2017-08-29 04:28:09 +03:00
Alexey Tsvetkov
cf72b14b34 Fix typo in test name 2017-08-29 04:28:08 +03:00
Alexey Tsvetkov
141c889a84 Make test case more useful 2017-08-29 04:28:08 +03:00
Alexey Tsvetkov
5f9bad5905 Add JS specific build logs to inline properties IC tests
Unlike the JVM target platform, the JS back-end does
not track getters' and setters' usages separately,
so when either accessor of some property is changed,
all usages of that property will be rebuilt.
2017-08-29 04:28:07 +03:00
Alexey Tsvetkov
73b63bb343 Refactor inline properties tests 2017-08-29 04:28:07 +03:00
Alexey Tsvetkov
44e8ae3571 JS IC: detect inline function changes 2017-08-29 04:28:07 +03:00
Alexey Tsvetkov
b73d5cbe1f Mock constant search in JPS tests 2017-08-29 04:28:06 +03:00
Alexey Tsvetkov
2312013c41 Move JVM specific IC tests to separate dir 2017-08-29 04:28:06 +03:00
Alexey Tsvetkov
556c43ae00 Update lookup tracker test "classifierMembers"
Before the change, the initial build has been failing,
so lookups from deserialized descriptors were not tested.
2017-08-29 04:28:06 +03:00
Alexey Tsvetkov
4a591bf5b6 Avoid processing JS IC output when compilation failed 2017-08-29 04:28:05 +03:00
Alexey Tsvetkov
66cb45c202 Minor: replace forEach with filterTo 2017-08-29 04:28:05 +03:00
Alexey Tsvetkov
dbe3baf740 Minor: mark calculateSourcesToCompile abstract 2017-08-29 04:28:04 +03:00
Alexey Tsvetkov
919daefb0e Rename IncrementalCacheImpl->IncrementalJvmCache 2017-08-29 04:28:04 +03:00
Alexey Tsvetkov
093bbc069a Fix typo destonationDir->destinationDir 2017-08-29 04:28:04 +03:00
Alexey Tsvetkov
b28382b8e7 Ignore out directory everywhere
After IDEA-175172 JPS does not use Gradle's output directories
when buildsing imported projects.
Now JPS uses an `out/` directory instead,
which wasn't gitignored anywhere besides the project's root.
2017-08-29 04:28:03 +03:00
Alexey Tsvetkov
1c4ada2008 Fix searching serialized classes package contains multiple fragments 2017-08-29 04:28:03 +03:00
Alexey Tsvetkov
b54414d628 Implement Gradle JS IC support
#KT-19956 fixed

To try the experimental JS IC add
'kotlin.incremental.js = true' to a 'local.properties'
or 'gradle.properties' file in Gradle project's root.
2017-08-29 04:23:02 +03:00
Alexey Tsvetkov
eeb90656dc Exclude generated IC tests from ant build
Generated tests depend on the annotations from the `tests-common` module.
Testing utils from test root of the `incremental-compilation-impl` module
are also used in Gradle tests, so the test root is built in the ant build too.
However building `tests-common` separately from the compiler is complicated,
so I decided to exclude generated tests from 'kotlin-build-common-test.jar'.
2017-08-29 02:24:38 +03:00
Alexey Tsvetkov
7ecf5abdc7 Add class hierarchy tests to JS and JVM IC tests 2017-08-29 02:24:38 +03:00
Alexey Tsvetkov
0a5fe3ef7c Move JVM specific IC tests with class hierarchy changes 2017-08-29 02:24:38 +03:00
Alexey Tsvetkov
e16c5ddb97 Avoid using JVM only APIs in IC tests to reuse with JS 2017-08-29 02:24:38 +03:00
Alexey Tsvetkov
23bc907d3f Move multi-module IC tests to separate dir
At the moment they are used only with JPS
2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
166883d847 Move JVM specific IC test data to separate dir 2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
7810da7018 Add IC compiler tests with Java 2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
71e8f16906 Generate IC compiler tests instead of using parametrized runner
# Conflicts:
#	compiler/incremental-compilation-impl/incremental-compilation-impl.iml
2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
52b638ddb3 Throw exception if initial build has failed in IC tests 2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
c7775b8d11 Write build info only on successful build 2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
20551f6c99 Do not report error when JS IC is enabled and no source files is specified 2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
bb1cba67b7 Implement JS IC 2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
4aea9b349c Refactor incremental services 2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
356536d32b Update inputs cache on rebuild 2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
20b14d4121 Extract IncrementalJvmCompilerRunnerTest 2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
6fedf07f56 Introduce ChangesCollector 2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
d4d684a7f0 Introduce IncrementalCompilerRunner#makeServices 2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
65529fa866 Introduce IncrementalCompilerRunner#markDirty 2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
53d911ab99 Move IncrementalCompilerRunner to separate file 2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
5ddc8d83bb Move compileIncrementally to common IC 2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
60f68266dd Continue extracting common IC code 2017-08-29 02:24:36 +03:00
Alexey Tsvetkov
9727ec401b Remove Target parameter from GeneratedFile 2017-08-29 02:24:36 +03:00
Alexey Tsvetkov
af73082fcc Begin extracting common IC code 2017-08-29 02:24:36 +03:00
Alexey Tsvetkov
508d96836c Remove compiledWithErrors param
`updateIncrementalCache` is not called when
code does not compile.
2017-08-29 02:24:36 +03:00
Alexey Tsvetkov
d1fd88fb8e Minimize usage of TargetId in IC 2017-08-29 02:24:36 +03:00
Alexey Tsvetkov
a076b4614e Refactor computeChanges 2017-08-29 02:24:36 +03:00
Alexey Tsvetkov
3ad5e78d77 Extract common caches 2017-08-29 02:24:36 +03:00
Toshiaki Kameyama
367b9f6664 "Redundant setter parameter type" range includes whole parameter declaration #KT-19648 Fixed (#1267) 2017-08-28 17:06:10 +02:00
Pavel V. Talanov
e3b7f6d698 Prevent multiple concurrent 'checkHideNonConfiguredNotifications' calls 2017-08-28 16:18:44 +03:00
Nicolay Mitropolsky
6953ae79e2 Fix for KtLightParameter and KtLightParameterList equality 2017-08-28 15:57:44 +03:00
Nicolay Mitropolsky
f8f5494d79 KotlinLightConstantExpressionEvaluator fix for processing Java-sourced annotation entry value 2017-08-28 15:55:57 +03:00
Dmitry Jemerov
ceae10f451 Update .iml 2017-08-28 12:03:45 +02:00
Dmitry Jemerov
1814f3172a Fix compilation 2017-08-28 11:32:38 +02:00
Dmitry Jemerov
5b8e5fb9aa Compile kotlin-gradle-tooling against JDK 6 2017-08-28 10:50:52 +02:00
Dmitry Jemerov
f07d4901ca Reset kind for incorrectly imported libraries
#KT-19847 Fixed
2017-08-28 10:36:25 +02:00
Alexander Udalov
cdda5d39e5 Use ResolvedCall to generate callable reference receiver
This will be helpful in supporting KT-15667
2017-08-28 10:42:05 +03:00
Alexander Udalov
c420e2bfa5 Refactor FunctionReferenceGenerationStrategy
Draw a clear distinction between the referenced function's parameters
and the anonymous synthetic function's parameters (see the comment).
This will be useful in supporting advanced callable reference features
like KT-8834
2017-08-28 10:22:52 +03:00
Nikolas Havrikov
3d8b15d9db Fixed trailing underscores in numeric literals (#1264)
This change prohibits such illegal numeric literals as 13_37_ or 0xCAFE_BABE_ (note the trailing underscore).
2017-08-26 16:07:35 +03:00
Alexander Udalov
fac207ce7c Minor, improve error message in BuiltInDecompilerConsistencyTest 2017-08-25 15:40:40 +03:00
Alexander Udalov
38849893b6 Temporarily ignore some multiplatform IDE tests 2017-08-25 15:40:39 +03:00
Alexander Udalov
b87abc9f0f Relax rules related to noinline/crossinline/reified in header/impl functions
See the comments in KT-18752 for the current resolution

 #KT-15377 Fixed
 #KT-18752 Fixed
2017-08-25 15:40:38 +03:00
Alexander Udalov
d1cff41ce0 Treat nested class of header class as header
Note that the quick fix to implement header class works incorrectly when
that class has nested classes at the moment; this should be fixed
separately

 #KT-15494 Fixed
 #KT-18573 Fixed
2017-08-25 15:40:37 +03:00
Alexander Udalov
56b507d141 Remove obsolete code from ModifiersChecker
Simplify existing code and move closer to usages
2017-08-25 15:40:37 +03:00
Alexander Udalov
3a2d93f73e Do not report "header with no impl" on incorrect header
Descriptor for a 'header' member in a non-'header' class now has
isHeader = false

 #KT-18442 Fixed
2017-08-25 15:40:36 +03:00
Alexander Udalov
6cb4916dee Refactor and simplify PlatformHeaderAnnotator 2017-08-25 15:40:35 +03:00
Alexander Udalov
59c49675b0 Improve header-impl mismatch diagnostic rendering in IDE
Use HTML instead of text to render line breaks and lists correctly
2017-08-25 15:40:34 +03:00
Alexander Udalov
3bc8ca5913 Report "declaration should be marked with impl" when possible
Also support a quick fix to add 'impl' modifier (KT-18454), although it
doesn't work yet on classes because there's no error on them in the IDE

 #KT-18087 Fixed
 #KT-18452 Fixed
 #KT-18454
2017-08-25 15:35:05 +03:00
Alexander Udalov
9ecd04f628 Improve diagnostics on header/impl classes when scopes don't match
Try to report most of the errors on the actual members of the impl
class. In many cases, there's a 1:1 mapping of header to impl class
members, so the error "some members are not implemented" on the class
declaration itself is redundant. Exceptions include functions/properties
from supertypes (there may be no other place to report a signature
mismatch error in this case), functions/properties not marked with
'impl' (the checker is only run for declarations explicitly marked with
'impl') and default constructors (the checker is not run for them)

 #KT-18447 Fixed
2017-08-25 15:35:05 +03:00
Alexander Udalov
74ba0080b1 Improve header/impl mismatch diagnostic messages
Try to report most mismatch errors on the 'impl' declaration. Only
report a mismatch error on the 'header' declaration if no error would be
otherwise reported on any 'impl' declaration in the compilation unit.
Also render declaration kind in the message

 #KT-18447 In Progress
2017-08-25 15:35:05 +03:00
Alexander Udalov
472959aca1 Improve rendering of modifiers in DescriptorRenderer
* Use bold font to render all modifiers
* Render 'external' according to the style guide, right after modality
2017-08-25 15:35:05 +03:00
Alexander Udalov
f01e0ef335 Minor, rename renderer configuration parameter 2017-08-25 15:35:04 +03:00
Stanislav Erokhin
e65a62c48c Minor. regenerate tests: kt19767_3 in JS muted. 2017-08-25 03:48:55 +03:00
Stanislav Erokhin
2ceb8cef36 [NI] Use same ResolvedCall when run completion
It is necessary, because some clients store this ResolvedCall to other
places, for example for get call it stored to INDEXED_LVALUE_GET
2017-08-25 03:38:49 +03:00
Stanislav Erokhin
98eae4e7ee [NI] Support Exact and NoInfer annotations 2017-08-25 03:38:48 +03:00
Stanislav Erokhin
d1e52e76f9 [NI] Reduced allowed depth in incorporation
We set it to 1 now, because otherwise there is examples where
incorporation work too long. We will fix such cases in the future,
but seems like 1 is also good depth delta for incorporation
2017-08-25 03:38:47 +03:00
Mikhail Zarechenskiy
f31c48017b [NI] Don't process lambda until expected type will be fixed 2017-08-25 02:47:46 +03:00
Simon Ogorodnik
ff4f928420 KT-19896: Fix force parenthesizing of multiline elvis
#KT-19896 fixed
2017-08-25 01:25:58 +03:00
xiexed
c163e71662 Spring testAmbiguousBean formatting fix (#1261) 2017-08-24 19:19:36 +03:00
Dimach
b988fb701d KT-17888 Inspection to warn about suspicious combination of == and === 2017-08-24 18:14:24 +02:00
Dmitry Jemerov
83a1d6e5ca Avoid exception from autoimport fix with misconfigured analyzer 2017-08-24 16:55:01 +02:00
Dmitry Jemerov
8cf7f7a8f3 Don't break entire highlighting if exception is thrown from one quickfix 2017-08-24 16:55:01 +02:00
Leonid Startsev
749a574234 Support for gradle subplugins in Kotlin2JS compilation
Because ServiceLoader can't check generic argument of
KotlinGradleSubplugin in runtime, we have to manually check the type in
`isApplicable`.
2017-08-24 17:26:01 +03:00
Mikhail Zarechenskiy
e666b87545 [NI] Support AllCandidates mode for features in IDE 2017-08-24 13:50:11 +03:00
Mikhail Zarechenskiy
3f8a685ace [NI] Make return type of !! operator definitely not-null 2017-08-24 13:50:11 +03:00
Mikhail Zarechenskiy
d18a14b717 [NI] Eliminate special intersection type from result type 2017-08-24 13:50:10 +03:00
Mikhail Zarechenskiy
51be629e13 [NI] Pass resulting constraint system for error candidate 2017-08-24 13:50:10 +03:00
Mikhail Zarechenskiy
6f397f8512 [NI] Drop useless isEmpty property from NewTypeSubstitutor 2017-08-24 13:50:10 +03:00
Mikhail Zarechenskiy
9f2bf066b9 [NI] Transform anonymous types of expected type for delegation 2017-08-24 13:50:09 +03:00
Mikhael Bogdanov
1a05df204e Properly check expression nullability on attempt to apply == optimizations
#Fix KT-19767
2017-08-24 09:51:55 +02:00
Dimach
f0035a7be0 KT-17379: Fix J2K removal of parentheses in multiline expressions
When there is multiline polyadic expression with some operators
J2K should keep surrounding parentheses, otherwise
operators will be dangling due resolved to prefix variant

 #KT-17379 fixed
2017-08-23 20:47:01 +03:00
Dimach
0920b2574c KT-10375, KT-19523: Fix J2K hex literal number conversion issues.
#KT-10375, #KT-19523 fixed
2017-08-23 20:19:57 +03:00
Alexander Udalov
08e090bf5e Include JDK home path into virtual file paths in CoreJrtFileSystem
The problem in KT-19833 is caused by the fact that the application
environment instance is shared between consecutive runs of the compiler
in one Make action (KotlinCoreEnvironment.ourApplicationEnvironment).
If the JDK 8 module is compiled first, the created application
environment has no JRT file system, and once the JDK 9 module is
compiled later, that environment is not recreated and thus classes from
JDK 9 are unresolved.

To mitigate this, split the CoreJrtFileSystem implementation into the
file system itself which is global per application, and CoreJrtHandler
which is bound to a particular JDK home location. CoreJrtVirtualFile
paths now consist of the path to the JDK home, the "!/" separator, and
the path to the file itself, e.g.
"/usr/lib/jvm/java9!/modules/java.base/java/lang/Object.class". The
implementation is inspired by CoreJarFileSystem & CoreJarHandler.

No tests added because the application environment is _not_ shared in
tests. Also, a JDK 9 module is going to be added to the Kotlin project
soon, and that will serve as a test

 #KT-19833 Fixed
2017-08-23 18:08:30 +03:00
Alexander Udalov
c142db15fa Rename CoreLocalPathVirtualFile -> CoreJrtVirtualFile 2017-08-23 18:08:29 +03:00
Toshiaki Kameyama
46a1c8ca12 Repeated annotation @Deprecated after J2K for method with annotation and javadoc #KT-19351 Fixed (#1251) 2017-08-23 18:05:04 +03:00
Simon Ogorodnik
91f50c99e7 Add benchmark action for highlighting 2017-08-23 17:19:36 +03:00
Pavel V. Talanov
7fecec1141 lightAnnotations: remove several brittle assertions
Add some test cases with "red" code
2017-08-23 17:12:56 +03:00
Nicolay Mitropolsky
a6b446cc4f Correct 'asJava' view of annotations as annotation arguments
Fix light elements for nested arrays/annotations inside annotations

 #KT-18378 Fixed
2017-08-23 17:12:55 +03:00
Stanislav Erokhin
6eb534fca8 [NI] Fix processParts in KotlinResolutionCandidate 2017-08-23 15:53:53 +03:00
Mikhail Zarechenskiy
c45f86a2fc [NI] Resolve function literals in block as lambda expression 2017-08-23 15:53:52 +03:00
Mikhail Zarechenskiy
08964006de [NI] Avoid type capturing for types that can contain type variables 2017-08-23 15:53:51 +03:00
Mikhail Zarechenskiy
e040a317cc [NI] Store setValue with fresh type variables before substitution 2017-08-23 15:53:50 +03:00
Mikhail Zarechenskiy
55d1130dfc [NI] Add getters to avoid inspections about useless boolean expressions 2017-08-23 15:53:49 +03:00
Mikhail Zarechenskiy
f075934697 [NI] Pass candidates with wrong visibility in debugger context
See test 'privateMembersPriority' (KT-10634)
2017-08-23 15:53:48 +03:00
Mikhail Zarechenskiy
963ab7f27f [NI] Fix KNPE, exception occurred when element is synthetic 2017-08-23 15:53:47 +03:00
Mikhail Zarechenskiy
f42be4aea2 [NI] Fix exception explicit qualified receiver and dispatch receiver 2017-08-23 15:53:46 +03:00
Stanislav Erokhin
9f71de5f66 Add test for lambda as last expression in lambda 2017-08-23 15:53:45 +03:00
Stanislav Erokhin
74e07b6580 Add regression test for no resolution recursion 2017-08-23 15:53:44 +03:00
Stanislav Erokhin
d9eef94a8e [NI] Support smartcast info in ResolvedCall on receivers 2017-08-23 15:53:43 +03:00
Stanislav Erokhin
cb1270836c [NI] Introduced ResolutionAtom's
Introduced new model for resolution result: tree of ResolvedAtoms.
Moved all postprocessing for arguments to front-end module.
Do not create freshDescriptor -- use freshTypeSubstitutor directly.
Removed Candidates for variables+invoke.
Add lazy way for argument analysis -- do not analyze all arguments
if we have subtyping error in first argument, but if we want report
all errors, then all arguments checks will be performed.

Future improvements:
  - optimize constraint system usage inside ResolutionCandidate
  - improve constraint system API
  - improve diagnostic handlers
2017-08-23 15:53:42 +03:00
Stanislav Erokhin
76012f6603 Minor. rename ConstraintSystemCompleter
In front-end we have other ConstraintSystemCompleter and because of this
in dist we have ambiguity(because there all src folders compiles inside
same module.
2017-08-23 15:53:41 +03:00
Stanislav Erokhin
e011e443cc [NI] Implement next call completer.
Type inference completer features:
  - type variables depended from result type will be fixed in the end
  - type variables with proper constraints will be fixed first
  - fixation via groups "accessible" via constraints is supported

 TODO:
  - stable order via PSI order
  - argument constraint should rewrite position if constraint is the
      same as upper bound for type parameter
2017-08-23 15:53:40 +03:00
Stanislav Erokhin
3cf240340c [NI] Extract logic about fixation order to separated component 2017-08-23 15:53:39 +03:00
Stanislav Erokhin
ff1e230828 [NI] Use right scope for callable reference resolution
Previously was used scope for top-level call. It isn't correct because
if we have callable reference inside lambda -> scope is different.
2017-08-23 15:53:38 +03:00
Stanislav Erokhin
da003d48ff Support isSuccessful in SuccessfulResultCollector
Since now SuccessfulResultCollector do not run computation of
resultingApplicability for error candidate before
getFinalCandidates(). It is very useful because we can do not run
all checks for error candidates if we have not-error candidate.
2017-08-23 15:53:37 +03:00
Stanislav Erokhin
6b8293ae5b Refactoring. Remove ResolutionCandidateStatus.
Use diagnostics directly.
Also TowerCandidate since now know only about applicability
and not about diagnostics itself.
2017-08-23 15:53:36 +03:00
Stanislav Erokhin
aca21c847d [NI] Fix resolution for callable references to nested class members 2017-08-23 15:53:35 +03:00
Stanislav Erokhin
1ae4ad1598 [NI] Do not take type advice for delegation if type is not fixed 2017-08-23 15:53:34 +03:00
Stanislav Erokhin
cdaa98fb63 [NI] Fixes after review 2017-08-23 15:53:33 +03:00
Stanislav Erokhin
2b01b91315 [NI] Refactoring: KotlinCallContext to stateless component (2) 2017-08-23 15:53:32 +03:00
Stanislav Erokhin
e88c1b4f0a [NI] Refactoring: KotlinCallContext to stateless component (1) 2017-08-23 15:53:31 +03:00
Stanislav Erokhin
9bbfac11b4 [NI] Add common supertype for PSI lambda arguments
Also move initial dataFlowInfo to lambda arguments.
As result, we can not store outer call for postpone call arguments
2017-08-23 15:53:30 +03:00
Vyacheslav Gerasimov
aedb4c0ade Android Lint: Fix constant evaluation in annotation parameter
#KT-17785 Fixed Target Versions 1.1.5
2017-08-23 13:18:56 +03:00
Vyacheslav Gerasimov
2e1edaf3d4 Uast: Fix getExpressionType for elvis expression
#KT-18997 Fixed Target Versions 1.1.5
2017-08-23 13:18:49 +03:00
Vyacheslav Gerasimov
e06cb1ec39 Android Lint: Use Uast to check for SuppressLint annotation
#KT-14800 Fixed Target versions 1.1.5
2017-08-23 13:18:42 +03:00
Vyacheslav Gerasimov
cb3a8d87d0 Android Extensions: Correctly handle namespaces in layout xml
#KT-19451 Fixed Target versions 1.1.5
2017-08-23 13:18:34 +03:00
Simon Ogorodnik
1dfa05fe49 KT-19769: Optimize PerModulePackageCacheService
#KT-19769 fixed
2017-08-22 19:37:22 +03:00
Denis Zharkov
ad9fe53ee2 Avoid local var entry for continuation parameter in suspend function
The primary reason is getting rid of redundant stack spilling, but also
it's not very sensible to have such entry since the parameter
is synthetic
2017-08-22 18:43:31 +03:00
Denis Zharkov
fcd7677a3f Fix compatibility of suspend functions with strict bytecode analyzers
In short, some of the bytecode analyzers assume that there could be
no stores instructions into parameter vars with value of different
types (even when the value type is a subtype)

See the issue for details

 #KT-19713 Fixed
2017-08-22 18:43:26 +03:00
Sergey Igushkin
d5f0607cef Add tests for java-library support. 2017-08-21 17:21:12 +03:00
Sergey Igushkin
1848bc1840 Support java-library plugin: register Kotlin output for consumers
Issue #KT-18497 Fixed
2017-08-21 17:21:03 +03:00
Vyacheslav Gerasimov
f941186f75 UAST: Properly handle annotations on local variables 2017-08-21 15:02:01 +03:00
Vyacheslav Gerasimov
c549c63100 Light Classes: Correctly handle annotations for property parameters
When getting annotations for KtLightParameter which is property parameter we should return annotations for parameter instead of property

#KT-19671 Fixed
2017-08-21 15:01:51 +03:00
Mikhael Bogdanov
1e73921200 Update changelog for 1.1.4-2 2017-08-18 18:23:10 +02:00
Pavel V. Talanov
c132f3b0d1 KT-19276: Drop exception logging on loading script definitions failure
See YT discussion
Have to come up with more meaningful diagnostics on definition loading

#KT-19276 Fixed
2017-08-18 19:11:35 +03:00
Pavel V. Talanov
6424b6760f Remove StorageComponentContainerContributor::onContainerComposed
Rename addDeclarations -> registerModuleComponents
Use it to provide SamWithReceiverResolver extensions instead

Post construction on container composition can be achieved
    but manually inserting injections where it seems appropriate
    is bug prone
This fixes a bug where SamWithReceiverPlugin extension was not registered
    for some containers in IDE which led to incorrect highlighting in IDE
Add IDE test for applying SamWithReceiver plugin

 #KT-18062 Fixed
2017-08-18 19:11:25 +03:00
Yan Zhulanow
6f180416b1 Pass SamConversionResolver explicitly cause it should be call site module-local 2017-08-18 19:11:21 +03:00
Toshiaki Kameyama
f0f6a252a5 Offer to make INVISIBLE_MEMBER protected if referenced from subclass
So #KT-19614 Fixed
2017-08-18 15:53:41 +03:00
Mikhail Glukhikh
0adf1d210f Make KtPureElement.getParent() nullable #KT-19760 Fixed
The reason is KtFile.getParent() is a containing directory which is nullable
2017-08-18 15:36:41 +03:00
Amane Nikaido
0fd5c6f1ca KT-19634: Fix <boxed_value> == <primitive_value> converted to reference equality
#KT-19634 fixed
2017-08-18 15:20:26 +03:00
Mikhail Glukhikh
9dc5354f24 Eliminate some warnings (mostly redundant is checks in whens) 2017-08-18 15:16:59 +03:00
Mikhail Glukhikh
3623f581b8 Eliminate a set of warnings, mostly nullability ones 2017-08-18 15:10:27 +03:00
Toshiaki Kameyama
82fc221470 Add "flip equals" intention for String.equals extension from stdlib
So #KT-19282 Fixed
2017-08-18 14:34:14 +03:00
Alexander Udalov
0efdcb59fa Increase -XX:ReservedCodeCacheSize for other IDEA run configurations
See 4092d754c6
2017-08-18 12:36:21 +03:00
Mikhail Glukhikh
2b90a67bc1 Minor: report "redundant override" only on 'override fun'
Related to KT-19428
2017-08-18 12:23:21 +03:00
takahirom
806aa7d4c1 Add inspection for redundant overrides that only calls the super method
So #KT-19428 Fixed
2017-08-18 12:05:02 +03:00
Mikhael Bogdanov
8af7a25f8e Update maxStack on synthetic instruction insertion
#KT-19723 Fixed
2017-08-17 20:02:29 +02:00
Dmitry Jemerov
39599fc7c9 Don't detect library kind for pure JVM projects
Also require .kjsm to detect JS libraries; don't detect jars containing
only .js files as JS libraries

 #KT-19717 Fixed
2017-08-17 16:55:50 +02:00
Dmitry Jemerov
99a402ee30 Correctly show quick doc for lookup elements that only have descriptors
#KT-19716 Fixed
2017-08-17 16:53:54 +02:00
Alexander Udalov
4d2fbf1801 Fix reflection for local delegated properties inside interface
#KT-19690
2017-08-17 15:35:11 +02:00
Mikhael Bogdanov
97d46e76f5 Use 'DefaultImpls' as owner for interface local delegated properties
#KT-19690 Fixed
2017-08-17 15:35:10 +02:00
Toshiaki Kameyama
905b8cc4e9 long == <int_literal> in Java converted to red code in Kotlin #KT-19393 Fixed 2017-08-17 16:01:48 +03:00
Mikhael Bogdanov
79ecc7fd5c Don't recognize nullable function types as inlinable
#KT-19679 Fixed
2017-08-17 14:24:00 +02:00
Nicolay Mitropolsky
1b2e28d467 SpringKotlinAutowiringInspection: workaround for nameless property (EA-104960) 2017-08-17 14:31:24 +03:00
Nicolay Mitropolsky
f7a1c71b54 Ultimate tests repair: SpringInspectionTestGenerated.testAutowiring_inspectionData_Inspections_test (KT-18847) 2017-08-17 14:31:24 +03:00
Alexander Udalov
770441c212 Merge "diagnostic with Java 8" tests with general diagnostic tests 2017-08-17 13:15:18 +03:00
Alexander Udalov
8db736e2b4 Support FULL_JDK directive in diagnostic tests 2017-08-17 12:35:56 +03:00
Alexander Udalov
7601666ec0 Minor, remove unused AbstractDiagnosticsWithFullJdkTest 2017-08-17 12:35:55 +03:00
André Oriani
a24c9a987f Improve Boolean infix functions' documentation (#1249) 2017-08-17 11:53:39 +03:00
Toshiaki Kameyama
be664e26f7 KT-18232: Kotlin code converter misses annotations
#KT-18232 Fixed
2017-08-17 02:30:06 +03:00
Dmitry Jemerov
4092d754c6 Increase -XX:ReservedCodeCacheSize to avoid warning in debug IDEA 2017-08-16 17:44:44 +02:00
xiexed
12eb4ef37a KotlinUastLanguagePlugin#convertElementWithParent NPE fix when parent is null (#1247) 2017-08-16 17:47:40 +03:00
Dmitry Jemerov
a2a018eadb Pluggable platforms in IDE plugin 2017-08-16 15:51:41 +02:00
Dmitry Jemerov
f7c17d6a64 Naming convention inspections 2017-08-16 15:45:33 +02:00
Anton Bannykh
6a5d8dcc82 JS: reduce HashMap memory footprint 2017-08-16 13:23:36 +03:00
Anton Bannykh
070e35bc15 JS: removed app-module-path dependency from integration tests 2017-08-16 13:21:46 +03:00
Anton Bannykh
a641838368 JS: clean up the unit test intergartion tests build file 2017-08-16 13:21:46 +03:00
Anton Bannykh
226ffb6c7e JS: write integration test outputs to a file to prevent polluting the log with expected test failures 2017-08-16 13:21:46 +03:00
xiexed
6a4ea8b669 toUElement() made work with KtAnnotationEntry (#1240)
* `KotlinUastLanguagePlugin#convertElement` made work with `KtAnnotationEntry`

* `KotlinUastLanguagePlugin#convertElementWithParent` searches for parent `KotlinUNamedExpression`
2017-08-16 13:01:37 +03:00
Mikhail Glukhikh
a12877e51c Add feature support for "smart casts on variables in closures"
So #KT-14486 Fixed
2017-08-16 12:34:04 +03:00
Mikhail Glukhikh
a086863561 Preliminary: support smart casts on variables in closures
No feature support yet
So #KT-14486 In Progress
2017-08-16 12:33:52 +03:00
Mikhail Glukhikh
b2d931fb1f Support smart casts after if (nullable ?: boolean) #KT-8492 Fixed 2017-08-16 12:33:35 +03:00
Mikhail Glukhikh
9be5cf89b4 Minor fix to ensure correct compilation in 1.2
Related to KT-4565
2017-08-16 12:33:23 +03:00
Mikhail Glukhikh
80b6aaa802 Support smart casts to Type after x as? Type null check #KT-4565 Fixed 2017-08-16 12:33:12 +03:00
Dmitry Jemerov
5bd04a6d22 Fix ultimate tests: add idea-gradle to main project classpath 2017-08-16 11:01:12 +02:00
Alexey Sedunov
787bbe9a4c Safe Delete: Support header/impl declarations
#KT-18433 Fixed
2017-08-15 19:08:29 +03:00
Alexey Sedunov
1215b2864b Safe Delete: Use actual usage PSI in UsageInfo instead of declaration
#KT-19161 Fixed
2017-08-15 19:08:28 +03:00
Alexey Sedunov
2f556e1bea Refactorings: Support header/impl functions in member hierarchy transformations
#KT-18904 Fixed
 #KT-18905 Fixed
2017-08-15 19:08:28 +03:00
Alexey Sedunov
537c1fd063 Convert Function Type Parameter to Receiver: Drop redundant arrows 2017-08-15 19:08:28 +03:00
Alexey Sedunov
f80fcc7146 Parameter <-> Receiver Conversion: Support header/impl declarations
#KT-18907 Fixed
2017-08-15 19:08:27 +03:00
Alexey Sedunov
d3a9d122e6 Add 'operator' Intention: Support header/impl functions
#KT-18851 Fixed
2017-08-15 19:08:27 +03:00
Alexey Sedunov
cd5c382179 Convert member to extension: Support members of header/impl classes
#KT-18883 Fixed
2017-08-15 19:08:27 +03:00
Alexey Sedunov
4dbde03c3b Rename: Support parameters of header/impl functions
#KT-18393 Fixed
2017-08-15 19:08:27 +03:00
Alexey Sedunov
f5c7db8270 Change Signature: Support constructors of header/impl classes 2017-08-15 19:08:26 +03:00
Alexey Sedunov
7f9110b4e6 Change Signature: Fix exception on applying to impl declaration 2017-08-15 19:08:26 +03:00
Alexey Sedunov
0b44386800 Change Signature: Fix NPE on rendering empty parameter names 2017-08-15 19:08:26 +03:00
Alexey Sedunov
8439e15c6e Change Signature: Support members of header/impl classes 2017-08-15 19:08:26 +03:00
Alexey Sedunov
e4f70a3568 Rename: Support members of header/impl classes
#KT-18885 Fixed
 #KT-18898 Fixed
 #KT-18899 Fixed
2017-08-15 19:08:26 +03:00
Alexey Sedunov
62ca3bab31 Move: Do not skip usages of declarations without light elements
#KT-18873 Fixed
2017-08-15 19:08:25 +03:00
Alexey Sedunov
f455f06a9e Change Signature: Fix replacement of implicit Unit return type 2017-08-15 19:08:25 +03:00
Alexey Sedunov
386b1fc002 Line Marking: Fix search of overriding methods in platform modules
#KT-19212 Fixed
2017-08-15 19:08:25 +03:00
Alexey Sedunov
98eb990f30 Line Marking: Place header/impl markers after override/inheritance
#KT-19074 Fixed
2017-08-15 19:08:25 +03:00
Dmitry Jemerov
e3963fccf4 Move Gradle-related classes to idea-gradle module 2017-08-15 16:51:42 +02:00
Yan Zhulanow
57d209f599 Kapt: Do not use awkward ('$' -> '/') logic for KAPT3 class builder mode
So (for the most often reproduction case) #KT-19433 Fixed

Before this commit, internal names for nested classes were written as test/Foo/Bar (comparing to test/Foo$Bar in the normal mode), as getting qualified names from such internal names was trivial. But, because of IC, we needed to write class files to the disk, so our decompiler could find such "broken" classes and read it in a wrong way.
2017-08-15 17:48:51 +03:00
Dmitry Jemerov
e5e5b56af0 Add test for parameter hints on invoke() 2017-08-15 16:37:32 +02:00
Dmitry Jemerov
04464024fe Don't try to resolve call if we won't show any hints anyway 2017-08-15 16:37:21 +02:00
Zalim Bashorov
9bb7ed5e02 Use proper property name to get a tag to publish.
Also:
* remove obsolete kotlin.compiler.* properties
* move --tag argument to proper place (from npm to publish-to-npm)
2017-08-15 17:20:42 +03:00
Dmitry Jemerov
34681b1459 Before searching for descriptor of method, check if it can be property 2017-08-15 11:41:25 +02:00
Dmitry Jemerov
1fe3f84071 Don't search twice for the same declaration 2017-08-15 11:39:40 +02:00
Mikhail Glukhikh
5b72159967 Fix of EA-103829 (do not try to get module info for disposed module) 2017-08-15 11:16:31 +03:00
e5l
e315249624 Add tests on jsr305 annotations warnings 2017-08-15 11:01:08 +03:00
e5l
5501cdf049 Add warnings for jsr305 nullable annotations
#KT-19115 Fixed
2017-08-15 11:01:08 +03:00
e5l
746de612ad Move Jsr305State to util.runtime 2017-08-15 11:01:08 +03:00
e5l
5fd8f93b0e Fix a typo: Defaul -> Default 2017-08-15 11:01:08 +03:00
Sergey Igushkin
71bf649b1e Fix compilation error in AbstractLookupTrackerTest.kt 2017-08-14 19:27:50 +03:00
Sergey Igushkin
bf98e26bc2 Fix nullable javaPackagePrefix used as @Input, resulting in build failure 2017-08-14 18:59:17 +03:00
Mikhail Glukhikh
718ee01a48 Fix of EA-105681 in KotlinProximityStatistician 2017-08-14 17:39:44 +03:00
Mikhail Glukhikh
830b543879 Fix of EA-105681 in KotlinRunLineMarkerContributor 2017-08-14 17:37:05 +03:00
Mikhail Glukhikh
165707c46c Fix of EA-101845 in referenceProviders.kt 2017-08-14 17:36:18 +03:00
Mikhail Glukhikh
88bc74551b Fix of EA-91690 (NPE in OverloadReducer via flexible types) 2017-08-14 17:14:03 +03:00
Sergey Igushkin
7986250dbe Add a test for javaPackagePrefix 2017-08-14 16:13:48 +03:00
Sergey Igushkin
192d569e54 Support Java package prefix in Gradle plugin
Issue #KT-17150 Fixed
2017-08-14 16:13:13 +03:00
Vyacheslav Gerasimov
4cf2bf6ca5 UAST: Implement getFunctionalInterfaceType for KotlinULambdaExpression 2017-08-14 15:41:40 +03:00
Sergey Igushkin
3d6622ae1b Fix ExecutionStrategyJsIT failing due to platform-dependent fileTreeWalk 2017-08-14 15:05:55 +03:00
Alexey Tsvetkov
0226d15d29 Normalize paths in AbstractLookupTrackerTest
Otherwise the tests are failing on Windows
2017-08-11 20:51:06 +03:00
Sergey Igushkin
cd40968b72 Fix tests failing due to dev builds bundled into Gradle. Push AGP to beta. 2017-08-11 20:22:41 +03:00
Sergey Igushkin
6cd409d379 Fix tests assuming '_main' in default module names 2017-08-11 19:56:20 +03:00
Sergey Igushkin
80131d8359 Fix generate stubs task not being assigned a source set name 2017-08-11 13:38:22 +03:00
Nikolay Krasko
4b2b5dec75 Download asm-all sources for idea 172 2017-08-11 12:17:39 +03:00
Nikolay Krasko
f8de17b039 Remove guava usage from KotlinCodegenFacade - fix maven build 2017-08-11 12:17:39 +03:00
Dmitry Petrov
a8c82b64a1 Do not check bounds in type alias expansion if checkBounds is false
This happens when we resolve bounds for type parameters, causing wrong
UPPER_BOUND_VIOLATED to be reported on type parameter whose bounds were
not resolved yet.

 #KT-19601 Fixed Target versions 1.1.5
2017-08-11 11:29:59 +03:00
Denis Zharkov
ce37ab81ba Fix types enhancement for properties' getters overrides in Java
Prior to the 1.1.4, nullability related annotations were stored
in types that became hard to maintain at some moment and
we got rid of it (see 57b7b91444)

But enhancement for properties overrides stopped working
because there were effectively no annotations in the
resulting descriptor

 #KT-19409 Fixed

 #KT-19409 Fixed
2017-08-11 10:19:55 +07:00
Denis Zharkov
9962fc88ca Minor. Move type qualifiers computation to their first usage 2017-08-11 10:19:55 +07:00
Denis Zharkov
8898455352 Add tests on foreign annotations without them in classpath
#KT-19419 Fixed
2017-08-11 10:18:41 +07:00
Denis Zharkov
8948023a26 Add built-in support for ParametersAre(Non)nullByDefault annotation
#KT-19419 In Progress
2017-08-11 10:18:41 +07:00
Denis Zharkov
964f60d0a4 Resolve qualifier nicknames to default annotations without JSR305 jar
#KT-19419 In Progress
2017-08-11 10:18:41 +07:00
Denis Zharkov
f8f0c0b6d7 Load enum/array annotation arguments for not found classes
It's necessary to load type qualifier related annotations
without JSR305 annotations being in the classpath

 #KT-19419 In Progress
2017-08-11 10:18:41 +07:00
Denis Zharkov
a82e313d14 Minor. Fix wrong target in test data for foreign annotations 2017-08-11 10:18:41 +07:00
Nikolay Krasko
6d66fb35d6 Fix AbstractGenerateSpringDependencyActionTest.kt in branch 172 2017-08-10 22:05:49 +03:00
Nikolay Krasko
10bf49118a Update spring test data for 172 idea 2017-08-10 22:05:49 +03:00
Nikolay Krasko
46bbf55acd Special value for class literal expression
Starting from Idea 172 evaluator gives non-null value for class literal
expression. Probably behaviour was changed in

65ddb4c454
2017-08-10 22:05:49 +03:00
Nikolay Krasko
eeede71d9d Drop usage of deprecated ProjectDataManager in branch 172 2017-08-10 22:05:49 +03:00
Nikolay Krasko
2cf4da8564 Fix test behaviour in branch 172 2017-08-10 22:05:49 +03:00
Nikolay Krasko
d8c20ed9c0 Fix debugger test in 172 (KT-18848)
#KT-18848 Fixed
2017-08-10 22:05:49 +03:00
Nikolay Krasko
0d6cf19896 Don't pack jps services into compiler 2017-08-10 22:05:49 +03:00
Nikolay Krasko
c2b54c3e8a Ignore absent net.jpountz.lz4.LZ4Factory in proguard 2017-08-10 22:05:48 +03:00
Vyacheslav Gerasimov
bb7521a142 Build against UAST bundled in IDEA 2017-08-10 22:05:48 +03:00
Alexey Tsvetkov
99439620d4 JPS: completely skip chunk containing only dummy targets
Such chunks were added in intellij-community, see
commit fdeae7754c593e78b6748dfa66ce7198c2780d35
(fdeae7754c)
2017-08-10 22:05:48 +03:00
Mikhael Bogdanov
2954c41848 Fix 'isProjectOrWorkspaceFile' import 2017-08-10 22:05:48 +03:00
xiexed
f94569c995 KotlinCommonIntentionActionsFactory is able to remove constructors parameters (EA-104621) (#1187) 2017-08-10 22:05:48 +03:00
Mikhael Bogdanov
4e868c5232 Update AndroidProjectKey package 2017-08-10 22:05:48 +03:00
Nicolay Mitropolsky
62dc3c8da4 A check for AbstractSpringClassAnnotatorTest that ultimate plugin is properly set up 2017-08-10 22:05:48 +03:00
Nicolay Mitropolsky
384ae8d8b5 Ultimate tests repair (KT-18847)
Repaired all except:
GenerateSpringDependencyActionTestGenerated.testAutowiredDependencies_MultiplePropertiesAnnotationConfig - Not a Kotlin issue
SpringClassAnnotatorTestGenerated.testAutowiredBeanCandidates_AutowiredBeanCandidates - Bug with multiple light objects for same PSI element
SpringInspectionTestGenerated.testAutowiring_inspectionData_Inspections_test - Not a Kotlin issue (presumably IDEA-175971)
SpringQuickFixTestGenerated$AddQualifierAnnotation.testAmbiguousBean - Not a Kotlin issue (IDEA-175971)
2017-08-10 22:05:48 +03:00
Nicolay Mitropolsky
532560ef43 Spring dependency-generations actions: runWriteAction moved to the proper place (KT-18385) 2017-08-10 22:05:48 +03:00
Nicolay Mitropolsky
ca19ea8205 KotlinSpringClassAnnotator ignores duplicate gutter handlers (IDEA-173995, KT-18298) 2017-08-10 22:05:47 +03:00
Nicolay Mitropolsky
ce77751349 Spring Constructor Injection falling test 2017-08-10 22:05:47 +03:00
Nicolay Mitropolsky
6ae247ba61 "Final Kotlin class or function with Spring annotation" inspection deprecation and disabling by default (KT-18506) 2017-08-10 22:05:47 +03:00
Ilya Gorbunov
13349086ac Pass required Project parameter to constructor of NullableNotNullManager 2017-08-10 22:05:47 +03:00
xiexed
a36cbad7cd KotlinCommonIntentionActionsFactory extensions for IDEA-85507 and KT-11906 (#1093)
* `KotlinCommonModifications` renamed to `KotlinCommonIntentionActionsFactory`

* IDEA-85507: KotlinCommonIntentionActionsFactory#createAddMethodAction implementation

* KT-11906 `KotlinCommonIntentionActionsFactory#createAddBeanPropertyActions` implementation

* `KotlinCommonIntentionActionsFactory#createAddMethodAction` now uses a `CallableBuilder` for making a function

* `KotlinCommonIntentionActionsFactory#createAddBeanPropertyActions` privides a "TODO" initializer and also suggests a `lateinit` property

* KT-11980 `KotlinCommonIntentionActionsFactory#createAddConstructorActions` implementation

* `KotlinCommonIntentionActionsFactory` upgraded to new `JvmCommonIntentionActionsFactory`-api

* KT-11980 `KotlinCommonIntentionActionsFactory` is able to change primary constructors

* `JvmCommonIntentionActionsFactory` api update
2017-08-10 22:05:47 +03:00
Mikhail Glukhikh
4a15870e59 Make 172 plugin applicable for IDEA 173 2017-08-10 22:05:47 +03:00
Alexey Andreev
e56f9f6040 Fix compilation for IDEA 172 2017-08-10 22:05:47 +03:00
Mikhail Glukhikh
85ecde6ec9 Correct 172 plugin 'since' field (no more compatible with 171) 2017-08-10 22:05:47 +03:00
Alexey Andreev
4d72f0ef66 Add missing implementation of abstract method to MockPsiManager 2017-08-10 22:05:47 +03:00
Alexey Andreev
11086192bc Fix test compilation errors 2017-08-10 22:05:46 +03:00
Ilya Gorbunov
08673bfb0c Fixup for "JvmCommonIntentionActionsFactory in Kotlin"
'forLanguage' now returns explicitly nullable type.
2017-08-10 22:05:46 +03:00
Nicolay Mitropolsky
0694f2d0c5 JvmCommonIntentionActionsFactory in Kotlin 2017-08-10 22:05:46 +03:00
Dmitry Jemerov
548e86285c Fix 'ant dist' build against 172 branch 2017-08-10 22:05:46 +03:00
Dmitry Jemerov
20d0d49cc3 Advance Guava version 2017-08-10 22:05:46 +03:00
Dmitry Jemerov
48d4f5f5c2 Compilation fixes for 172 branch 2017-08-10 22:05:46 +03:00
Vyacheslav Gerasimov
c1cfd70ae7 Fix tests compilation 2017-08-10 22:05:46 +03:00
Vyacheslav Gerasimov
b825a8db43 Fix compilation AndroidResourceReferenceAnnotator 2017-08-10 22:05:46 +03:00
Vyacheslav Gerasimov
23e606d179 Fix compilation MockUpdateParameterInfoContext 2017-08-10 22:05:46 +03:00
Vyacheslav Gerasimov
cf4d0fb977 Fix guava version 2017-08-10 22:05:45 +03:00
Vyacheslav Gerasimov
83a8395287 Fix compilation AbstractKotlinEvaluateExpressionTest 2017-08-10 22:05:45 +03:00
Dmitry Jemerov
282da4cab5 Move Kotlin UAST registration to main plugin.xml
The UAST needs to be available also when the Android plugin is disabled.
2017-08-10 22:05:45 +03:00
Vyacheslav Gerasimov
298d29a962 Android Extensions: Allow to disable IDE support (KT-12741) 2017-08-10 22:05:45 +03:00
Dmitry Jemerov
62e583903e Fix compilation gotoResourceHelper, KotlinAndroidTestCase 2017-08-10 22:05:45 +03:00
Mikhail Glukhikh
c675824c0a Fix compilation PlatformAndroidGradleDetector 2017-08-10 22:05:45 +03:00
Yan Zhulanow
6336c4ee98 Fix compilation androidUtil, MyReferredResourceFieldInfo requires module 2017-08-10 22:05:45 +03:00
Dmitry Jemerov
be1022db2b Fix compilation NewKotlinActivityAction, gradle sync classes moved 2017-08-10 22:05:45 +03:00
Yan Zhulanow
a142c2f8fa Fix compilation IntelliJLintClient, IntelliJLintProject, IDEAndroidLayoutXmlFileManager 2017-08-10 22:05:45 +03:00
Vyacheslav Gerasimov
c07096c9d7 Fix compilation AbstractParameterInfoTest 2017-08-10 22:05:45 +03:00
Vyacheslav Gerasimov
768305adc8 Fix compilation KotlinModuleBuilder 2017-08-10 22:05:44 +03:00
Vyacheslav Gerasimov
e8d2782089 Bump guava to 21.0 in update_dependencies.xml 2017-08-10 22:05:44 +03:00
Dmitry Jemerov
b50d5fb998 Download IDEA from 172 branch 2017-08-10 22:05:44 +03:00
Dmitry Jemerov
7fffb7b553 Remove UAST services registration from Kotlin plugin 2017-08-10 22:05:44 +03:00
Sergey Igushkin
b938206234 Add @Input to moduleName, to incorporate it into the up-to-date checks 2017-08-10 21:23:07 +03:00
Sergey Igushkin
84e1e9f8aa Change default module name from project.name to archivesBaseName;
Get rid of `_main` for the main module.

Issue #KT-17355 Fixed
2017-08-10 21:23:07 +03:00
Alexey Tsvetkov
239943867b Add JS specific proto comparison test 2017-08-10 21:19:42 +03:00
Alexey Tsvetkov
0d3b882852 Add proto comparison tests where members annotations are changed 2017-08-10 21:19:42 +03:00
Alexey Tsvetkov
6354d9d54f Treat SEALED_SUBCLASS_FQ_NAME_LIST change as a class signature change
#KT-19580
2017-08-10 21:19:42 +03:00
Alexey Tsvetkov
856276328e Treat JS class annotation list change as class signature change 2017-08-10 21:19:42 +03:00
Alexey Tsvetkov
e0ef08cf18 Add raw ProtoCompareGenerated output to proto comparison test data 2017-08-10 21:19:42 +03:00
Alexey Tsvetkov
642c5414a3 Minor: rename js.result.out->result-js.out
This way result.out and result-js.out are closer in
a list of files (e.g. in Intellij project view).
2017-08-10 21:19:42 +03:00
Alexey Tsvetkov
46a3a59b81 Fix missing lookups from deserialized JS descriptors 2017-08-10 21:19:42 +03:00
Alexey Tsvetkov
7e7fcd352c Compare lookups after comparing build logs
This way tests are more informative when
compilation goes wrong.
2017-08-10 21:19:42 +03:00
Alexey Tsvetkov
82c977f2d2 Add JS lookup tracker tests 2017-08-10 21:19:42 +03:00
Alexey Tsvetkov
6cfd090b20 Extract JVM lookup tracker tests 2017-08-10 21:19:42 +03:00
Alexey Tsvetkov
e2190ea956 Use lookup tracker in JS compiler 2017-08-10 21:19:42 +03:00
Alexey Tsvetkov
f3f7ca4b95 Show in lookup tracker log if there is no lookups in file 2017-08-10 21:19:42 +03:00
Alexey Tsvetkov
ab90221a93 Minor: reformat AbstractLookupTrackerTest#runCompiler 2017-08-10 21:19:42 +03:00
Alexey Tsvetkov
485e2345a9 Decouple lookup tracker tests from JPS 2017-08-10 21:19:42 +03:00
Alexey Tsvetkov
bb2fab5b5d Extract LookupTracker service from IncrementalCompilationComponents
We don't need a `TargetId` to `IncrementalCache` mapping in JS
2017-08-10 21:19:42 +03:00
Alexey Tsvetkov
a4c7dbd693 Remove .touch actions for lookup test cases that fail to compile
It is useless to touch and recompile, because the first compilation
has failed anyway
2017-08-10 21:19:41 +03:00
Alexey Tsvetkov
61b3c1c429 Do not print NONE changes in proto tests
otherwise MainKt: NONE is added in all js tests
2017-08-10 21:19:41 +03:00
Alexey Tsvetkov
c601890151 Fix comparing repeated proto extensions
Previously ProtoCompareGenerated could
go out of bounds when comparing protos
with different number of annotations.

That happend because JsProtoBuf.parameterAnnotation
is a repeated extension, but the generated code for
comparing repeated extensions was incorrect.

JvmProtoBuf does not have repeated extensions (at least for
the class and package descriptors),
so the problem was not detected before.
2017-08-10 21:19:41 +03:00
Alexey Tsvetkov
1cce1ef1f6 Isolate JS compiler in proto tests
Proto tests are still in the 'jps-tests' module
which is included in non-compiler tests.

It is not safe to call the compiler
directly in non-compiler tests
because it might affect IDE tests.
2017-08-10 21:19:41 +03:00
Alexey Tsvetkov
ed5b6e07aa Implement JS proto comparison 2017-08-10 21:19:41 +03:00
Alexey Tsvetkov
23afaeec2f Extract TestMessageCollector 2017-08-10 21:19:41 +03:00
Alexey Tsvetkov
f5e77c740d Introduce services to pass data between IC and JS compiler 2017-08-10 21:19:41 +03:00
Alexey Tsvetkov
8ffd141d17 Minor tweak to proto test data format 2017-08-10 21:19:41 +03:00
Alexey Tsvetkov
1921950a1b Extract JVM specific proto comparison test 2017-08-10 21:19:41 +03:00
Alexey Tsvetkov
cc24b9f4ad Always print class id in proto comparison test
A name of class file was used for added and removed classes
before the change.
The change is required for reusing the test data in js proto comparison
tests (there is no classfiles in js, so it is hard to
emulate jvm classfiles names for inner/nested classes).
2017-08-10 21:19:41 +03:00
Alexey Tsvetkov
5dd4e4cdd4 Move JVM specific proto comparison tests to separate dir 2017-08-10 21:19:41 +03:00
Alexey Tsvetkov
9ab7c92b4b Convert SimpleOutputItem: step 2 2017-08-10 21:19:41 +03:00
Alexey Tsvetkov
8fbab94c5c Convert SimpleOutputItem: step 1 2017-08-10 21:19:41 +03:00
Mikhael Bogdanov
6ca06265cf Rename and disable test on JS 2017-08-10 16:16:28 +02:00
Nikolay Krasko
a41e5fff6b Regenerate ultimate tests - update copyright 2017-08-10 15:58:15 +03:00
Dmitry Petrov
674d30cd76 Report deprecation on typealias companion object for deprecated alias 2017-08-10 15:45:44 +03:00
Dmitry Petrov
c180de563f Support DslMarker on type aliases 2017-08-10 15:45:44 +03:00
Nikolay Krasko
223acbcfeb Clear static application in GenericReplTest 2017-08-10 15:43:54 +03:00
Nikolay Krasko
e35b262827 Clear application in CompilerApiTest 2017-08-10 15:43:54 +03:00
Nikolay Krasko
4e190248cd Add resetApplicationToNull utility with old application 2017-08-10 15:43:54 +03:00
Mikhael Bogdanov
3fd6dd3572 Add test for quoted class name 2017-08-10 12:10:25 +02:00
Dmitry Jemerov
022430cb59 Set correct library kind for transitive dependencies 2017-08-10 11:43:35 +02:00
Mikhail Zarechenskiy
974dad571c [NI] Report errors about inapplicable wrong receiver
Now it's possible because we don't commit trace with inapplicable `provideDelegate` operator (20e105c274)
2017-08-09 17:37:44 +03:00
Vyacheslav Gerasimov
2ac7b6a534 UAST: Fix DeclarationDescriptor.toSource return first found source element
instead of null, when multiple descriptors found

 #KT-18837 Fixed
2017-08-09 15:34:41 +03:00
Vyacheslav Gerasimov
915f47133b UAST: Fix KotlinUMethod annotation handling, properly handle use site targets
#KT-16834 Fixed
 #KT-18893 Fixed
2017-08-09 15:34:34 +03:00
Vyacheslav Gerasimov
f24488915a UAST: Log error when failed to create light class for UObjectLiteralExpression 2017-08-09 15:34:27 +03:00
Vyacheslav Gerasimov
adfc481c7a Add ProjectImportProvider for *.gradle.kts file to import it as module
#KT-19466 Fixed
2017-08-09 15:34:19 +03:00
Vyacheslav Gerasimov
4405021f85 Add ProjectOpenProcessor for *.gradle.kts file to open it as project
#KT-19024 Fixed
2017-08-09 15:34:11 +03:00
Dmitry Jemerov
73a4da6c56 Cache list of dependent modules in modification tracker 2017-08-09 13:26:09 +02:00
Dmitry Jemerov
a7bbf3d1f8 Don't increase OOCB count when a REPL line is modified 2017-08-09 13:26:09 +02:00
Dmitry Jemerov
3415853cac Add ModuleDescriptor.assertValid() for ensuring consistency 2017-08-09 13:26:09 +02:00
Dmitry Jemerov
ac96c31a7d Retrieve module descriptors for implementing modules on demand 2017-08-09 13:26:09 +02:00
Dmitry Jemerov
0b45d25bb1 Fix compilation after rebase 2017-08-09 13:26:09 +02:00
Dmitry Jemerov
bdbe134b60 Recreate module descriptors for affected modules only on a change 2017-08-09 13:26:09 +02:00
Dmitry Jemerov
07794c8188 On-demand creation of ModuleDescriptors 2017-08-09 13:26:09 +02:00
Dmitry Jemerov
dde1f4b8f3 Fix OOCB updates for code fragments 2017-08-09 13:26:09 +02:00
Dmitry Jemerov
36cabf1bfc Move entire logic for ModuleDescriptor setup into ResolverForProjectImpl 2017-08-09 13:26:09 +02:00
Dmitry Jemerov
d6a9a49968 Disable tracking of Kotlin files by Java OOCB listener 2017-08-09 13:26:09 +02:00
Dmitry Jemerov
aafe7e6f1b Refactoring: move createResolverForModule() into ResolverForProjectImpl 2017-08-09 13:26:09 +02:00
Dmitry Jemerov
fcc067435e Refactoring: streamline module resolver setup code 2017-08-09 13:26:09 +02:00
Dmitry Jemerov
194deccd09 Remove one level of indirection from ModuleResolverProvider creation 2017-08-09 13:26:09 +02:00
Dmitry Jemerov
3debca09ea Remove callback hell from LazyModuleDependencies 2017-08-09 13:26:09 +02:00
Mikhail Zarechenskiy
cfbc559a97 [NI] Propagate tracking binding trace into context 2017-08-09 14:01:04 +03:00
Mikhail Zarechenskiy
4a74ca568c [NI] Don't forget to deparenthesize expression before type checking 2017-08-09 14:01:00 +03:00
Mikhail Zarechenskiy
053b02e0df [NI] Fold { Lower | Upper } & Equality constraints if it's possible 2017-08-09 14:00:53 +03:00
Mikhail Zarechenskiy
20e105c274 Don't commit trace with inapplicable provideDelegate operator
This helps in NI as there we have different logic for delegates inference
2017-08-09 13:50:50 +03:00
Mikhael Bogdanov
82c3637d91 Wide visibility in ir common stuff 2017-08-09 12:07:38 +02:00
Mikhail Zarechenskiy
46d0ea3eed Use operation reference as lookup element to preserve old behaviour
See related changes in fb72726f08
2017-08-09 00:59:12 +03:00
Alexey Sedunov
cf3615d279 Kotlin Facet: Fix element ordering in compiler arguments XML
Do not rely on method list as it's ordered differently
2017-08-09 00:03:28 +03:00
Valentin Kipyatkov
e52c3b4c81 Rewritten KDoc-link resolve and completion to work more reasonably 2017-08-08 22:06:04 +03:00
Valentin Kipyatkov
998814b1a1 Support for import aliases in both resolve and completion in KDoc 2017-08-08 22:06:04 +03:00
Valentin Kipyatkov
9361cd895c Support for import aliases in code completion
#KT-8848 Fixed
2017-08-08 22:06:04 +03:00
Mikhail Zarechenskiy
48246e5f34 [NI] Add resolution part to check for abstract super call 2017-08-08 15:44:31 +03:00
Mikhail Zarechenskiy
b6e195128c [NI] Resolution diagnostics don't produce errors as is 2017-08-08 15:44:30 +03:00
Mikhail Zarechenskiy
5486f4e612 [NI] Don't report NI error for recorded info about smartcasts 2017-08-08 15:44:28 +03:00
Mikhail Zarechenskiy
64b722d4f6 Minor, reduce nesting 2017-08-08 15:44:20 +03:00
Nikolay Krasko
9c37d0a007 Disable building dependencies caches in configure GSK tests 2017-08-08 15:26:16 +03:00
Nikolay Krasko
60e330b6f3 Update configure tests after binding comments and spaces to script body 2017-08-08 15:26:16 +03:00
Denis Zharkov
ff0736f09e Fix exception after combination of while (true) + stack-spilling
FixStack transformation divides on phases:
- Fixing stack before break/continue
- Fixing stack for inline markers/try-catch blocks

After the first stage all ALWAYS_TRUE markers are replaced
with simple GOTO's and if we're skipping break/continue edges
we won't reach the code after while (true) statement.

At the same time it's fine to not to skip them in the second phase
as the stack for them is already corrected in the first phase

 #KT-19475 Fixed
2017-08-08 18:52:21 +07:00
Denis Zharkov
45d5f6a950 Add test for obsolete issue
#KT-19467 Obsolete
2017-08-08 18:52:21 +07:00
Mikhael Bogdanov
3ae084b1b3 Get rid of reification from 'deepCopyWithVariables' 2017-08-08 13:33:20 +02:00
Mikhael Bogdanov
49612063dc Wide visibility in ir common stuff 2017-08-08 13:25:49 +02:00
Mikhael Bogdanov
07c5702861 Add missed 'version' in core modules facets 2017-08-08 13:09:48 +02:00
Mikhael Bogdanov
6e4b02a94b Disable 'areEqualByValue' 2017-08-08 13:09:48 +02:00
Mikhael Bogdanov
6305abdf9f Wide visibility in ir common stuff 2017-08-08 13:09:47 +02:00
Valentin Kipyatkov
ca418c727e KT-19278 Optimize imports on the fly should not remove incomplete import while it's being typed
#KT-19278 Fixed
2017-08-08 12:27:16 +03:00
Valentin Kipyatkov
8a17e6c1c9 WIP 2017-08-08 12:27:15 +03:00
Valentin Kipyatkov
e53b1a1e92 KT-19277 Optimize imports on the fly should not work in test data files
#KT-19277 Fixed
2017-08-08 12:27:15 +03:00
Mikhail Glukhikh
5904b7f257 Remove ModalityState.any() from J2kPostProcessor #KT-19453 Fixed 2017-08-08 11:33:32 +03:00
Mikhael Bogdanov
15f401a473 Copy annotation and attributes on class transformation during inline 2017-08-08 09:50:42 +02:00
Mikhael Bogdanov
11ba805181 Convert MethodBodyVisitor to Kotlin 2017-08-08 09:50:41 +02:00
Mikhael Bogdanov
5ecdf2af9e Rename MethodBodyVisitor.java to MethodBodyVisitor.kt 2017-08-08 09:50:41 +02:00
Mikhael Bogdanov
fca1500d48 Clean code 2017-08-08 09:50:40 +02:00
Mikhail Zarechenskiy
e2dcf47b3b Fix highlighting range of diagnostic in test data
Because of ae3497c6ce
2017-08-08 00:29:18 +03:00
Sergey Igushkin
52f923c5ff Fix internals of an android-library not accessible in its androidTest
Issue #KT-19370 Fixed
2017-08-07 20:33:18 +03:00
Mikhail Zarechenskiy
ae3497c6ce Reduce highlighting range for UNCHECKED_CAST
#KT-18985 Fixed
2017-08-07 18:49:58 +03:00
Mikhail Zarechenskiy
8f8143d3ed Fix IAE for wrong use-site @file annotation
#EA-100189 Fixed
2017-08-07 18:49:57 +03:00
Mikhail Zarechenskiy
4d4c39939f Report full package FQ name in compilation errors related to visibility
#KT-18966 Fixed
2017-08-07 18:49:55 +03:00
Mikhail Zarechenskiy
216ab1c6d1 Fix error message for inapplicable operator on getValue function
#KT-11739 Fixed
2017-08-07 18:49:52 +03:00
Mikhail Zarechenskiy
7ba073206d Add test for obsolete issue about SAMs
#KT-11951 Obsolete
2017-08-07 18:36:07 +03:00
Mikhail Zarechenskiy
7693f64dee [NI] Take into account safe call when updating recorded type 2017-08-07 18:01:21 +03:00
Mikhail Zarechenskiy
9e018fa094 [NI] Try to analyze each lambda at least once 2017-08-07 18:01:20 +03:00
Mikhail Zarechenskiy
07a4496054 [NI] Resolve lambda even if there is contradiction in CS
To avoid exceptions about non-recorded lambda
2017-08-07 18:01:19 +03:00
Mikhail Zarechenskiy
a13442b12b [NI] Fix data flow for arguments in special calls 2017-08-07 18:01:18 +03:00
Mikhail Zarechenskiy
dc83e5ca3a Fix test which is correctly work in old inference 2017-08-07 18:01:17 +03:00
Mikhail Zarechenskiy
3fb865e07c Move test for NI to diagnostic tests and add "todo" 2017-08-07 18:01:16 +03:00
Mikhail Zarechenskiy
fb72726f08 Resolve right part of equality with given descriptors 2017-08-07 18:01:15 +03:00
Stanislav Erokhin
6680f01cfe [NI] Fix assertion error at FlexibleTypeImpl
Use KotlinTypeFactory for FlexibleType creation
2017-08-07 18:01:14 +03:00
Mikhail Zarechenskiy
e7cd615450 [NI] Introduce type depth in CS calculator to avoid SOE 2017-08-07 18:01:13 +03:00
Mikhail Zarechenskiy
cf75afba66 [NI] Fix type intersection for equal types 2017-08-07 18:01:12 +03:00
Mikhail Zarechenskiy
ac507e721c [NI] Do not add non-dynamic candidates when there is dynamic extension 2017-08-07 18:01:11 +03:00
Mikhail Zarechenskiy
21c5187c9e [NI] Handle dynamic types in type intersector 2017-08-07 18:01:10 +03:00
Mikhail Zarechenskiy
0d464f06d1 [NI] Consider CS as nullable if one of the types isn't subtype of Any
Note that this isn't fully correct, consider the following situation:

S : T, T : Any?
=> CS(S, T) = T, but for now it will be T?, which is reliable but not so specific as just T
2017-08-07 18:01:09 +03:00
Mikhail Zarechenskiy
39349abd39 [NI] Preserve name of parameters for functional types 2017-08-07 18:01:07 +03:00
Mikhail Zarechenskiy
5ec8d4920f [NI] Translate new resolved call to old one to avoid CCE 2017-08-07 18:01:06 +03:00
Dmitry Petrov
c0d6eff97c [NI] Select variable with proper non-trivial constraint first 2017-08-07 18:01:05 +03:00
Dmitry Petrov
0bf81aeec0 [NI] Extract InferenceStepResolver into a separate component 2017-08-07 18:01:04 +03:00
Dmitry Petrov
258a5aea28 [NI] Minor cleanup in FixationOrderCalculator 2017-08-07 18:01:03 +03:00
Stanislav Erokhin
ab2f99542a [NI] Redo how we take care of postpone arguments
The main change here is the following: before callable reference
resolution starts directly after choosing candidate. Since now we
start resolution before call completion.
2017-08-07 18:01:02 +03:00
Stanislav Erokhin
b344865c15 [NI] Minor. Fixes after review 2017-08-07 18:01:01 +03:00
Stanislav Erokhin
93d80c252f [NI] Refactoring. Move properties from KotlinCall to external component 2017-08-07 18:01:00 +03:00
Stanislav Erokhin
ef93088a42 [NI] Move most of KotlinCallDiagnostic to one file
Now there is 3 kind of KotlinCallDiagnostic:
  - ResolutionDiagnostic
  - ConstraintSystemCallDiagnostic
  - other common diagnostic

Also SpecialResolutionParts were merged into other ResolutionParts
2017-08-07 18:00:59 +03:00
Stanislav Erokhin
9378bff65c [NI] Move irrelevant code from KotlinCallCompleter
Extract code about smart cast diagnostic to new component
AdditionalDiagnosticReporter
2017-08-07 18:00:58 +03:00
Stanislav Erokhin
3450340d7f [NI] Refactoring. Introduced PostponableCallArgument
Also here argument resolution was divided to two parts:
for SimpleCallArguments and for PostponableCallArguments.
Call Resolution for SimpleCallArguments also used for CheckReceivers
and lambda result arguments checks
2017-08-07 18:00:57 +03:00
Stanislav Erokhin
1bc68e073d [NI] Minor. Clarified type for arguments from lambda 2017-08-07 18:00:56 +03:00
Stanislav Erokhin
4848f8e3da [NI] Use correct type in TypeApproximator for Invariant projection 2017-08-07 18:00:56 +03:00
Stanislav Erokhin
85e34163bb [NI] Temporary fix for cases related callable reference and if
For cases like if (..) ::foo else ::bar we didn't write stub resolved
calls for ::foo before call completion. Because of this, and strange
code in if we get null inside type info.
2017-08-07 18:00:54 +03:00
Stanislav Erokhin
455c43afa8 [NI] Some improvements in callable reference resolution 2017-08-07 18:00:53 +03:00
Stanislav Erokhin
f1144c9f01 [NI] Use resolved lhsType as unbound receiver. 2017-08-07 18:00:53 +03:00
Stanislav Erokhin
c752e1580e [NI] Check receivers for callable reference resolution. 2017-08-07 18:00:52 +03:00
Stanislav Erokhin
a5dffafacd [NI] Fix provideDelegate resolution.
For provideDelegate there is no real psi for resolution,
so we write corresponding call via special trace key.
2017-08-07 18:00:51 +03:00
Mikhail Zarechenskiy
7802492b08 [NI] Fix resulting type when there are no proper constraints 2017-08-07 18:00:50 +03:00
Mikhail Zarechenskiy
6be726854f [NI] Preserve type abbreviation during type substitution 2017-08-07 18:00:49 +03:00
Mikhail Zarechenskiy
76d013a33f [NI] Resolve % to mod if candidates have wrong receivers 2017-08-07 18:00:48 +03:00
Dmitry Petrov
4963580f90 [NI] Take into account return without expression in lambdas 2017-08-07 18:00:47 +03:00
Mikhail Zarechenskiy
17cdbcca03 [NI] Approximate substituted type arguments for non-members 2017-08-07 18:00:46 +03:00
Stanislav Erokhin
915ac32bfb [NI] Improve type inference for T vs Captured(in Smt)
If we has Inv<T> <: Inv<Captured(in Foo)> then we should get:
- T <: Captured(in Foo)
- Captured(in Foo) <: T

Before this commit we got: T <: Foo instead first constraint.
2017-08-07 18:00:45 +03:00
Stanislav Erokhin
91241a34d1 [NI] Run checks for captured types only once in NewTypeSubstitutor
Sometimes we can get Enum<Captured(*)> type here, so, supertype for
Captured(*) is Enum<Capture(*)> and we go into SO.
2017-08-07 18:00:44 +03:00
Stanislav Erokhin
d58c6e245f Minor. rename type parameters for debug purposes. 2017-08-07 18:00:43 +03:00
Mikhail Zarechenskiy
e74a02eb94 [NI] Approximate implicit return type for functions 2017-08-07 18:00:42 +03:00
Mikhail Zarechenskiy
ffc130f5fb [NI] Always approximate captured types for property descriptors 2017-08-07 18:00:41 +03:00
Stanislav Erokhin
5f2cc75718 [NI] Support INAPPLICABLE_WRONG_RECEIVER candidate applicability
It is important for provideDelegate resolution, because if scope has
provideDelegate with wrong receiver we shouldn't resolve to it and
report any errors.
2017-08-07 18:00:40 +03:00
Stanislav Erokhin
e4b73fcdbd [NI] Create SubCallArgument for variable in VariableAsFunctionCall
If variable is generic call, then we should complete inference only
after invoke resolution. It means that explicit receiver for invoke
should be SubKotlinCallArgument.
But, if this property has no generics,
for example local property, then this property can have smartcast and
such call has no type arguments -> no completion required.
For such call we should store information about smart casts.
2017-08-07 18:00:39 +03:00
Dmitry Petrov
756f7d6e9c [NI] Fix tests (was a type checker bug, see KT-18380) 2017-08-07 18:00:38 +03:00
Dmitry Petrov
d4e8a30dcf [NI] Fix nullability for captured type in input types approximation 2017-08-07 18:00:37 +03:00
Dmitry Petrov
e5c87fdad7 [NI] Filter out duplicates types in commonSuperTypeForNotNullTypes 2017-08-07 18:00:36 +03:00
Dmitry Petrov
b336919db3 [NI] In NI mode, use return type from special call resolution for '!!' 2017-08-07 18:00:35 +03:00
Dmitry Petrov
397e04f382 [NI] Do not use return type from 'onlyResolvedCall' 2017-08-07 18:00:34 +03:00
Dmitry Petrov
5b2e66f0ca [NI] Invoke checkType for arguments
checkType performs various actions required by BE
(e.g., record nullability assertions information for JVM BE).
2017-08-07 18:00:33 +03:00
Dmitry Petrov
dc453e6d8b [NI] Update lambda argument expression type when return type is known 2017-08-07 18:00:32 +03:00
Dmitry Petrov
ba068c2d65 Use original descriptor for enum constructor symbol 2017-08-07 18:00:31 +03:00
Mikhail Zarechenskiy
def0816095 [NI] Write info about hidden descriptor to candidate 2017-08-07 18:00:30 +03:00
Mikhail Zarechenskiy
38d9123a57 [NI] Use weaker upper constraint for case {T & Any} <: S 2017-08-07 18:00:29 +03:00
Stanislav Erokhin
18961cc5a9 [NI] Analyze lambda in independent context if it isn't call argument 2017-08-07 18:00:28 +03:00
Dmitry Petrov
8599763cb9 Do not perform type checks for function literals in visitor in NI mode
They are type-checked as arguments for the corresponding expressions.
2017-08-07 18:00:27 +03:00
Dmitry Petrov
fbad16567b [NI] Fix number type adjustment for greatest lower bound calculation
Compute common supertype (regardless of whether the given set of
lower bounds contains number types, intersection types, or whatever).

If the result type S is a possibly nullable intersection X1 & ... & Xn,
N = {Xi | Xi is a primitive number type},
R = {Xi | Xi is not a primitive number type},
M = default primitive number type for {Nj},
then adjusted type T* = M & R1 & ... Rm with the same nullability as S.

NB: IntegerValueType(_) = Int & Byte & Short & Long
2017-08-07 18:00:26 +03:00
Dmitry Petrov
1ae4278cfd Minor: fix formatting 2017-08-07 18:00:25 +03:00
Mikhail Zarechenskiy
bc2a8555a3 [NI] Resolve collection literals arguments as postponed ones 2017-08-07 18:00:24 +03:00
Stanislav Erokhin
c0c94910e2 [NI] Fix StackOverflow in TypeApproximator
For cases like Enum<Captured(*)> where Captured(*) has supertype
Enum<Captured(*)> we get SO in TypeApproximator.
To prevent this argument depth was introduced.
2017-08-07 18:00:23 +03:00
Dmitry Petrov
9fa3bce73a [NI] Fix special case of captured type handling in subtyping
Given the subtyping constraint
  X <: CapturedType(in Y)
we should check only
  X <: Y
if X contains type variables.
2017-08-07 18:00:22 +03:00
Dmitry Petrov
26cc08be65 Fix anonymous function literals handling in type checker
- [NI] Create type info directly if the expected type is functional.
- Properly handle suspended function expected type.
2017-08-07 18:00:21 +03:00
Dmitry Petrov
6facdcb7ea Minor: lambda arguments formatting 2017-08-07 18:00:20 +03:00
Mikhail Zarechenskiy
badbf777df [NI] Use data flow info from arguments in parenthesis to resolve lambda
Fixes 'javaObjectType' and 'javaPrimitiveType'
2017-08-07 18:00:19 +03:00
Stanislav Erokhin
5eb56dca60 [NI] Check type compatibility before fixation.
If for type variable we have upper and lower bounds, then sometimes
our approximation before fixation give us incorrect result for type
variable and we should chose other bound as result.

Example: Int & Byte <: T <: Byte. If we run approximation for lower
bound we get Int as result and it isn't subtype of Byte.
2017-08-07 18:00:18 +03:00
Mikhail Zarechenskiy
d1263c5dc3 [NI] Coerce to unit for empty lambda block
Fixes 'kt3903'
2017-08-07 18:00:17 +03:00
Mikhail Zarechenskiy
cf55674109 [NI] Support fallback resolve to operator mod if needed
Fixes:
  - assignmentOperations
  - percentAsModOnBigIntegerWithoutRem
2017-08-07 18:00:16 +03:00
Dmitry Petrov
f578d07b00 [NI] Fix lambda return type when expected type is not functional type
Introduce a fresh type variable for lambda return type.

We can't set expected lambda return type to 'Any?', because we can't
infer the actual type from return expressions in lambda in that case.
2017-08-07 18:00:15 +03:00
Dmitry Petrov
f637ebe9ff Minor: formatting for lambda arguments 2017-08-07 18:00:14 +03:00
Stanislav Erokhin
b7c894a6d3 [NI] Capture types from smart-cast types.
Sometimes we have something like if (a is Foo<*>) a.bar()
where bar declared: fun <T> Foo<T>.bar().
For such case we should create receiver with possible types Capture(*).
2017-08-07 18:00:13 +03:00
Mikhail Zarechenskiy
b6bb171b67 [NI] Extension function wins member if it's infix call
Fixes 'infixFunctionOverBuiltinMember'
2017-08-07 18:00:12 +03:00
Mikhail Zarechenskiy
8670d2abba [NI] Propagate information about safe call to receiver argument 2017-08-07 18:00:11 +03:00
Mikhail Zarechenskiy
72d14bfe0d [NI] Record type of callable reference to trace 2017-08-07 18:00:10 +03:00
Dmitry Petrov
a303888e66 [NI] Fix expected return type for function literals
It should actually be Unit, as told in FunctionExpression comments
(was null, later defaulted to Any?).
2017-08-07 18:00:09 +03:00
Dmitry Petrov
0136be3500 [NI] Fix traversing delegated constructor call chain
Use original descriptor instead of possibly substituted one: even though
the substitution is always trivial here, delegated constructor call is
recorded for the original constructor descriptor. So the code that
traverses the delegated constructor call chain should use original
descriptor, too.
2017-08-07 18:00:08 +03:00
Mikhail Zarechenskiy
0634025229 [NI] Propagate known type substitutor to resolution part
This commit fixes 'functionNtoStringGeneric' and 'superConstructor'
2017-08-07 18:00:07 +03:00
Mikhail Zarechenskiy
c6fcbf6172 [NI] Check for unwrapped descriptor when generating accessible function
In new inference we get copy of sam constructor and therefore should check original descriptor in BE.

 This fixes 'protectedSamConstructor' test
2017-08-07 18:00:06 +03:00
Stanislav Erokhin
e12eb66572 [NI] Fix COERCION_TO_UNIT in NI. 2017-08-07 18:00:05 +03:00
Stanislav Erokhin
de17604fe7 [NI] Bind all new resolved calls before update arguments. 2017-08-07 18:00:04 +03:00
Stanislav Erokhin
42438bd363 [NI] Do not calculate lambda return type in Visitor if NI enabled. 2017-08-07 18:00:03 +03:00
Stanislav Erokhin
85248676d2 [NI] Update lambda result arguments after resolution. 2017-08-07 18:00:02 +03:00
Stanislav Erokhin
b9e9243e9d [NI] Add hacks for property delegation resolution. 2017-08-07 18:00:00 +03:00
Stanislav Erokhin
af138e7403 Minor. Extract object to inner class. 2017-08-07 17:59:59 +03:00
Stanislav Erokhin
5bb61d2d02 [NI] Small improvements in callable reference resolution.
I'm not sure in this commit, but it fix some test -> let it be for now.
And yes, now I do not know correct way for callable reference resolution,
so for now it is just proposals.
2017-08-07 17:59:58 +03:00
Stanislav Erokhin
7eabdeffb3 [NI] Fix variable to proper upper type even if direction is TO_SUBTYPE. 2017-08-07 17:59:57 +03:00
Stanislav Erokhin
b3be21146c [NI] Add more hacks. 2017-08-07 17:59:56 +03:00
Stanislav Erokhin
0f0d834c23 [NI] Minor. Fix IOE. 2017-08-07 17:59:55 +03:00
Stanislav Erokhin
55181541af [NI] Change lambda analysis -- create arguments for return statements. 2017-08-07 17:59:54 +03:00
Stanislav Erokhin
58f73bd82a [NI] Use right DFI for arguments smart-casts. 2017-08-07 17:59:53 +03:00
Stanislav Erokhin
30f7396803 [NI] Substitute lambda return type with current substitutor
We should do this because return type even it still not proper
can contain fixed type variables
2017-08-07 17:59:52 +03:00
Stanislav Erokhin
89ac3bd5cf [NI] Do not add useless constraints to constraint system
Skipped constraints:
 - T <: Any, T >: Nothing
 - T <: T, T <: T?, T >: T, T <: T!, T! <: T
2017-08-07 17:59:51 +03:00
Stanislav Erokhin
3a25405088 [NI] Remove type variables for lambda arguments -- use existing instead. 2017-08-07 17:59:50 +03:00
Stanislav Erokhin
ff6a28b64c Add util method to BuildIns is kotlin.Function type. 2017-08-07 17:59:49 +03:00
Stanislav Erokhin
acc6e48172 [NI] Added isSuspend for lambdas. 2017-08-07 17:59:48 +03:00
Stanislav Erokhin
29e2a26ad6 [NI] Write fake ResolvedCall for callable reference. 2017-08-07 17:59:47 +03:00
Stanislav Erokhin
ee16a79612 [NI] Add pre-resolution callable reference argument check.
If expected type for callable reference argument isn't callable type
then make such candidate unsuccessful.
Sometimes expected type is just `T`, where `T` is type variable.
To support such case we take all supertypes and check them instead.
2017-08-07 17:59:46 +03:00
Stanislav Erokhin
55dc2c11f7 [NI] Support callable reference resolution in NI.
Missing parts:
- report results about callable references into trace
2017-08-07 17:59:46 +03:00
Stanislav Erokhin
02f4558683 Add way to create callable reference processor
Priority of variables and function should be the same.
Because of this we create new CompositeSimpleScopeTowerProcessor,
which merge candidates for properties and function into one candidate group
2017-08-07 17:59:44 +03:00
Stanislav Erokhin
36ea9484a9 [NI] Minor. Extract code to function.
Also make KotlinCall unnecessary for TypeVariableFromCallableDescriptor.
2017-08-07 17:59:43 +03:00
Mikhail Zarechenskiy
0b358fb693 Fix collection literals resolve in gradle-based projects
#KT-19441 Fixed
2017-08-07 17:52:08 +03:00
Daniil Vodopian
b24c1bf06c KT-9669: introduced JoinStatementAddSemicolonHandler; registered the handler in plugin.xml; added test coverage (#1232) 2017-08-07 16:20:40 +02:00
Dimach
d624ed4aff KT-18482: "Move lambda argument to parenthesis" action generate uncompilable code fixed (#1226)
* KT-18482 fixed

* Moved code to separate method and changed code to cover few more cases.

* Code style fixes.
2017-08-07 15:43:44 +02:00
Alexey Andreev
a4551fb0fb Fix infinite loop during continuous Gradle build including JS DCE
It's basically a workaround fox bug in Gradle.
See https://github.com/gradle/gradle/issues/2651
2017-08-07 16:36:57 +03:00
Sergey Igushkin
71878b2218 Merge pull request #1225 from nageshs/master
Close the local.properties file after reading
Issue #KT-19397 Fixed
2017-08-07 16:07:51 +03:00
Sergey Igushkin
13a2de1816 Update libraries/ReadMe.MD, add info about plugin markers required for tests 2017-08-07 15:14:37 +03:00
Sergey Igushkin
0cfac71efe (minor) Improve readability of pluginMarkers.gradle, fix indent in file
(minor) Clarify the comment on the setUpSeparateArtifact block
2017-08-07 14:33:35 +03:00
Sergey Igushkin
94036b7cac Add Gradle license 2017-08-07 14:33:33 +03:00
Sergey Igushkin
999db0bc80 Add a test for plugins DSL 2017-08-07 14:32:41 +03:00
Sergey Igushkin
8fd508566a Add Gradle plugin marker artifacts for the Gradle plugins.
This allows for the Gradle plugins DSL to resolve the plugins from
a custom repository.
https://docs.gradle.org/current/userguide/plugins.html#sec:plugin_markers
2017-08-07 14:17:43 +03:00
Toshiaki Kameyama
64eeb479aa Take nullability annotations into account in QF correcting override
So Java NotNull annotated is converted to `Type`
and Java Nullable annotated to `Type?` accordingly

So #KT-19299 Fixed
2017-08-07 13:52:25 +03:00
Mikhail Glukhikh
1264ed7c86 Minor cleanup 2017-08-07 13:20:35 +03:00
Andrius Semionovas
666c241479 KT-19126 Add convert property initializer to getter in interfaces (#1224) 2017-08-07 11:53:37 +02:00
Kirill Rakhman
2536615e0e detect valid extension main functions (#1227)
Fixes #KT-18083
2017-08-07 11:39:34 +02:00
Yujin Jung
4c00119f08 Fix incorrect slack link (#1231) 2017-08-07 11:39:02 +02:00
Nikolay Krasko
7d66af6583 Always assign shebang comment to same position before package 2017-08-07 12:17:20 +03:00
Nikolay Krasko
8d226594ff Put comments and whitespaces under body in script files
It's more consistent to normal function body for IDE.
Doc comments in file beginning are now sticks to declarations
correctly.
Moving declarations at the end of scripts is fixed
2017-08-07 12:17:17 +03:00
Nikolay Krasko
8de6017e53 Minor: rename comments and whitespace binders file 2017-08-07 12:17:14 +03:00
Nikolay Krasko
ae6f38e252 Minor: fix comment about AllCommentsBinder 2017-08-07 12:13:58 +03:00
Nikolay Krasko
6194bc10f8 Move statement out of top-level lambda in scripts (KT-19322)
#KT-19322 Fixed
2017-08-07 12:12:41 +03:00
Dmitry Petrov
656f8bb5cf Turn SwitchCodegenUtil into a class 2017-08-07 10:31:02 +03:00
Dmitry Petrov
435cfeea0a SwitchCodegenUtil: convert to Kotlin and cleanup 2017-08-07 10:31:02 +03:00
Dmitry Petrov
c5772e5549 SwitchCodegenUtil: .java -> .kt 2017-08-07 10:31:02 +03:00
Dmitry Petrov
2ed5a5e368 'when' should use intrinsics for '=='
#KT-19029 Fixed Target versions 1.1.5
 #KT-18818 Fixed Target versions 1.1.5
2017-08-07 10:31:02 +03:00
Jonathan Leitschuh
20cd748377 Add download link for JDK6 on MacOS to Readme.md (#1229)
Reduce the barier to entry for working on Kotlin by providing a
download link for the MacOS JDK6 in the ReadMe.
2017-08-04 22:47:14 +02:00
Toshiaki Kameyama
dbaec43e4d Make abstract both member and class while applying "Make abstract"
So #KT-12613 Fixed
2017-08-04 21:34:21 +03:00
Toshiaki Kameyama
0a9e0ddba9 Use back-ticks correctly in "Add remaining branches" action
So #KT-13985 Fixed
2017-08-04 20:58:46 +03:00
Alexey Sedunov
97a3d343f7 Create Class from Usage: Support nested classes
This covers the case when original expression doesn't contains qualifier
Also for local or inner containing classes:
  - forbid nested objects
  - add 'inner' to nested class declaration

 #KT-16404 Fixed
2017-08-04 16:48:36 +03:00
Alexey Sedunov
d30461afc6 Create Class from Usage: Support multiple containers 2017-08-04 16:48:35 +03:00
Alexey Sedunov
78117b3e7b Create from Usage: Infer expected type from base declarations
#KT-17480 Fixed
2017-08-04 16:48:35 +03:00
Alexey Sedunov
3b4891279e Configuration: Update default settings for Kotlin/JS compiler 2017-08-04 16:48:35 +03:00
Mikhael Bogdanov
d738633981 Switch jvm target to 1.8 in Ultimate plugin and missed version to core modules 2017-08-04 15:45:53 +02:00
Dmitry Jemerov
563472e676 Include org.json classes in Kotlin plugin jar 2017-08-04 15:30:12 +02:00
Mikhael Bogdanov
db9f925bb1 Switch default project jvm target to 1.8, keep 1.6 for core modules 2017-08-04 13:14:50 +02:00
Alexey Sedunov
aed9d3899e Misc: Fix compiler argument usages after refactoring 2017-08-03 19:59:53 +03:00
Kirill Rakhman
41e5840298 Implement inspection for redundant lambda arrow
Fixes #KT-11991
2017-08-03 15:37:04 +02:00
Kirill Rakhman
9ac1a0140c Add inspection for when with only else (#1206)
Fixes #KT-12523
2017-08-03 15:30:28 +02:00
Nikolay Krasko
61b10ac330 Make class prepare request pattern more precise (KT-19429)
Do not bother with check for irrelevant classes.

 #KT-19429 Fixed
2017-08-03 13:11:06 +03:00
Nikolay Krasko
1ef5362edc Fix breakpoints from Kotlin file placed in irrelevant class (KT-19429)
State that there're no locations in given file, if all locations for
line were filtered out because of wrong file name. Need this because
if we throw exception, other positions managers may return locations
without explicit check for file type or file name.

See PositionManagerImpl.java

 #KT-19429 Fixed
2017-08-03 13:11:06 +03:00
Nikolay Krasko
3ea4a7fb47 Drop support for JVM 1.4 in debugger
Kotlin can't run on such JVM anyway.
2017-08-03 13:11:06 +03:00
Mikhail Glukhikh
0e4089ef8e Keep coroutines classes in ProGuard #KT-19433 In Progress 2017-08-03 12:25:11 +03:00
Alexey Sedunov
d10fa8f891 Minor: Fix array detection 2017-08-03 01:55:44 +03:00
Alexey Sedunov
e38cf54dac Minor: Fix facet/project settings editor 2017-08-03 01:55:44 +03:00
Alexey Tsvetkov
f0becd0040 Fix IC with daemon
JPS IC with daemon was not working since
the commit 514635e965

Before that change `IncrementalCompilation.isEnabled`
returned `true` when the corresponding system property was not set.
After the change `isEnabled` returns `true` only if
the system property is set and equals to `"true"`.

The property was never set up for the daemon if `CompilerMode.JPS_COMPILER`
was used (the property was set up in a JPS process or in the daemon in case
it was used with Gradle).

     #KT-19414 fixed
2017-08-02 23:02:11 +03:00
Dmitry Jemerov
82c62b4d8e Add missing read action 2017-08-02 17:11:56 +02:00
Dmitry Jemerov
88420311cb Look at library content to detect library kind when importing 2017-08-02 17:10:01 +02:00
Dmitry Jemerov
b423d58a14 Load JSR-305 annotations for libraries if it's enabled for any module
#KT-19303 Fixed
2017-08-02 15:25:34 +02:00
Mikhail Glukhikh
4ca8d3d6cf J2K: use refactorings and runWriteAction more accurately #KT-19371 Fixed
Do not invoke runWriteAction for post-processings
in Convert(Text)JavaCopyPasteProcessor.
Instead each processing can need write action or not,
and J2kPostProcessor takes this into account.
2017-08-02 15:30:18 +03:00
Mikhail Glukhikh
8d5e69b06c Inline variable: do not show dialog / preview from J2K #KT-19332 Fixed 2017-08-02 15:30:17 +03:00
Mikhael Bogdanov
b56f5593ab Update changelog for 1.1.4-eap-54 2017-08-02 14:09:39 +02:00
Alexey Sedunov
53d12e6cf7 Method Hierarchy: Refactoring
- Do not rely on light methods and Java method hierarchy
- Support val/var parameters
- Support built-in member functions

 #KT-14346 Fixed
2017-08-02 13:08:06 +03:00
Alexey Sedunov
10941ae732 Call Hierarchy: Refactoring
Do not rely on light methods to search usages as some elements
don't have them (e.g. local functions)

 #KT-9288 Fixed
 #KT-14428 Fixed
2017-08-02 13:08:06 +03:00
Alexey Sedunov
0c2ea5d799 Light Classes: Fix equivalence check
Do not consider PsiClass equiavent to KtLightClass
if it's not a light class as well

 #KT-16180 Fixed
2017-08-02 13:08:06 +03:00
Alexey Sedunov
e6f1a3ccf3 Minor: Use Kotlin reflection in usage printing and update test data 2017-08-02 13:08:06 +03:00
Alexey Sedunov
3c0a4a0abf Minor: Fix bug introduced by the refactoring 2017-08-02 13:08:05 +03:00
Dmitry Petrov
c5613888eb Look into proper context when generating backing field access
Problem manifests when a class property name matches a companion object
property name, and class property is referenced in closure context.

 #KT-19367 Fixed Target versions 1.1.5
2017-08-02 11:24:35 +03:00
Dmitry Petrov
05eee9c173 Minor: adjust formatting 2017-08-02 11:24:35 +03:00
Yan Zhulanow
3d7d1b20ab Ensure there won't be the same classpath entries in the resulting classpath 2017-08-02 03:36:57 +03:00
Bill Collins
9a40e9b96d Don't overwrite plugin classpaths detected earlier for annotation processing. Fixes #KT-18022 2017-08-02 03:36:56 +03:00
Yan Zhulanow
3770786075 Minor: Fix test data for CLI test (defaultCacheImplementation option was added in Android Extensions) 2017-08-02 03:36:55 +03:00
Yan Zhulanow
13868f89e8 Minor: Change test format to JUnit 3 2017-08-02 03:35:16 +03:00
Yan Zhulanow
45681ed9eb Fix "'Redundant modality' is not reported with all-open" (KT-18195) 2017-08-02 03:35:15 +03:00
Yan Zhulanow
6002281874 Android Extensions: Downgrade to old Android variant processing logic when 'experimental' flag is disabled (KT-19270) 2017-08-02 03:35:14 +03:00
Yan Zhulanow
3bb7febeb8 AllOpen: Make private members open again because of KT-19047 2017-08-02 03:35:13 +03:00
Yan Zhulanow
5ff014f89d Parcelable, minor: Change error message 2017-08-02 03:35:12 +03:00
Yan Zhulanow
448fa8495a Parcelable, Lint: Do not report "CREATOR field missing" warnings on our '@Parselize' Parcelables 2017-08-02 03:35:11 +03:00
Yan Zhulanow
c1600c9841 Report errors from compiler plugins as compiler PLUGIN_ERRORs (KT-19311) 2017-08-02 03:35:10 +03:00
Yan Zhulanow
9a5a003d0a NoArg: Fix IllegalAccessError on instantiating sealed class child via Java reflection (KT-18245) 2017-08-02 03:21:16 +03:00
Yan Zhulanow
53e193d130 AllOpen: Support @SpringBootTest annotation (KT-18262) 2017-08-02 03:21:15 +03:00
Yan Zhulanow
4dddb00aca Kapt: Fix "Anonymous class types are not rendered properly in stubs" (KT-18682) 2017-08-02 03:21:14 +03:00
Yan Zhulanow
bf2bc1fdc7 Android Extensions: Support smart-casted receivers (KT-18545) 2017-08-02 03:21:13 +03:00
Mikhail Glukhikh
9e9c4f79f5 Make MODIFIERS_ORDER consistent with code style document 2017-08-01 20:42:40 +03:00
Nikolay Krasko
65ea9290ea Skip method check for non-relevant positions (KT-19403)
#KT-19403 Fixed
2017-08-01 20:09:54 +03:00
Nikolay Krasko
2ba89b9e68 Fix bad cast on absent descriptor in field breakpoint (EA-101988) 2017-08-01 20:09:54 +03:00
Alexey Tsvetkov
45ec0e364a Remove Gradle plugin dependency on Apache Commons
We have used `commons-lang` to detect
if current OS is a Windows.
`org.apache.commons.lang.SystemUtils` also
tries to parse JDK version in `clinit` and,
as of AC version 2.4, fails on JDK 9.

I preferred to remove the dependency completely
and copy an implementation of `isWindows` from Intellij
platform, because the code is quite simple
and minimizing unnecessary dependencies will help to avoid
compatibility problems in future.

Gradle plugin also declares a dependency on `commons-io`,
but it seems unused, so the dependency is also removed.

    #KT-18832 fixed
2017-08-01 19:43:25 +03:00
Alexey Sedunov
40163868af Support mutable/immutable compiler arguments 2017-08-01 19:40:37 +03:00
Alexey Sedunov
2984a5a19f Fix reflection-based operations on compiler arguments after conversion 2017-08-01 19:40:22 +03:00
Alexey Sedunov
50599c933f J2K: CommonToolArguments and inheritors 2017-08-01 19:36:49 +03:00
Alexey Sedunov
2e49971989 J2K: CommonToolArguments and inheritors (rename) 2017-08-01 19:36:49 +03:00
Yan Zhulanow
2d8f7419eb Parcelable: Temporarily disable box tests because of OOM 2017-08-01 18:37:27 +03:00
Mikhail Glukhikh
87cdc7635a Do not suggest "can be private" for elements with given annotations
So #KT-19272 Fixed
2017-08-01 18:01:29 +03:00
Mikhail Glukhikh
c5a81691fb Partial code cleanup: can be private and some others applied 2017-08-01 17:08:56 +03:00
Mikhael Bogdanov
42f8a3e65b Generify Symbols class to be able support jvm specific implementation 2017-08-01 15:52:29 +02:00
Mikhael Bogdanov
4dbb82a789 Copy ununsed lowers 2017-08-01 15:52:28 +02:00
Mikhael Bogdanov
df56ef5e3f Copy common lowers 2017-08-01 15:52:28 +02:00
Mikhael Bogdanov
27365dc4be Copy common utils from Native 2017-08-01 15:52:27 +02:00
Nikolay Krasko
5fcefa28a7 Test stub trees compatibility on loadJava/compiledKotlin test data 2017-08-01 16:22:40 +03:00
Mikhail Glukhikh
c2617e89c9 Remove unnecessary check from prepareCodeToInline 2017-08-01 12:32:49 +03:00
Mikhail Glukhikh
1ed1751b63 Report "Make <visibility>" for visibility fixes #KT-19274 Fixed
(instead of "Add <visibility> modifier")
2017-08-01 12:06:28 +03:00
Toshiaki Kameyama
29dba9edb3 Do not report "property can be private" in annotations #KT-19273 Fixed 2017-08-01 11:53:42 +03:00
Nagesh Susarla
b9788bbafd Close the local.properties file after reading 2017-07-31 15:36:18 -07:00
Ilya Gorbunov
050744627d Clean stdlib and reflect before rewriting binary API dump
The change in the run configuration "Binary compatibility tests, overwrite results"
is to prevent incremental compilation of these artifacts.
During the incremental compilation only the declarations in the files being
recompiled are dumped to declarations.json.
This results in incomplete dump and affects the public declarations dump.

This clean step enforces stdlib and reflect libraries to be fully recompiled.
This step can be removed as soon as we do not need declarations.json to dump public API.
2017-07-31 23:13:56 +03:00
Alexey Tsvetkov
69b4d213b7 Ensure IC.isEnabled is not modified by tests 2017-07-31 19:34:59 +03:00
Alexey Tsvetkov
514635e965 IC should be enabled explicitly by build systems
The change only affects JPS on TeamCity (in Intellij IC system property
is always set explicitly; the same holds for Gradle, Maven).
Previous changes have effectively enabled the new IC (which is now default)
for TC JPS builds, which is undesirable as more RAM is used.
2017-07-31 19:34:59 +03:00
Alexey Tsvetkov
5ce3a436c7 Avoid marking dirty dependencies from already compiled chunks
#KT-17397 fixed
2017-07-31 19:34:59 +03:00
Alexey Tsvetkov
7cccba3b9a Refactoring: do not check if IC is enabled in cache
There was a bunch of if-else blocks checking if new IC was enabled or not.
These blocks became useless after `IncrementalCompilation.isExperimental`
was replaced with `IncrementalCompilation.isEnabled`, because when IC is not enabled
we don't use caches anyway.
2017-07-31 19:34:58 +03:00
Alexey Tsvetkov
3f471d1ac6 Minor: add dummy.kt to some IC tests
This makes it impossible to pass the tests
by rebuilding everything.
2017-07-31 19:34:58 +03:00
Alexey Tsvetkov
e602903567 Remove old IC: remove experimental tests 2017-07-31 19:34:58 +03:00
Alexey Tsvetkov
534db2d45b Remove old IC: remove experimental cache version 2017-07-31 19:34:58 +03:00
Alexey Tsvetkov
a4a0335b20 Remove old IC: update KotlinJpsBuildTest 2017-07-31 19:34:58 +03:00
Alexey Tsvetkov
62fdd91947 Remove old IC: remove unnecessary caches 2017-07-31 19:34:58 +03:00
Alexey Tsvetkov
aea5293288 Remove old IC: fix constant search test
The tests were not run with the new IC before
2017-07-31 19:34:58 +03:00
Alexey Tsvetkov
8143ca158b Remove old IC: update on-off tests 2017-07-31 19:34:58 +03:00
Alexey Tsvetkov
e7afb073d9 Remove old IC: remove experimental-expected-kotlin-caches.txt 2017-07-31 19:34:58 +03:00
Alexey Tsvetkov
5af9d29cbe Remove old IC: remove experimental-ic-build.log
This commit moves each experimental-ic-build.log
into a corresponding build.log file.
2017-07-31 19:34:58 +03:00
Alexey Tsvetkov
2bd7d12312 Remove old IC: remove IncrementalCompilation.isExperimental 2017-07-31 19:34:58 +03:00
Alexey Tsvetkov
50091bfac8 Remove old IC: remove flags from CompilationResult 2017-07-31 19:34:58 +03:00
Alexey Tsvetkov
840f688bbf Refactoring: simplify proto map API 2017-07-31 19:34:58 +03:00
Alexander Udalov
2e82bb5632 Use correct LanguageVersionSettings in MetadataSerializer
Also, require users of K2MetadataCompiler to pass "-Xmulti-platform"
manually. Gradle and Maven plugins already do that, so only users who
invoke kotlinc directly are going to be affected by this

 #KT-19287 Fixed
2017-07-31 08:47:47 -07:00
Sergey Igushkin
4923589b38 Fix testAndroidExtensionsManyVariants not using experimental flag 2017-07-31 16:56:06 +03:00
Sergey Igushkin
23ea1a1a60 Push Android Gradle plugin version used in tests to 3.0.0-alpha8 2017-07-31 16:52:48 +03:00
Andrius Semionovas
f42808af94 Add when support for USELESS_IS_CHECK quick fix, related to KT-18965 2017-07-31 16:10:41 +03:00
Andrius Semionovas
e0aca97f9f Add quick-fix for USELESS_IS_CHECK #KT-18965 Fixed 2017-07-31 16:10:23 +03:00
Dimach
88fa7c2952 Introduce "double negation" inspection #KT-4748 Fixed 2017-07-31 15:57:31 +03:00
Toshiaki Kameyama
be0b01a1e6 Do not report "can be private" on effectively private / local elements
So #KT-18822 Fixed
2017-07-31 11:58:14 +03:00
Pavel V. Talanov
05ea99441f script.runtime 1.1.4: Update test data implementations 2017-07-30 18:21:35 +03:00
Pavel V. Talanov
b0b2c046b2 script.runtime 1.1.4: IDE and compiler use 'kotlin.script.experimental' 2017-07-30 18:15:41 +03:00
Pavel V. Talanov
d7e62937b2 script.runtime 1.1.4: Remove new API from 'kotlin.script' package
Copy of new API is in 'kotlin.script.experimental' package
2017-07-30 17:38:10 +03:00
Pavel V. Talanov
9a004ceda2 script.runtime 1.1.4: Remove copy of ScriptContents class
This class is not new(experimental) API is not supposed to be moved
2017-07-30 17:17:54 +03:00
Simon Ogorodnik
5e032139cb KT-18040: Enable auto popup when typing after $e. in string template
#KT-18040 fixed
2017-07-30 09:15:16 +03:00
Alexander Udalov
4e77897bfd Pass LanguageSettingsProvider to AnalyzerFacade explicitly
This way is more flexible for example for tests, where configuring the
service implementation may be tricky (it's usually done in
KotlinCoreEnvironment in production code)
2017-07-28 20:15:28 +03:00
Pavel V. Talanov
ca06d38c5b script.runtime 1.1.4: Copy new API to kotlin.script.experimental package
Minor: Move Environment type alias to resolvers_deprecated.kt file
2017-07-28 20:13:59 +03:00
Pavel V. Talanov
d59a72ea75 script.runtime 1.1.4: Undeprecate old API 2017-07-28 20:13:57 +03:00
Pavel V. Talanov
9e34437447 script.runtime: add 'kotlin-runtime' dependency
script.runtime is not built by JPS, this just affects highlighting
2017-07-28 20:13:54 +03:00
Alexander Udalov
82502e1a8b Fix compilation of kotlin-script-util
Compilation was broken in 46a01ec
2017-07-28 19:26:35 +03:00
Leonid Startsev
527ccaff16 Changes required for serialization plugin to work:
* Support for generation of synthetic nested classes (for implementations
of user-defined serial annotations):

    1. Compiler extenstion points for contributing names and descriptoprs
of nested classes

    2. Control on synthetic class primary constructor visibility

* Public functions for generating initializing expressions for optional
properties
2017-07-28 07:04:57 -07:00
Dmitry Petrov
9e6b706a03 Unwrap property imported from object on property access
#KT-18982 Fixed Target versions 1.1.5
2017-07-28 17:01:04 +03:00
Sergey Igushkin
05919244bd Fix testLogLevelForceGC 2017-07-28 16:39:10 +03:00
Sergey Igushkin
7906ac9348 Fix unresolved rhino dependency in testDce. 2017-07-28 16:39:10 +03:00
Pavel V. Talanov
c1fd8fc318 Send roots changed iff combined dependencies of all scripts changed
This reduces total number of reindex requests when working with scripts

ScriptDependenciesCache::onChange logic is independent from ScriptDependenciesUpdater::onChange
2017-07-28 15:45:29 +03:00
Pavel V. Talanov
e115c8b373 Filter out invalid files before contributing them for indexing
#EA-104574
2017-07-28 15:45:26 +03:00
Nikolay Krasko
99555fa843 Retrieve receiver annotation to stubs from compiled code (KT-19209)
#KT-19209 Fixed
2017-07-28 15:01:32 +03:00
Alexander Udalov
8b149db0ec Drop deprecated KotlinPaths.getRuntimePath, use getStdlibPath instead 2017-07-28 14:16:48 +03:00
Alexander Udalov
b988582531 Refactor utilities in AbstractKotlinJpsBuildTestCase 2017-07-28 14:16:47 +03:00
Alexander Udalov
1e6850f198 CLI: improve error message if libraries are not found in Kotlin home
Also support the '-kotlin-home' argument in kotlinc-js

 #KT-18859 Fixed
2017-07-28 14:16:46 +03:00
Alexander Udalov
eb673d6ed3 Do not try to compile if incorrect language/API version is passed 2017-07-28 14:11:35 +03:00
Alexander Udalov
4b42f9e071 Move JPS-related kotlin-home detection code to jps-plugin 2017-07-28 14:11:35 +03:00
Alexander Udalov
46a01ec131 J2K PathUtil: convert and prettify 2017-07-28 14:11:35 +03:00
Alexander Udalov
3beb6a86f7 J2K PathUtil: move .java -> .kt 2017-07-28 14:11:35 +03:00
Dmitry Petrov
67336653e0 Generate SAM wrappers only if they are required for a given argument
SAM interface wrapper for an argument is required,
if in the function descriptor for SAM adapter
type for the corresponding value parameter
doesn't match type of the corresponding value parameter
in the original (Java) descriptor.

 #KT-19251 Fixed Target versions 1.1.5
2017-07-28 08:24:46 +03:00
Dmitry Petrov
c8bc2d9d16 Minor: code cleanup 2017-07-28 08:24:46 +03:00
Dmitry Petrov
5df461c7e0 Add test for KT-19246
The issue was fixed by
904c7f9c64
2017-07-28 08:24:46 +03:00
Nikolay Krasko
24865ba26a Allow deprecated fix for TYPEALIAS_EXPANSION_DEPRECATION 2017-07-28 01:28:56 +03:00
Nikolay Krasko
53373b66b9 Do not replace in alias when constructor has special pattern (KT-19202)
#KT-19202 Fixed
2017-07-28 01:28:56 +03:00
Nikolay Krasko
1b93e2030f Create isCallee utility function 2017-07-28 01:28:56 +03:00
Yan Zhulanow
142a64e039 Minor: Fix Gradle integration test compilation, replace .use() with try&finally 2017-07-27 21:22:06 +03:00
Sergey Igushkin
fabcd6b73c Fix Gradle IT compilation. 2017-07-27 20:44:03 +03:00
Anton Bannykh
e9e81d96a5 Fixed maven multiplatform test 2017-07-27 19:34:14 +03:00
Mikhael Bogdanov
79921b0206 Update changelog for 1.1.4-eap-33 2017-07-27 14:18:35 +02:00
Valentin Kipyatkov
ee7eb3186d Fixed problems with ModuleDescriptor mismatch after ProcessCanceledException 2017-07-27 14:05:45 +03:00
Valentin Kipyatkov
6ba96b1103 Renamed function 2017-07-27 13:56:30 +03:00
Valentin Kipyatkov
7f467f0fdd Minor 2017-07-27 13:56:29 +03:00
Valentin Kipyatkov
d3ea7c3a14 No need to pass fq-names to import when we have bindingContext 2017-07-27 13:56:28 +03:00
Valentin Kipyatkov
996292264b Fixed inline when multiple implicit receivers exist
#KT-17776 Fixed
 #KT-17266 Fixed
2017-07-27 13:55:25 +03:00
Valentin Kipyatkov
0346b31628 Enabled Loop to call chain inspection again 2017-07-27 13:54:59 +03:00
Valentin Kipyatkov
44dafc38e5 A bit more correct fix of KT-14665 2017-07-27 13:33:57 +03:00
Kirill Rakhman
3ff5c95419 Improve inspection message for NullableBooleanElvisInspection
Also report as "should" or "can" depending on severity
So #KT-19006 Fixed
2017-07-27 11:08:26 +03:00
Simon Ogorodnik
c41c5f1916 KT-19145: Enable type completion for extension properties
#KT-19145 fixed
2017-07-27 09:57:11 +03:00
Andrius Semionovas
68659f5a32 Introduce error "ANNOTATION_USED_AS_ANNOTATION_ARGUMENT" along with QF
The relevant inspection has been removed
So #KT-18855 Fixed
2017-07-27 09:54:22 +03:00
Dmitry Petrov
b81ca31aae Record resolved delegation call for primary ctor if single result
Do the same thing as for secondary constructor (looks like it was a
workaround for R&I bug that was used only for secondary constructors
for some reason).

 #KT-17464 Fixed Target versions 1.1.5
2017-07-27 09:24:48 +03:00
Dmitry Petrov
c9ad290ad5 Do not store null for temporary in destructuring assignment
#KT-19256 Fixed Target versions 1.1.5
2017-07-27 09:02:26 +03:00
Dmitry Petrov
b867c46f72 Generate for-in-range loop as counter loop when possible
If an upper bound is a compile-time constant != Int.MAX_VALUE,
we can generate 'for (i in x..N)' as 'for (i in x until N+1)'.
2017-07-27 09:02:26 +03:00
Dmitry Petrov
7450899b87 Minor: extract get*CompileTimeConstant
Get rid of code duplication.
2017-07-27 09:02:26 +03:00
Ilya Gorbunov
ca8bf395c3 Do not create iterator in 'any', 'none', 'all' and 'count' unless necessary
#KT-19133 Fixed
2017-07-26 22:42:29 +03:00
Mikhael Bogdanov
ff676c050f Properly generate inner classes when compiling source for inline
KT-19175: Compiler generates different bytecode when classes are compiled separately or together

 #KT-19175 Fixed
2017-07-26 20:31:14 +02:00
Sergey Igushkin
7da6ff78c1 Fix Kapt3 classes not consumed by kotlinCompile tasks from their friend 2017-07-26 20:19:33 +03:00
Yan Zhulanow
ea1068a822 Parcelable, minor: Rename MagicParcel to Parcelize 2017-07-26 20:19:32 +03:00
Yan Zhulanow
f29cf07fa4 Android Extensions, minor: Fix test 2017-07-26 20:19:32 +03:00
Yan Zhulanow
92558ad183 Minor: Clarify module name in warning message about empty output classpath/output directories 2017-07-26 20:19:31 +03:00
Yan Zhulanow
826672ea1b Kapt: Register kapt classes output directory as Java classes directory (KT-19211)
This is relevant to pure (non-Android) Java projects and Gradle 4.0+.
2017-07-26 20:19:30 +03:00
Yan Zhulanow
725f51056f Kapt: Do not use AbstractCompile as a supertype for KaptTask (KT-19179)
Gradle sometimes tells that kaptCompile is UP-TO-DATE even when it's not true, so the annotation processing step is silently skipped.
Looks like replacing `mapSource {}` with an explicit getter or with manual `source()` invocation does not fix the problem.

This looks like a bug in Gradle appeared since 3.0. The test from this commit works with Gradle 2.14.1.
2017-07-26 20:19:29 +03:00
Yan Zhulanow
53fda33499 Kapt: 'kaptKotlin' task should be invoked only when all task dependencies from kapt configuration is built (KT-19178) 2017-07-26 20:19:28 +03:00
Yan Zhulanow
c2be771486 Android Extensions: Support defaultCacheImplementation in Gradle 2017-07-26 20:19:27 +03:00
Yan Zhulanow
5a1a4bd8bd Android Extensions: Add global cache flag in compiler plugin 2017-07-26 20:19:26 +03:00
Yan Zhulanow
84eff43b49 Parcelable: Support Android Extensions experimental flag 2017-07-26 20:19:25 +03:00
Yan Zhulanow
98a2506eb0 Android Extensions: Add kotlin-android-extensions-runtime only if experimental flag is enabled 2017-07-26 20:19:25 +03:00
Yan Zhulanow
8cdcfc5e67 Android Extensions: Migrate enabled status check to Gradle importer #KT-17641 2017-07-26 20:19:24 +03:00
Yan Zhulanow
38449caaed Parcelable: Fixes after review 2017-07-26 20:19:23 +03:00
Yan Zhulanow
d0e4b236a7 Parcelable: Support SortedSet, NavigableSet, SortedMap, NavigableMap 2017-07-26 20:19:22 +03:00
Yan Zhulanow
cf607a0f14 Parcelable: Report error on unsupported parameter types, add @RawValue annotation support 2017-07-26 20:19:21 +03:00
Yan Zhulanow
4200629347 Parcelable: Support CharSequence, IBinder/IInterface, objects, enums. Serialize Parcelable efficiently if possible 2017-07-26 20:19:20 +03:00
Yan Zhulanow
19eb30b3ae Parcelable: Add test for clinit merging 2017-07-26 20:19:19 +03:00
Yan Zhulanow
3062e72282 Parcelable: Support Parcelizer interface in order to be able to customize serialization 2017-07-26 20:19:18 +03:00
Yan Zhulanow
aa5f9ee3ec Parcelable: Correctly handle writeToParcel() overriding, report errors on custom writeToParcel() and CREATOR 2017-07-26 20:19:18 +03:00
Yan Zhulanow
96c9bcd820 Parcelable: Allow custom describeContents() implementation 2017-07-26 20:19:17 +03:00
Yan Zhulanow
4197380621 Parcelable: Add declaration checker 2017-07-26 20:19:16 +03:00
Yan Zhulanow
c23bca6afe Parcelable: Add Parcelable functionality to Android Extensions plugin 2017-07-26 20:19:15 +03:00
Yan Zhulanow
edd8a0a64e Parcelable: Download Robolectric artifacts in order to use them in tests 2017-07-26 20:19:14 +03:00
Toshiaki Kameyama
5290553184 Fix Math.min with coerceAtMost intention inside qualified expression
So #KT-19232 Fixed
2017-07-26 20:12:53 +03:00
Ilya Chernikov
a82f66cf45 Add tests for client/session flags removal, minor fix in shutdown logic 2017-07-26 17:16:38 +02:00
Ilya Chernikov
dc88e1e16c Fix daemon clients cleanup, fixes hanging daemon processes 2017-07-26 17:16:37 +02:00
Toshiaki Kameyama
c3988ef184 Support "Lift return out of when" for exhaustive when without else
So #KT-18852 Fixed
2017-07-26 17:44:19 +03:00
Mikhail Glukhikh
9781d1fcdf Remove unused variable with constant initializer #KT-13886 Fixed 2017-07-26 15:18:46 +03:00
Mikhail Glukhikh
a08f55cf99 Cast to type quick-fix: handle case with qualified elements correctly
Same fix for 'add !!' fix
So #KT-18368 Fixed
2017-07-26 15:18:38 +03:00
Mikhail Glukhikh
e6872c52a3 More accurate deparenthesize (keeping annotations) in some IDE actions
So #KT-19004 Fixed
2017-07-26 15:18:30 +03:00
Mikhail Glukhikh
7fb78a0372 Code cleanup: replace chained null-checks with safe-calls 2017-07-26 15:18:22 +03:00
Nikolay Krasko
732d1129ab Enable replace for deprecated alias in whole project (KT-14929)
#KT-14929 Fixed
2017-07-26 14:20:59 +03:00
Nikolay Krasko
5df2698f77 Enable ReplaceWith for type aliases (KT-14929)
#KT-14929 Fixed
2017-07-26 14:20:57 +03:00
Alexander Udalov
224df7a1ea Change -Xload-jsr305-annotations argument to -Xjsr305-annotations={ignore|enable}
See https://youtrack.jetbrains.com/issue/KT-19229 for a complete
explanation

 #KT-19229 Fixed
 #KT-10942
2017-07-26 11:45:25 +03:00
Alexander Udalov
2f99f6ad34 Refactor AnalysisFlags and their support in IDE
* Support flags with any value (not just Boolean)
* Support all flags by parsing arguments in KotlinFacetSettings, instead
  of manually listing known flags

 #KT-19210 Fixed
2017-07-26 11:45:24 +03:00
Alexander Udalov
845de7aa4d Minor, change parameter type of parseCommandLineArguments 2017-07-26 11:45:24 +03:00
Alexander Udalov
593f98190d Keep .txt and .caps files in compiler.pro
Files like org/jline/utils/capabilities.txt are needed for jline to
function correctly

 #KT-19237 Fixed
2017-07-26 11:45:23 +03:00
Dmitry Petrov
0391c24ab2 Provide diagnostic for typealias using deprecated class or constructor
#KT-19205 Fixed Target versions 1.1.5
2017-07-26 09:02:45 +03:00
Dmitry Jemerov
c78ad9c047 Correctly detect library kind when not using modules per sourceset
#KT-19219 Fixed
2017-07-25 18:20:45 +02:00
Simon Ogorodnik
fa88fb74c4 Disable completion binding context caching by default
Now it opt-in in internal mode, due duplication problems
 #KT-19191 fixed
2017-07-25 18:26:34 +03:00
Simon Ogorodnik
094125c970 KT-19154: Fix auto-import to check receiver for members properly
#KT-19154 fixed
2017-07-25 16:16:57 +03:00
Alexander Udalov
f313001b2d Update to jline 3.3.1 and jansi 1.16
Note that the history file name was changed (.kotlin_history ->
.kotlinc_history) because the history is now stored in a different
(incompatible) format.

 #KT-11369 Fixed
2017-07-25 11:10:45 +03:00
Ilya Gorbunov
baa6b44567 Deprecate CharSequence.size in JS
#KT-18267 Fixed
2017-07-24 21:14:45 +03:00
Ilya Gorbunov
f10ea03173 Provide extension to get mutable iterator from the mutable map
#KT-18992 Fixed
2017-07-24 21:02:15 +03:00
Dmitry Jemerov
e0dc7a27a0 Migration for pre-1.1.3 JS libraries
#KT-19156 Fixed
2017-07-24 19:53:52 +02:00
Dmitry Jemerov
861219f502 ConfigureKotlinTest refactoring to avoid duplicating production logic 2017-07-24 19:53:52 +02:00
Dmitry Jemerov
63c6ba7e31 Add missing read action 2017-07-24 19:53:52 +02:00
Dmitry Jemerov
f370d74609 Correctly detect stdlib in Gradle projects; move detection out of EDT
To detect whether a module has an stdlib in its dependencies, look at
source root modules and not at base module.
2017-07-24 19:53:52 +02:00
Dmitry Jemerov
0971af803c Check for non-configured modules in background thread
#KT-17835 Fixed
2017-07-24 19:53:52 +02:00
Dmitry Jemerov
e1f7c91728 Use Kotlin/JVM and Kotlin/JS terms in the UI 2017-07-24 19:53:52 +02:00
Dmitry Jemerov
0f2992ddec JavaFrameworkType: J2K 2017-07-24 19:53:52 +02:00
Dmitry Jemerov
079f7690a8 JavaFrameworkType: rename to .kt 2017-07-24 19:53:52 +02:00
Dmitry Jemerov
6dbaec0cc6 Use distinct icon for Kotlin/JS module and libraries 2017-07-24 19:53:52 +02:00
Dmitry Jemerov
6eff8c7b4b JSFrameworkType: J2K 2017-07-24 19:53:52 +02:00
Dmitry Jemerov
57a501ebce JSFrameworkType: rename to .kt 2017-07-24 19:53:52 +02:00
Pavel V. Talanov
8e3f8c4c14 Fix calling GSS.union for empty array
EA-104046
2017-07-24 18:56:19 +03:00
Pavel V. Talanov
d5ca46157a Refactor: Make DependenciesCache and ScriptDependenciesUpdater services
Rename: DependenciesCache -> ScriptDependenciesCache
    (makes sense to make name more specific since it is a service now)
2017-07-24 18:56:16 +03:00
Pavel V. Talanov
f1811e7f0e Minor, more precise error message 2017-07-24 18:56:14 +03:00
Tudor Luca
129c0e4c9c Updates ReadMe.md to name the Sublime Text Package
Changes the link name for the Sublime Text Package from "TextMate" to Sublime Text
2017-05-18 13:11:57 +03:00
25735 changed files with 1569460 additions and 420951 deletions

7
.bunch Normal file
View File

@@ -0,0 +1,7 @@
182
181
173_181
as31_173_181
as32_181
as33
183

3
.gitattributes vendored
View File

@@ -1 +1,4 @@
**/testData/** linguist-vendored
*Generated.java linguist-generated=true
compiler/cli/bin/* eol=lf
compiler/cli/bin/*.bat eol=crlf

24
.gitignore vendored
View File

@@ -4,10 +4,12 @@
/confluence/target
/dependencies
/dist
/local
/gh-pages
/ideaSDK
/clionSDK
/android-studio/sdk
/out
out/
/tmp
workspace.xml
*.versionsBackup
@@ -17,8 +19,24 @@ workspace.xml
/ultimate/ideaSDK
/ultimate/out
/ultimate/tmp
/js/js.translator/testData/**/out/
/js/js.translator/testData/out/
/js/js.translator/testData/out-min/
.gradle/
build/
!**/src/**/build
!**/test/**/build
*.iml
!**/testData/**/*.iml
.idea/libraries/Gradle*.xml
.idea/libraries/Maven*.xml
.idea/artifacts
.idea/modules
.idea/runConfigurations/JPS_*.xml
.idea/libraries
.idea/modules.xml
.idea/gradle.xml
.idea/compiler.xml
.idea/inspectionProfiles/profiles_settings.xml
.idea/.name
kotlin-native/
kotlin-ultimate/

1
.idea/.name generated
View File

@@ -1 +0,0 @@
Kotlin

15
.idea/ant.xml generated
View File

@@ -1,23 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AntConfiguration">
<buildFile url="file://$PROJECT_DIR$/compiler/frontend/buildLexer.xml" />
<buildFile url="file://$PROJECT_DIR$/build.xml">
<antCommandLine value="-J-ea" />
<maximumHeapSize value="1024" />
</buildFile>
<buildFile url="file://$PROJECT_DIR$/update_dependencies.xml" />
<buildFile url="file://$PROJECT_DIR$/TeamCityBuild.xml">
<maximumHeapSize value="512" />
</buildFile>
<buildFile url="file://$PROJECT_DIR$/idea-runner/runner.xml" />
<buildFile url="file://$PROJECT_DIR$/libraries/build-docs.xml">
<maximumHeapSize value="1024" />
<properties>
<property name="dokka.path" value="../../dokka" />
</properties>
</buildFile>
<buildFile url="file://$PROJECT_DIR$/TeamCityRelay.xml" />
<buildFile url="file://$PROJECT_DIR$/node_utils.xml" />
</component>
</project>

View File

@@ -1,9 +0,0 @@
<component name="ArtifactManager">
<artifact type="jar" name="IdeLazyResolver">
<output-path>$PROJECT_DIR$/out/artifacts/internal/</output-path>
<root id="archive" name="kotlin-ide-common.jar">
<element id="module-output" name="ide-common" />
<element id="dir-copy" path="$PROJECT_DIR$/idea/ide-common" />
</root>
</artifact>
</component>

View File

@@ -1,9 +0,0 @@
<component name="ArtifactManager">
<artifact type="jar" name="Instrumentation">
<output-path>$PROJECT_DIR$/out/artifacts/Instrumentation</output-path>
<root id="archive" name="Instrumentation.jar">
<element id="module-output" name="instrumentation" />
<element id="extracted-dir" path="$PROJECT_DIR$/ideaSDK/lib/asm-all.jar" path-in-jar="/" />
</root>
</artifact>
</component>

View File

@@ -1,9 +0,0 @@
<component name="ArtifactManager">
<artifact type="jar" name="KotlinFormatter">
<output-path>$PROJECT_DIR$/out/artifacts/internal</output-path>
<root id="archive" name="kotlin-formatter.jar">
<element id="module-output" name="formatter" />
<element id="dir-copy" path="$PROJECT_DIR$/idea/formatter" />
</root>
</artifact>
</component>

View File

@@ -1,30 +0,0 @@
<component name="ArtifactManager">
<artifact type="jar" name="KotlinJpsPlugin">
<output-path>$PROJECT_DIR$/out/artifacts/KotlinJpsPlugin</output-path>
<properties id="ant-postprocessing">
<options enabled="true">
<file>file://$PROJECT_DIR$/idea-runner/runner.xml</file>
<target>copy-runtime-for-jps-plugin</target>
</options>
</properties>
<root id="archive" name="kotlin-jps-plugin.jar">
<element id="directory" name="META-INF">
<element id="dir-copy" path="$PROJECT_DIR$/jps-plugin/src/META-INF" />
</element>
<element id="module-output" name="cli-common" />
<element id="module-output" name="idea-jps-common" />
<element id="module-output" name="jps-plugin" />
<element id="module-output" name="preloader" />
<element id="module-output" name="util" />
<element id="module-output" name="util.runtime" />
<element id="file-copy" path="$PROJECT_DIR$/resources/kotlinManifest.properties" />
<element id="module-output" name="daemon-client" />
<element id="module-output" name="daemon-common" />
<element id="module-output" name="deserialization" />
<element id="extracted-dir" path="$PROJECT_DIR$/dependencies/native-platform-uberjar.jar" path-in-jar="/" />
<element id="module-output" name="android-extensions-jps" />
<element id="module-output" name="build-common" />
<element id="module-output" name="compiler-runner" />
</root>
</artifact>
</component>

View File

@@ -1,116 +0,0 @@
<component name="ArtifactManager">
<artifact name="KotlinPlugin">
<output-path>$PROJECT_DIR$/out/artifacts/Kotlin</output-path>
<properties id="ant-postprocessing">
<options enabled="true">
<file>file://$PROJECT_DIR$/idea-runner/runner.xml</file>
<target>copy-runtime-for-idea-plugin</target>
</options>
</properties>
<root id="root">
<element id="directory" name="lib">
<element id="archive" name="kotlin-plugin.jar">
<element id="extracted-dir" path="$PROJECT_DIR$/dependencies/cli-parser-1.1.2.jar" path-in-jar="/" />
<element id="module-output" name="backend" />
<element id="module-output" name="frontend" />
<element id="module-output" name="descriptors" />
<element id="module-output" name="frontend.java" />
<element id="module-output" name="descriptor.loader.java" />
<element id="module-output" name="idea" />
<element id="module-output" name="light-classes" />
<element id="module-output" name="util" />
<element id="module-output" name="util.runtime" />
<element id="module-output" name="j2k" />
<element id="module-output" name="js.frontend" />
<element id="module-output" name="js.parser" />
<element id="module-output" name="cli-common" />
<element id="module-output" name="idea-jps-common" />
<element id="module-output" name="build-common" />
<element id="module-output" name="preloader" />
<element id="module-output" name="deserialization" />
<element id="module-output" name="backend-common" />
<element id="library" level="project" name="builtins" />
<element id="module-output" name="js.ast" />
<element id="directory" name="kotlin">
<element id="dir-copy" path="$PROJECT_DIR$/core/builtins/native/kotlin" />
<element id="dir-copy" path="$PROJECT_DIR$/core/builtins/src/kotlin" />
</element>
<element id="module-output" name="eval4j" />
<element id="module-output" name="idea-analysis" />
<element id="module-output" name="ide-common" />
<element id="file-copy" path="$PROJECT_DIR$/resources/kotlinManifest.properties" />
<element id="module-output" name="idea-android" />
<element id="module-output" name="idea-android-output-parser" />
<element id="module-output" name="js.serializer" />
<element id="module-output" name="serialization" />
<element id="module-output" name="idea-completion" />
<element id="module-output" name="idea-core" />
<element id="module-output" name="container" />
<element id="module-output" name="daemon-common" />
<element id="module-output" name="idea-repl" />
<element id="module-output" name="idea-live-templates" />
<element id="module-output" name="resolution" />
<element id="module-output" name="plugin-api" />
<element id="module-output" name="idea-ultimate" />
<element id="module-output" name="formatter" />
<element id="module-output" name="idea-maven" />
<element id="extracted-dir" path="$PROJECT_DIR$/dependencies/protobuf-2.6.1.jar" path-in-jar="/" />
<element id="module-output" name="backend.common" />
<element id="module-output" name="ir.tree" />
<element id="module-output" name="backend.jvm" />
<element id="module-output" name="ir.psi2ir" />
<element id="module-output" name="annotation-based-compiler-plugins-ide-support" />
<element id="module-output" name="frontend.script" />
</element>
<element id="library" level="project" name="javax.inject" />
<element id="directory" name="jps">
<element id="artifact" artifact-name="KotlinJpsPlugin" />
</element>
<element id="library" level="project" name="markdown" />
<element id="archive" name="android-extensions-ide.jar">
<element id="module-output" name="android-extensions-idea" />
</element>
<element id="archive" name="android-extensions-compiler.jar">
<element id="module-output" name="android-extensions-compiler" />
<element id="module-output" name="android-extensions-runtime" />
</element>
<element id="archive" name="android-lint.jar">
<element id="module-output" name="uast-kotlin" />
<element id="module-output" name="lint-idea" />
<element id="module-output" name="lint-checks" />
<element id="module-output" name="lint-api" />
<element id="module-output" name="uast-kotlin-idea" />
</element>
<element id="archive" name="allopen-ide-plugin.jar">
<element id="module-output" name="allopen-ide" />
</element>
<element id="archive" name="allopen-compiler-plugin.jar">
<element id="module-output" name="allopen-cli" />
</element>
<element id="archive" name="noarg-compiler-plugin.jar">
<element id="module-output" name="noarg-cli" />
</element>
<element id="archive" name="noarg-ide-plugin.jar">
<element id="module-output" name="noarg-ide" />
</element>
<element id="file-copy" path="$PROJECT_DIR$/dependencies/bootstrap-compiler/Kotlin/kotlinc/lib/kotlin-script-runtime.jar" />
<element id="archive" name="sam-with-receiver-compiler-plugin.jar">
<element id="module-output" name="sam-with-receiver-cli" />
</element>
<element id="archive" name="sam-with-receiver-ide-plugin.jar">
<element id="module-output" name="sam-with-receiver-ide" />
</element>
<element id="archive" name="kotlin-gradle-tooling.jar">
<element id="module-output" name="kotlin-gradle-tooling" />
</element>
<element id="library" level="project" name="uast-java" />
<element id="library" level="project" name="kotlinx-coroutines-core" />
<element id="library" level="project" name="javaslang" />
<element id="library" level="project" name="kotlinx-coroutines-jdk8" />
</element>
<element id="directory" name="kotlinc">
<element id="dir-copy" path="$PROJECT_DIR$/dist/kotlinc" />
</element>
</root>
</artifact>
</component>

View File

@@ -1,289 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="8" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</value>
</option>
<option name="LINE_SEPARATOR" value="&#10;" />
<option name="PREFER_LONGER_NAMES" value="false" />
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
<value>
<package name="java.awt" withSubpackages="false" static="false" />
<package name="javax.tools" withSubpackages="true" static="false" />
<package name="javax.swing" withSubpackages="false" static="false" />
</value>
</option>
<option name="STATIC_METHODS_ORDER_WEIGHT" value="5" />
<option name="METHODS_ORDER_WEIGHT" value="4" />
<option name="RIGHT_MARGIN" value="140" />
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
<option name="BLOCK_COMMENT_AT_FIRST_COLUMN" value="false" />
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="WHILE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_ASSIGNMENT" value="true" />
<option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_THROWS_LIST" value="true" />
<option name="ALIGN_MULTILINE_EXTENDS_LIST" value="true" />
<option name="ALIGN_MULTILINE_PARENTHESIZED_EXPRESSION" value="true" />
<option name="SPACE_AFTER_TYPE_CAST" value="false" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="5" />
<option name="EXTENDS_LIST_WRAP" value="1" />
<option name="THROWS_LIST_WRAP" value="5" />
<option name="EXTENDS_KEYWORD_WRAP" value="1" />
<option name="THROWS_KEYWORD_WRAP" value="1" />
<option name="METHOD_CALL_CHAIN_WRAP" value="1" />
<option name="BINARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="FOR_STATEMENT_WRAP" value="5" />
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
<option name="ASSIGNMENT_WRAP" value="1" />
<option name="IF_BRACE_FORCE" value="1" />
<option name="DOWHILE_BRACE_FORCE" value="1" />
<option name="WHILE_BRACE_FORCE" value="1" />
<option name="FOR_BRACE_FORCE" value="1" />
<option name="FIELD_ANNOTATION_WRAP" value="0" />
<MarkdownNavigatorCodeStyleSettings>
<option name="RIGHT_MARGIN" value="72" />
</MarkdownNavigatorCodeStyleSettings>
<XML>
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
<codeStyleSettings language="CFML">
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="WHILE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="5" />
<option name="BINARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="FOR_STATEMENT_WRAP" value="5" />
<option name="ASSIGNMENT_WRAP" value="1" />
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
</codeStyleSettings>
<codeStyleSettings language="CoffeeScript">
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
<option name="METHOD_PARAMETERS_WRAP" value="5" />
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
</codeStyleSettings>
<codeStyleSettings language="ECMA Script Level 4">
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="WHILE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_EXTENDS_LIST" value="true" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="5" />
<option name="EXTENDS_LIST_WRAP" value="1" />
<option name="EXTENDS_KEYWORD_WRAP" value="1" />
<option name="BINARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="FOR_STATEMENT_WRAP" value="5" />
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
<option name="ASSIGNMENT_WRAP" value="1" />
<option name="IF_BRACE_FORCE" value="1" />
<option name="DOWHILE_BRACE_FORCE" value="1" />
<option name="WHILE_BRACE_FORCE" value="1" />
<option name="FOR_BRACE_FORCE" value="1" />
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
</codeStyleSettings>
<codeStyleSettings language="GSP">
<indentOptions>
<option name="INDENT_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="Groovy">
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_ASSIGNMENT" value="true" />
<option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_THROWS_LIST" value="true" />
<option name="ALIGN_MULTILINE_EXTENDS_LIST" value="true" />
<option name="SPACE_AFTER_TYPE_CAST" value="false" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="5" />
<option name="EXTENDS_LIST_WRAP" value="1" />
<option name="THROWS_LIST_WRAP" value="5" />
<option name="EXTENDS_KEYWORD_WRAP" value="1" />
<option name="THROWS_KEYWORD_WRAP" value="1" />
<option name="METHOD_CALL_CHAIN_WRAP" value="1" />
<option name="BINARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_WRAP" value="5" />
<option name="FOR_STATEMENT_WRAP" value="5" />
<option name="ASSIGNMENT_WRAP" value="1" />
<option name="IF_BRACE_FORCE" value="1" />
<option name="WHILE_BRACE_FORCE" value="1" />
<option name="FOR_BRACE_FORCE" value="1" />
<option name="FIELD_ANNOTATION_WRAP" value="0" />
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
</codeStyleSettings>
<codeStyleSettings language="HTML">
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="8" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JAVA">
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
<option name="BLOCK_COMMENT_AT_FIRST_COLUMN" value="false" />
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="WHILE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_ASSIGNMENT" value="true" />
<option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_THROWS_LIST" value="true" />
<option name="ALIGN_MULTILINE_EXTENDS_LIST" value="true" />
<option name="ALIGN_MULTILINE_PARENTHESIZED_EXPRESSION" value="true" />
<option name="SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE" value="true" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="5" />
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
<option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
<option name="EXTENDS_LIST_WRAP" value="1" />
<option name="THROWS_LIST_WRAP" value="5" />
<option name="EXTENDS_KEYWORD_WRAP" value="1" />
<option name="THROWS_KEYWORD_WRAP" value="1" />
<option name="METHOD_CALL_CHAIN_WRAP" value="1" />
<option name="BINARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="FOR_STATEMENT_WRAP" value="5" />
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
<option name="ASSIGNMENT_WRAP" value="1" />
<option name="IF_BRACE_FORCE" value="1" />
<option name="DOWHILE_BRACE_FORCE" value="1" />
<option name="WHILE_BRACE_FORCE" value="1" />
<option name="FOR_BRACE_FORCE" value="1" />
<option name="FIELD_ANNOTATION_WRAP" value="0" />
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
<indentOptions>
<option name="TAB_SIZE" value="8" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JavaScript">
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="WHILE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="5" />
<option name="BINARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="FOR_STATEMENT_WRAP" value="5" />
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
<option name="ASSIGNMENT_WRAP" value="1" />
<option name="IF_BRACE_FORCE" value="1" />
<option name="DOWHILE_BRACE_FORCE" value="1" />
<option name="WHILE_BRACE_FORCE" value="1" />
<option name="FOR_BRACE_FORCE" value="1" />
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
</codeStyleSettings>
<codeStyleSettings language="Scala">
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="WHILE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_EXTENDS_LIST" value="true" />
<option name="ALIGN_MULTILINE_PARENTHESIZED_EXPRESSION" value="true" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="5" />
<option name="EXTENDS_LIST_WRAP" value="1" />
<option name="EXTENDS_KEYWORD_WRAP" value="1" />
<option name="METHOD_CALL_CHAIN_WRAP" value="1" />
<option name="BINARY_OPERATION_WRAP" value="5" />
<option name="FOR_STATEMENT_WRAP" value="5" />
<option name="IF_BRACE_FORCE" value="1" />
<option name="DOWHILE_BRACE_FORCE" value="1" />
<option name="WHILE_BRACE_FORCE" value="1" />
<option name="FOR_BRACE_FORCE" value="1" />
<option name="FIELD_ANNOTATION_WRAP" value="0" />
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
</codeStyleSettings>
<codeStyleSettings language="TypeScript">
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="WHILE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_EXTENDS_LIST" value="true" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="5" />
<option name="EXTENDS_LIST_WRAP" value="1" />
<option name="EXTENDS_KEYWORD_WRAP" value="1" />
<option name="BINARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="FOR_STATEMENT_WRAP" value="5" />
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
<option name="ASSIGNMENT_WRAP" value="1" />
<option name="IF_BRACE_FORCE" value="1" />
<option name="DOWHILE_BRACE_FORCE" value="1" />
<option name="WHILE_BRACE_FORCE" value="1" />
<option name="FOR_BRACE_FORCE" value="1" />
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
</codeStyleSettings>
<codeStyleSettings language="XML">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="8" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="WHILE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
</codeStyleSettings>
</value>
</option>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</component>
</project>

104
.idea/codeStyles/Project.xml generated Normal file
View File

@@ -0,0 +1,104 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<option name="LINE_SEPARATOR" value="&#10;" />
<option name="RIGHT_MARGIN" value="140" />
<JavaCodeStyleSettings>
<option name="PREFER_LONGER_NAMES" value="false" />
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
<value>
<package name="java.awt" withSubpackages="false" static="false" />
<package name="javax.tools" withSubpackages="true" static="false" />
<package name="javax.swing" withSubpackages="false" static="false" />
</value>
</option>
</JavaCodeStyleSettings>
<JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<MarkdownNavigatorCodeStyleSettings>
<option name="RIGHT_MARGIN" value="72" />
</MarkdownNavigatorCodeStyleSettings>
<codeStyleSettings language="HTML">
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JAVA">
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
<option name="BLOCK_COMMENT_AT_FIRST_COLUMN" value="false" />
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="WHILE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_ASSIGNMENT" value="true" />
<option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_THROWS_LIST" value="true" />
<option name="ALIGN_MULTILINE_EXTENDS_LIST" value="true" />
<option name="ALIGN_MULTILINE_PARENTHESIZED_EXPRESSION" value="true" />
<option name="SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE" value="true" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="5" />
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
<option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
<option name="EXTENDS_LIST_WRAP" value="1" />
<option name="THROWS_LIST_WRAP" value="5" />
<option name="EXTENDS_KEYWORD_WRAP" value="1" />
<option name="THROWS_KEYWORD_WRAP" value="1" />
<option name="METHOD_CALL_CHAIN_WRAP" value="1" />
<option name="BINARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="FOR_STATEMENT_WRAP" value="5" />
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
<option name="ASSIGNMENT_WRAP" value="1" />
<option name="IF_BRACE_FORCE" value="1" />
<option name="DOWHILE_BRACE_FORCE" value="1" />
<option name="WHILE_BRACE_FORCE" value="1" />
<option name="FOR_BRACE_FORCE" value="1" />
<option name="FIELD_ANNOTATION_WRAP" value="0" />
</codeStyleSettings>
<codeStyleSettings language="JavaScript">
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="WHILE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="5" />
<option name="BINARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="FOR_STATEMENT_WRAP" value="5" />
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
<option name="ASSIGNMENT_WRAP" value="1" />
<option name="IF_BRACE_FORCE" value="1" />
<option name="DOWHILE_BRACE_FORCE" value="1" />
<option name="WHILE_BRACE_FORCE" value="1" />
<option name="FOR_BRACE_FORCE" value="1" />
</codeStyleSettings>
<codeStyleSettings language="PROTO">
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="XML">
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
</codeStyleSettings>
</code_scheme>
</component>

5
.idea/codeStyles/codeStyleConfig.xml generated Normal file
View File

@@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

35
.idea/compiler.xml generated
View File

@@ -1,35 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="BUILD_PROCESS_HEAP_SIZE" value="2000" />
<excludeFromCompile>
<directory url="file://$PROJECT_DIR$/core/reflection.jvm" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/core/runtime.jvm" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/core/builtins" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/core/script.runtime" includeSubdirectories="true" />
</excludeFromCompile>
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
</wildcardResourcePatterns>
<bytecodeTargetLevel>
<module name="android-studio" target="1.8" />
<module name="idea" target="1.8" />
<module name="idea-analysis" target="1.8" />
<module name="idea-completion" target="1.8" />
<module name="idea-core" target="1.8" />
<module name="idea-live-templates" target="1.8" />
<module name="idea-repl" target="1.8" />
<module name="idea-runner" target="1.8" />
<module name="idea-test-framework" target="1.8" />
<module name="j2k" target="1.8" />
<module name="kannotator-jps-plugin-test" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>

View File

@@ -1,9 +1,7 @@
<component name="CopyrightManager">
<copyright>
<option name="notice" value="Copyright 2010-&amp;#36;today.year JetBrains s.r.o.&#10;&#10;Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not use this file except in compliance with the License.&#10;You may obtain a copy of the License at&#10;&#10;http://www.apache.org/licenses/LICENSE-2.0&#10;&#10;Unless required by applicable law or agreed to in writing, software&#10;distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See the License for the specific language governing permissions and&#10;limitations under the License." />
<option name="keyword" value="Copyright" />
<option name="allowReplaceKeyword" value="JetBrains" />
<option name="allowReplaceRegexp" value="JetBrains" />
<option name="notice" value="Copyright 2010-&amp;#36;today.year JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license &#10;that can be found in the license/LICENSE.txt file." />
<option name="myName" value="apache" />
<option name="myLocal" value="true" />
</copyright>
</component>

View File

@@ -1,7 +1,7 @@
<component name="CopyrightManager">
<settings default="">
<settings>
<module2copyright>
<element module="all except testData" copyright="apache" />
<element module="Apply copyright" copyright="apache" />
</module2copyright>
<LanguageOptions name="Groovy">
<option name="fileTypeOverride" value="1" />

View File

@@ -1,6 +1,7 @@
<component name="ProjectDictionaryState">
<dictionary name="4u7">
<words>
<w>cidr</w>
<w>foldable</w>
</words>
</dictionary>

View File

@@ -2,6 +2,7 @@
<dictionary name="Nikolay.Krasko">
<words>
<w>accessors</w>
<w>coroutines</w>
<w>crossinline</w>
<w>fqname</w>
<w>goto</w>
@@ -12,6 +13,7 @@
<w>memoize</w>
<w>memoized</w>
<w>multiline</w>
<w>navigatable</w>
<w>preload</w>
<w>preloader</w>
<w>preloading</w>

View File

@@ -2,9 +2,14 @@
<dictionary name="bashor">
<words>
<w>ctor</w>
<w>inlining</w>
<w>interner</w>
<w>intrinsicify</w>
<w>kclass</w>
<w>lookups</w>
<w>minification</w>
<w>minifier</w>
<w>minify</w>
<w>unescape</w>
</words>
</dictionary>

8
.idea/dictionaries/dmitriy_dolovov.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<component name="ProjectDictionaryState">
<dictionary name="dmitriy.dolovov">
<words>
<w>klib</w>
<w>konan</w>
</words>
</dictionary>
</component>

View File

@@ -3,6 +3,8 @@
<words>
<w>checkcast</w>
<w>coroutine</w>
<w>experimentalities</w>
<w>experimentality</w>
<w>insn</w>
<w>liveness</w>
</words>

View File

@@ -1,8 +1,12 @@
<component name="ProjectDictionaryState">
<dictionary name="yan">
<words>
<w>debuggee</w>
<w>deserializes</w>
<w>impls</w>
<w>kapt</w>
<w>parceler</w>
<w>repl</w>
<w>uast</w>
</words>
</dictionary>

7
.idea/dictionaries/yole.xml generated Normal file
View File

@@ -0,0 +1,7 @@
<component name="ProjectDictionaryState">
<dictionary name="yole">
<words>
<w>multiplatform</w>
</words>
</dictionary>
</component>

17
.idea/encodings.xml generated
View File

@@ -1,6 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false">
<file url="file://$PROJECT_DIR$/libraries" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/libraries/examples/browser-example" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/libraries/examples/browser-example-with-library" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/libraries/examples/js-example" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/libraries/examples/kotlin-java-example" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/libraries/examples/kotlin-js-library-example" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/libraries/tools/idl2k" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/libraries/tools/kotlin-annotation-processing-maven" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/libraries/tools/kotlin-maven-allopen" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/libraries/tools/kotlin-maven-noarg" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/libraries/tools/kotlin-maven-plugin" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/libraries/tools/kotlin-maven-plugin-test" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/libraries/tools/kotlin-maven-sam-with-receiver" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/libraries/tools/kotlin-osgi-bundle" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/libraries/tools/maven-archetypes" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/libraries/tools/maven-archetypes/kotlin-archetype-js" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/libraries/tools/maven-archetypes/kotlin-archetype-jvm" charset="UTF-8" />
<file url="PROJECT" charset="UTF-8" />
</component>
</project>

View File

@@ -55,9 +55,6 @@
<inspection_tool class="DoubleCheckedLocking" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreOnVolatileVariables" value="true" />
</inspection_tool>
<inspection_tool class="DuplicateCondition" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreMethodCalls" value="false" />
</inspection_tool>
<inspection_tool class="EmptyStatementBody" enabled="true" level="WARNING" enabled_by_default="true">
<option name="m_reportEmptyBlocks" value="false" />
</inspection_tool>
@@ -98,6 +95,19 @@
<option name="insideTryAllowed" value="false" />
</inspection_tool>
<inspection_tool class="IfStatementWithIdenticalBranches" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="IncompatibleAPI" enabled="true" level="ERROR" enabled_by_default="true">
<option name="problems">
<list>
<Problem reference="com.intellij.openapi.progress.ProgressManager#getProgressIndicator" reason="Not null starting from 181. Use getProgressIndicatorNullable instead." />
<Problem reference="com.intellij.testFramework.PlatformTestCase#createModuleAt" reason="Not static anymore in 181 after 7dacf096c47d2125e17031c71a037b63ab00ec53" />
<Problem reference="com.intellij.testFramework.PlatformTestCase#doCreateRealModuleIn" reason="Not static anymore in 181 after 7dacf096c47d2125e17031c71a037b63ab00ec53" />
<Problem reference="com.intellij.openapi.progress.ProgressManager#getProgressIndicator" reason="Nullable in 181. Temporary use progressIndicatorNullable instead." />
<Problem reference="org.jetbrains.java.decompiler.main.decompiler.BaseDecompiler#addSpace" reason="Method was replaced with outher methods in 182. Use addSpaceEx instead." />
<Problem reference="com.intellij.psi.codeStyle.CommonCodeStyleSettings#copyFrom" reason="Absent in 173. Use CompatibilityKt.copyFromEx instead." />
<Problem reference="com.intellij.psi.codeStyle.CommonCodeStyleSettingsManager#copy" reason="Removed since 181. Use CompatibilityKt.copyFromEx instead." />
</list>
</option>
</inspection_tool>
<inspection_tool class="InnerClassMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="InstanceofCatchParameter" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="InstanceofIncompatibleInterface" enabled="true" level="WARNING" enabled_by_default="true" />
@@ -235,7 +245,6 @@
<scope name="idea openapi" level="WARNING" enabled="true" />
<scope name="runtime.classes" level="ERROR" enabled="true" />
</inspection_tool>
<inspection_tool class="LoopToCallChain" enabled="false" level="INFO" enabled_by_default="false" />
<inspection_tool class="MethodMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true">
<option name="m_onlyPrivateOrFinal" value="false" />
<option name="m_ignoreEmptyMethods" value="true" />
@@ -276,12 +285,25 @@
<inspection_tool class="PackageDirectoryMismatch" enabled="true" level="WARNING" enabled_by_default="false">
<scope name="all except testData" level="WARNING" enabled="true" />
</inspection_tool>
<inspection_tool class="ProblematicAPIUsage" enabled="true" level="ERROR" enabled_by_default="true">
<option name="problems">
<list>
<Problem reference="com.intellij.testFramework.PlatformTestCase#createModuleAt" reason="Not static anymore in 181 after 7dacf096c47d2125e17031c71a037b63ab00ec53" />
<Problem reference="com.intellij.testFramework.PlatformTestCase#doCreateRealModuleIn" reason="Not static anymore in 181 after 7dacf096c47d2125e17031c71a037b63ab00ec53" />
<Problem reference="com.intellij.openapi.progress.ProgressManager#getProgressIndicator" reason="Nullable in 181. Temporary use progressIndicatorNullable instead." />
<Problem reference="com.intellij.testFramework.fixtures.CodeInsightTestFixture#getProjectDisposable" reason="Method was introduced in 173 and absent in 172. Use getProjectDisposableEx instead. (95eaf81e0ea497f8c69263c11fd3202d28a7a1b2)" />
</list>
</option>
</inspection_tool>
<inspection_tool class="ProtectedMemberInFinalClass" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="PublicFieldAccessedInSynchronizedContext" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="PyCompatibilityInspection" enabled="true" level="ERROR" enabled_by_default="true">
<option name="fromVersion" value="2.4" />
<option name="toVersion" value="3.1" />
</inspection_tool>
<inspection_tool class="Reformat" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="processChangedFilesOnly" value="true" />
</inspection_tool>
<inspection_tool class="ReplaceAssignmentWithOperatorAssignment" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreLazyOperators" value="true" />
<option name="ignoreObscureOperators" value="true" />
@@ -403,8 +425,10 @@
<inspection_tool class="UnnecessaryFullyQualifiedName" enabled="true" level="WARNING" enabled_by_default="true">
<scope name="IDEA Test Sources" level="WARNING" enabled="false">
<option name="m_ignoreJavadoc" value="true" />
<option name="ignoreInModuleStatements" value="true" />
</scope>
<option name="m_ignoreJavadoc" value="true" />
<option name="ignoreInModuleStatements" value="true" />
</inspection_tool>
<inspection_tool class="UnnecessaryLabelOnBreakStatement" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnnecessaryLabelOnContinueStatement" enabled="false" level="WARNING" enabled_by_default="false" />

14
.idea/kotlinc.xml generated
View File

@@ -1,10 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Kotlin2JsCompilerArguments">
<option name="sourceMapEmbedSources" />
<option name="sourceMapPrefix" />
</component>
<component name="Kotlin2JvmCompilerArguments">
<option name="jvmTarget" value="1.8" />
</component>
<component name="KotlinCommonCompilerArguments">
<option name="languageVersion" value="1.1" />
<option name="apiVersion" value="1.1" />
<option name="errors">
<ArgumentParseErrors />
</option>
</component>
<component name="KotlinCompilerSettings">
<option name="additionalArguments" value="-version -Xallow-kotlin-package -Xskip-metadata-version-check" />
<option name="additionalArguments" value="-version -Xallow-kotlin-package -Xskip-metadata-version-check -Xread-deserialized-contracts" />
</component>
</project>

View File

@@ -1,9 +0,0 @@
<component name="libraryTable">
<library name="android-layoutlib">
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/android/lib/layoutlib.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@@ -1,17 +0,0 @@
<component name="libraryTable">
<library name="android-plugin">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/android/lib" />
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/android/lib/jps" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/plugins/android/lib" recursive="false" />
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/plugins/android/lib/jps" recursive="false" />
</library>
</component>

View File

@@ -1,10 +0,0 @@
<component name="libraryTable">
<library name="android-studio">
<CLASSES>
<root url="file://$PROJECT_DIR$/android-studio/sdk/lib" />
</CLASSES>
<JAVADOC />
<SOURCES />
<jarDirectory url="file://$PROJECT_DIR$/android-studio/sdk/lib" recursive="false" />
</library>
</component>

View File

@@ -1,14 +0,0 @@
<component name="libraryTable">
<library name="ant">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/ant-1.8/lib/ant.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/apache-ant-1.8.2-src.zip!/apache-ant-1.8.2/src/main" />
</SOURCES>
</library>
</component>

View File

@@ -1,14 +0,0 @@
<component name="libraryTable">
<library name="asm">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/asm-all.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/asm-src.zip!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,9 +0,0 @@
<component name="libraryTable">
<library name="builtins">
<CLASSES>
<root url="file://$PROJECT_DIR$/dist/builtins" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@@ -1,14 +0,0 @@
<component name="libraryTable">
<library name="copyright-plugin">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/copyright/lib/copyright.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,12 +0,0 @@
<component name="libraryTable">
<library name="coverage-plugin">
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/coverage/lib/coverage.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/coverage/lib/jacocoant.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,14 +0,0 @@
<component name="libraryTable">
<library name="dx-android">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/android-5.0/lib/dx.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$PROJECT_DIR$/dependencies/dx-src/src" />
</SOURCES>
</library>
</component>

View File

@@ -1,19 +0,0 @@
<component name="libraryTable">
<library name="gradle-and-groovy-plugin">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/gradle/lib" />
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/Groovy/lib" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/gradle/lib" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/plugins/gradle/lib" recursive="false" />
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/plugins/Groovy/lib" recursive="false" />
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/plugins/gradle/lib" recursive="false" type="SOURCES" />
</library>
</component>

View File

@@ -1,14 +0,0 @@
<component name="libraryTable">
<library name="guava">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/guava-19.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/guava-19.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,18 +0,0 @@
<component name="libraryTable">
<library name="idea-full">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
</ANNOTATIONS>
<CLASSES>
<root url="file://$PROJECT_DIR$/ideaSDK/lib" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/guava-19.0-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/asm-src.zip!/" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/lib" recursive="false" />
</library>
</component>

View File

@@ -1,31 +0,0 @@
<component name="libraryTable">
<library name="intellij-core">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/core/annotations.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/core/asm-all.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/core/guava-19.0.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/core/intellij-core.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/core/jdom.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/core/jna.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/core/log4j.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/core/picocontainer.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/core/snappy-in-java-0.5.1.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/core/trove4j.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/core/util.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/core/xpp3-1.1.4-min.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/core/xstream-1.4.8.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/jsr305.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/guava-19.0-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/asm-src.zip!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/jsr305.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,11 +0,0 @@
<component name="libraryTable">
<library name="intellilang-plugin">
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/IntelliLang/lib/IntelliLang.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,11 +0,0 @@
<component name="libraryTable">
<library name="jansi">
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/jansi.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/jansi-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,11 +0,0 @@
<component name="libraryTable">
<library name="java-decompiler-plugin">
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/java-decompiler/lib/java-decompiler.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,14 +0,0 @@
<component name="libraryTable">
<library name="java-i18n">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/java-i18n/lib/java-i18n.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,11 +0,0 @@
<component name="libraryTable">
<library name="javaslang">
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/javaslang-2.0.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/javaslang-2.0.6-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,11 +0,0 @@
<component name="libraryTable">
<library name="javax.inject">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/javax.inject.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/lib/javax.inject-src.zip!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,14 +0,0 @@
<component name="libraryTable">
<library name="jline">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/jline.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/jline-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,15 +0,0 @@
<component name="libraryTable">
<library name="jps">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="file://$PROJECT_DIR$/ideaSDK/jps" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/jps" recursive="false" />
</library>
</component>

View File

@@ -1,14 +0,0 @@
<component name="libraryTable">
<library name="jps-model">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/jps/jps-model.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,15 +0,0 @@
<component name="libraryTable">
<library name="jps-test">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="file://$PROJECT_DIR$/ideaSDK/jps/test" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/jps/test" recursive="false" />
</library>
</component>

View File

@@ -1,9 +0,0 @@
<component name="libraryTable">
<library name="json-org">
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/json-org.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@@ -1,16 +0,0 @@
<component name="libraryTable">
<library name="junit-4.12">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/hamcrest-core-1.3.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/junit-4.12.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/hamcrest-core-1.3-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/junit-4.12-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,15 +0,0 @@
<component name="libraryTable">
<library name="junit-plugin">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/junit/lib/idea-junit.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/junit/lib/resources_en.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,12 +0,0 @@
<component name="libraryTable">
<library name="kotlin-reflect">
<CLASSES>
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-reflect.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$PROJECT_DIR$/core/reflection.jvm/src" />
<root url="file://$PROJECT_DIR$/core/descriptors.runtime/src" />
</SOURCES>
</library>
</component>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="kotlin-runtime">
<CLASSES>
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-runtime.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$PROJECT_DIR$/libraries/stdlib/src" />
<root url="file://$PROJECT_DIR$/core/builtins/native" />
<root url="file://$PROJECT_DIR$/core/builtins/src" />
</SOURCES>
</library>
</component>

View File

@@ -1,9 +0,0 @@
<component name="libraryTable">
<library name="kotlin-script-runtime">
<CLASSES>
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-script-runtime.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="kotlin-test">
<CLASSES>
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-test.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$PROJECT_DIR$/libraries/kotlin.test/junit/src/main/kotlin" />
<root url="file://$PROJECT_DIR$/libraries/kotlin.test/common/src/main/kotlin" />
<root url="file://$PROJECT_DIR$/libraries/kotlin.test/jvm/src/main/kotlin" />
</SOURCES>
</library>
</component>

View File

@@ -1,11 +0,0 @@
<component name="libraryTable">
<library name="kotlinx-coroutines-core">
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/kotlinx-coroutines-core.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/kotlinx-coroutines-core-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,11 +0,0 @@
<component name="libraryTable">
<library name="kotlinx-coroutines-jdk8">
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/kotlinx-coroutines-jdk8.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/kotlinx-coroutines-jdk8-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,9 +0,0 @@
<component name="libraryTable">
<library name="markdown">
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/markdown.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@@ -1,15 +0,0 @@
<component name="libraryTable">
<library name="maven">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/maven/lib" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/plugins/maven/lib" recursive="false" />
</library>
</component>

View File

@@ -1,9 +0,0 @@
<component name="libraryTable">
<library name="native-platform-uberjar">
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/native-platform-uberjar.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@@ -1,15 +0,0 @@
<component name="libraryTable">
<library name="properties">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/properties/lib/properties.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/properties/lib/resources_en.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,14 +0,0 @@
<component name="libraryTable">
<library name="protobuf-java">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/protobuf-2.6.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/protobuf-2.6.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,17 +0,0 @@
<component name="libraryTable">
<library name="testng-plugin">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/testng/lib/testng-plugin.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/testng/lib/testng.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/testng/lib/jcommander.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/testng/lib/resources_en.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,12 +0,0 @@
<component name="libraryTable">
<library name="trove4j">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/trove4j.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@@ -1,15 +0,0 @@
<component name="libraryTable">
<library name="uast-java">
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/uast-common.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/uast-java.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/uast-tests.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/uast-common-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/uast-java-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/uast-tests-sources.jar!/" />
</SOURCES>
</library>
</component>

44
.idea/misc.xml generated
View File

@@ -40,11 +40,42 @@
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/confluence-highlighting/pom.xml" />
<option value="$PROJECT_DIR$/confluence/pom.xml" />
<option value="$PROJECT_DIR$/libraries/pom.xml" />
</list>
</option>
</component>
<component name="NullableNotNullManager">
<option name="myNullables">
<value>
<list size="9">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
<item index="6" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="9">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="javax.validation.constraints.NotNull" />
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
<item index="6" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
</list>
</value>
</option>
</component>
<component name="ProjectResources">
<default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
</component>
@@ -52,7 +83,14 @@
<output url="file://$PROJECT_DIR$/out" />
</component>
<component name="SuppressABINotification">
<option name="isSuppressed" value="true" />
<option name="modulesWithSuppressedNotConfigured">
<set>
<option value="backend.src" />
<option value="kotlin-stdlib-common" />
<option value="kotlin-stdlib-js" />
<option value="kotlin-test-common" />
</set>
</option>
</component>
<component name="WebServicesPlugin" addRequiredLibraries="true" />
<component name="com.sixrr.metrics.MetricsReloaded">

106
.idea/modules.xml generated
View File

@@ -1,106 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Kotlin.iml" filepath="$PROJECT_DIR$/Kotlin.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/allopen/allopen-cli/allopen-cli.iml" filepath="$PROJECT_DIR$/plugins/allopen/allopen-cli/allopen-cli.iml" group="plugins/allopen" />
<module fileurl="file://$PROJECT_DIR$/plugins/allopen/allopen-ide/allopen-ide.iml" filepath="$PROJECT_DIR$/plugins/allopen/allopen-ide/allopen-ide.iml" group="plugins/allopen" />
<module fileurl="file://$PROJECT_DIR$/plugins/lint/android-annotations/android-annotations.iml" filepath="$PROJECT_DIR$/plugins/lint/android-annotations/android-annotations.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-extensions/android-extensions-compiler/android-extensions-compiler.iml" filepath="$PROJECT_DIR$/plugins/android-extensions/android-extensions-compiler/android-extensions-compiler.iml" group="plugins/android-extensions" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-extensions/android-extensions-idea/android-extensions-idea.iml" filepath="$PROJECT_DIR$/plugins/android-extensions/android-extensions-idea/android-extensions-idea.iml" group="plugins/android-extensions" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-extensions/android-extensions-jps/android-extensions-jps.iml" filepath="$PROJECT_DIR$/plugins/android-extensions/android-extensions-jps/android-extensions-jps.iml" group="plugins/android-extensions" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-extensions/android-extensions-runtime/android-extensions-runtime.iml" filepath="$PROJECT_DIR$/plugins/android-extensions/android-extensions-runtime/android-extensions-runtime.iml" group="plugins/android-extensions" />
<module fileurl="file://$PROJECT_DIR$/android-studio/android-studio.iml" filepath="$PROJECT_DIR$/android-studio/android-studio.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/compiler/android-tests/android-tests.iml" filepath="$PROJECT_DIR$/compiler/android-tests/android-tests.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/plugins/annotation-based-compiler-plugins-ide-support/annotation-based-compiler-plugins-ide-support.iml" filepath="$PROJECT_DIR$/plugins/annotation-based-compiler-plugins-ide-support/annotation-based-compiler-plugins-ide-support.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/annotation-collector/annotation-collector.iml" filepath="$PROJECT_DIR$/plugins/annotation-collector/annotation-collector.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/ant/ant.iml" filepath="$PROJECT_DIR$/ant/ant.iml" />
<module fileurl="file://$PROJECT_DIR$/compiler/backend/backend.iml" filepath="$PROJECT_DIR$/compiler/backend/backend.iml" group="compiler/java" />
<module fileurl="file://$PROJECT_DIR$/compiler/backend-common/backend-common.iml" filepath="$PROJECT_DIR$/compiler/backend-common/backend-common.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/ir/backend.common/backend.common.iml" filepath="$PROJECT_DIR$/compiler/ir/backend.common/backend.common.iml" group="compiler/ir" />
<module fileurl="file://$PROJECT_DIR$/compiler/ir/backend.jvm/backend.jvm.iml" filepath="$PROJECT_DIR$/compiler/ir/backend.jvm/backend.jvm.iml" group="compiler/ir" />
<module fileurl="file://$PROJECT_DIR$/build-common/build-common.iml" filepath="$PROJECT_DIR$/build-common/build-common.iml" />
<module fileurl="file://$PROJECT_DIR$/core/builtins/builtins.iml" filepath="$PROJECT_DIR$/core/builtins/builtins.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/compiler/builtins-serializer/builtins-serializer.iml" filepath="$PROJECT_DIR$/compiler/builtins-serializer/builtins-serializer.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/cli/cli.iml" filepath="$PROJECT_DIR$/compiler/cli/cli.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/cli/cli-common/cli-common.iml" filepath="$PROJECT_DIR$/compiler/cli/cli-common/cli-common.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/cli/cli-runner/cli-runner.iml" filepath="$PROJECT_DIR$/compiler/cli/cli-runner/cli-runner.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/compiler-runner/compiler-runner.iml" filepath="$PROJECT_DIR$/compiler/compiler-runner/compiler-runner.iml" />
<module fileurl="file://$PROJECT_DIR$/compiler/tests/compiler-tests.iml" filepath="$PROJECT_DIR$/compiler/tests/compiler-tests.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/tests-java8/compiler-tests-java8.iml" filepath="$PROJECT_DIR$/compiler/tests-java8/compiler-tests-java8.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/conditional-preprocessor/conditional-preprocessor.iml" filepath="$PROJECT_DIR$/compiler/conditional-preprocessor/conditional-preprocessor.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/container/container.iml" filepath="$PROJECT_DIR$/compiler/container/container.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/daemon/daemon.iml" filepath="$PROJECT_DIR$/compiler/daemon/daemon.iml" group="compiler/daemon" />
<module fileurl="file://$PROJECT_DIR$/compiler/daemon/daemon-client/daemon-client.iml" filepath="$PROJECT_DIR$/compiler/daemon/daemon-client/daemon-client.iml" group="compiler/daemon" />
<module fileurl="file://$PROJECT_DIR$/compiler/daemon/daemon-common/daemon-common.iml" filepath="$PROJECT_DIR$/compiler/daemon/daemon-common/daemon-common.iml" group="compiler/daemon" />
<module fileurl="file://$PROJECT_DIR$/core/descriptor.loader.java/descriptor.loader.java.iml" filepath="$PROJECT_DIR$/core/descriptor.loader.java/descriptor.loader.java.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/core/descriptors/descriptors.iml" filepath="$PROJECT_DIR$/core/descriptors/descriptors.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/core/descriptors.runtime/descriptors.runtime.iml" filepath="$PROJECT_DIR$/core/descriptors.runtime/descriptors.runtime.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/core/deserialization/deserialization.iml" filepath="$PROJECT_DIR$/core/deserialization/deserialization.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/eval4j/eval4j.iml" filepath="$PROJECT_DIR$/eval4j/eval4j.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/formatter/formatter.iml" filepath="$PROJECT_DIR$/idea/formatter/formatter.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/compiler/frontend/frontend.iml" filepath="$PROJECT_DIR$/compiler/frontend/frontend.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/frontend.java/frontend.java.iml" filepath="$PROJECT_DIR$/compiler/frontend.java/frontend.java.iml" group="compiler/java" />
<module fileurl="file://$PROJECT_DIR$/compiler/frontend.script/frontend.script.iml" filepath="$PROJECT_DIR$/compiler/frontend.script/frontend.script.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/generators/generators.iml" filepath="$PROJECT_DIR$/generators/generators.iml" group="infrastructure" />
<module fileurl="file://$PROJECT_DIR$/grammar/grammar.iml" filepath="$PROJECT_DIR$/grammar/grammar.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/idea/ide-common/ide-common.iml" filepath="$PROJECT_DIR$/idea/ide-common/ide-common.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea.iml" filepath="$PROJECT_DIR$/idea/idea.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-analysis/idea-analysis.iml" filepath="$PROJECT_DIR$/idea/idea-analysis/idea-analysis.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-android/idea-android.iml" filepath="$PROJECT_DIR$/idea/idea-android/idea-android.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-android/idea-android-output-parser/idea-android-output-parser.iml" filepath="$PROJECT_DIR$/idea/idea-android/idea-android-output-parser/idea-android-output-parser.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-completion/idea-completion.iml" filepath="$PROJECT_DIR$/idea/idea-completion/idea-completion.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-core/idea-core.iml" filepath="$PROJECT_DIR$/idea/idea-core/idea-core.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-jps-common/idea-jps-common.iml" filepath="$PROJECT_DIR$/idea/idea-jps-common/idea-jps-common.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-live-templates/idea-live-templates.iml" filepath="$PROJECT_DIR$/idea/idea-live-templates/idea-live-templates.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-maven/idea-maven.iml" filepath="$PROJECT_DIR$/idea/idea-maven/idea-maven.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-repl/idea-repl.iml" filepath="$PROJECT_DIR$/idea/idea-repl/idea-repl.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea-runner/idea-runner.iml" filepath="$PROJECT_DIR$/idea-runner/idea-runner.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-test-framework/idea-test-framework.iml" filepath="$PROJECT_DIR$/idea/idea-test-framework/idea-test-framework.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/compiler/incremental-compilation-impl/incremental-compilation-impl.iml" filepath="$PROJECT_DIR$/compiler/incremental-compilation-impl/incremental-compilation-impl.iml" />
<module fileurl="file://$PROJECT_DIR$/compiler/preloader/instrumentation/instrumentation.iml" filepath="$PROJECT_DIR$/compiler/preloader/instrumentation/instrumentation.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/ir/ir.ir2cfg/ir.ir2cfg.iml" filepath="$PROJECT_DIR$/compiler/ir/ir.ir2cfg/ir.ir2cfg.iml" group="compiler/ir" />
<module fileurl="file://$PROJECT_DIR$/compiler/ir/ir.psi2ir/ir.psi2ir.iml" filepath="$PROJECT_DIR$/compiler/ir/ir.psi2ir/ir.psi2ir.iml" group="compiler/ir" />
<module fileurl="file://$PROJECT_DIR$/compiler/ir/ir.tree/ir.tree.iml" filepath="$PROJECT_DIR$/compiler/ir/ir.tree/ir.tree.iml" group="compiler/ir" />
<module fileurl="file://$PROJECT_DIR$/j2k/j2k.iml" filepath="$PROJECT_DIR$/j2k/j2k.iml" group="j2k" />
<module fileurl="file://$PROJECT_DIR$/compiler/javac-wrapper/javac-wrapper.iml" filepath="$PROJECT_DIR$/compiler/javac-wrapper/javac-wrapper.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/jps-plugin/jps-plugin.iml" filepath="$PROJECT_DIR$/jps-plugin/jps-plugin.iml" group="ide/jps" />
<module fileurl="file://$PROJECT_DIR$/jps-plugin/jps-tests/jps-tests.iml" filepath="$PROJECT_DIR$/jps-plugin/jps-tests/jps-tests.iml" group="ide/jps" />
<module fileurl="file://$PROJECT_DIR$/js/js.ast/js.ast.iml" filepath="$PROJECT_DIR$/js/js.ast/js.ast.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.dce/js.dce.iml" filepath="$PROJECT_DIR$/js/js.dce/js.dce.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.frontend/js.frontend.iml" filepath="$PROJECT_DIR$/js/js.frontend/js.frontend.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.inliner/js.inliner.iml" filepath="$PROJECT_DIR$/js/js.inliner/js.inliner.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.parser/js.parser.iml" filepath="$PROJECT_DIR$/js/js.parser/js.parser.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.serializer/js.serializer.iml" filepath="$PROJECT_DIR$/js/js.serializer/js.serializer.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.tests/js.tests.iml" filepath="$PROJECT_DIR$/js/js.tests/js.tests.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.translator/js.translator.iml" filepath="$PROJECT_DIR$/js/js.translator/js.translator.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/jps-plugin/kannotator-jps-plugin-test/kannotator-jps-plugin-test.iml" filepath="$PROJECT_DIR$/jps-plugin/kannotator-jps-plugin-test/kannotator-jps-plugin-test.iml" group="ide/jps" />
<module fileurl="file://$PROJECT_DIR$/plugins/kapt3/kapt3.iml" filepath="$PROJECT_DIR$/plugins/kapt3/kapt3.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/idea/kotlin-gradle-tooling/kotlin-gradle-tooling.iml" filepath="$PROJECT_DIR$/idea/kotlin-gradle-tooling/kotlin-gradle-tooling.iml" />
<module fileurl="file://$PROJECT_DIR$/compiler/light-classes/light-classes.iml" filepath="$PROJECT_DIR$/compiler/light-classes/light-classes.iml" group="compiler/java" />
<module fileurl="file://$PROJECT_DIR$/plugins/lint/lint-api/lint-api.iml" filepath="$PROJECT_DIR$/plugins/lint/lint-api/lint-api.iml" group="plugins/lint" />
<module fileurl="file://$PROJECT_DIR$/plugins/lint/lint-checks/lint-checks.iml" filepath="$PROJECT_DIR$/plugins/lint/lint-checks/lint-checks.iml" group="plugins/lint" />
<module fileurl="file://$PROJECT_DIR$/plugins/lint/lint-idea/lint-idea.iml" filepath="$PROJECT_DIR$/plugins/lint/lint-idea/lint-idea.iml" group="plugins/lint" />
<module fileurl="file://$PROJECT_DIR$/plugins/noarg/noarg-cli/noarg-cli.iml" filepath="$PROJECT_DIR$/plugins/noarg/noarg-cli/noarg-cli.iml" group="plugins/noarg" />
<module fileurl="file://$PROJECT_DIR$/plugins/noarg/noarg-ide/noarg-ide.iml" filepath="$PROJECT_DIR$/plugins/noarg/noarg-ide/noarg-ide.iml" group="plugins/noarg" />
<module fileurl="file://$PROJECT_DIR$/non-compiler-tests/non-compiler-tests.iml" filepath="$PROJECT_DIR$/non-compiler-tests/non-compiler-tests.iml" />
<module fileurl="file://$PROJECT_DIR$/compiler/plugin-api/plugin-api.iml" filepath="$PROJECT_DIR$/compiler/plugin-api/plugin-api.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/plugins/plugins-tests/plugins-tests.iml" filepath="$PROJECT_DIR$/plugins/plugins-tests/plugins-tests.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/compiler/preloader/preloader.iml" filepath="$PROJECT_DIR$/compiler/preloader/preloader.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/core/reflection.jvm/reflection.jvm.iml" filepath="$PROJECT_DIR$/core/reflection.jvm/reflection.jvm.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/compiler/resolution/resolution.iml" filepath="$PROJECT_DIR$/compiler/resolution/resolution.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/core/runtime.jvm/runtime.jvm.iml" filepath="$PROJECT_DIR$/core/runtime.jvm/runtime.jvm.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/plugins/sam-with-receiver/sam-with-receiver-cli/sam-with-receiver-cli.iml" filepath="$PROJECT_DIR$/plugins/sam-with-receiver/sam-with-receiver-cli/sam-with-receiver-cli.iml" group="plugins/sam-with-receiver" />
<module fileurl="file://$PROJECT_DIR$/plugins/sam-with-receiver/sam-with-receiver-ide/sam-with-receiver-ide.iml" filepath="$PROJECT_DIR$/plugins/sam-with-receiver/sam-with-receiver-ide/sam-with-receiver-ide.iml" group="plugins/sam-with-receiver" />
<module fileurl="file://$PROJECT_DIR$/core/script.runtime/script.runtime.iml" filepath="$PROJECT_DIR$/core/script.runtime/script.runtime.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/compiler/serialization/serialization.iml" filepath="$PROJECT_DIR$/compiler/serialization/serialization.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/plugins/source-sections/source-sections-compiler/source-sections-compiler.iml" filepath="$PROJECT_DIR$/plugins/source-sections/source-sections-compiler/source-sections-compiler.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/compiler/tests-common/tests-common.iml" filepath="$PROJECT_DIR$/compiler/tests-common/tests-common.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/tests-ir-jvm/tests-ir-jvm.iml" filepath="$PROJECT_DIR$/compiler/tests-ir-jvm/tests-ir-jvm.iml" group="compiler/ir" />
<module fileurl="file://$PROJECT_DIR$/plugins/uast-kotlin/uast-kotlin.iml" filepath="$PROJECT_DIR$/plugins/uast-kotlin/uast-kotlin.iml" group="plugins/lint" />
<module fileurl="file://$PROJECT_DIR$/plugins/uast-kotlin-idea/uast-kotlin-idea.iml" filepath="$PROJECT_DIR$/plugins/uast-kotlin-idea/uast-kotlin-idea.iml" />
<module fileurl="file://$PROJECT_DIR$/compiler/util/util.iml" filepath="$PROJECT_DIR$/compiler/util/util.iml" />
<module fileurl="file://$PROJECT_DIR$/core/util.runtime/util.runtime.iml" filepath="$PROJECT_DIR$/core/util.runtime/util.runtime.iml" group="core" />
</modules>
</component>
</project>

View File

@@ -1,171 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<option name="LINE_SEPARATOR" value="&#10;" />
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
<option name="TERNARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="IF_BRACE_FORCE" value="1" />
<ADDITIONAL_INDENT_OPTIONS fileType="css">
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="groovy">
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="gsp">
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="haml">
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="js">
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="jsp">
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="php">
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="py">
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="sass">
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="scala">
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="sql">
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="xml">
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="yml">
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<codeStyleSettings language="JAVA">
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
<option name="TERNARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="IF_BRACE_FORCE" value="1" />
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
<indentOptions />
</codeStyleSettings>
<codeStyleSettings language="JavaScript">
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
<option name="IF_BRACE_FORCE" value="1" />
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
</codeStyleSettings>
<codeStyleSettings language="PHP">
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="IF_BRACE_FORCE" value="1" />
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
</codeStyleSettings>
</value>
</option>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</component>
</project>

View File

@@ -1,8 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="All Compiler Tests" type="CompoundRunConfigurationType" factoryName="Compound Run Configuration">
<toRun type="JUnit" name="Compiler Tests" />
<toRun type="JUnit" name="Java 8 Tests" />
<toRun type="JUnit" name="Js-backend tests" />
<method />
</configuration>
</component>

View File

@@ -1,37 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="All IDEA Plugin Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="idea" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx1250m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=128m -Djna.nosys=true" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Profile " />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
</component>

View File

@@ -1,37 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="All Jvm Backend Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="compiler-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.codegen" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=128m -Djna.nosys=true" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs />
<patterns />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Profile " />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
</component>

View File

@@ -1,39 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="All Non Compiler Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="non-compiler-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx900m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=128m -Djna.nosys=true -Dkotlin.colors.enabled=false" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs>
<env name="NO_FS_ROOTS_ACCESS_CHECK" value="true" />
</envs>
<patterns />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="53032" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Profile " />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
</component>

View File

@@ -1,7 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="All Tests" type="CompoundRunConfigurationType" factoryName="Compound Run Configuration">
<toRun type="CompoundRunConfigurationType" name="All Compiler Tests" />
<toRun type="JUnit" name="All Non Compiler Tests" />
<method />
</configuration>
</component>

View File

@@ -1,26 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="All in jps-tests" type="JUnit" factoryName="JUnit" nameIsGenerated="true">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="jps-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-Xmx1250m -XX:ReservedCodeCacheSize=128m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Djna.nosys=true" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
<RunnerSettings RunnerId="Profile ">
<option name="myExternalizedOptions" />
</RunnerSettings>
<method />
</configuration>
</component>

View File

@@ -1,30 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Android Studio" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
<option name="VM_PARAMETERS" value="-Didea.paths.selector=AndroidStudioPreview -Didea.platform.prefix=AndroidStudio -Xmx1250m -XX:ReservedCodeCacheSize=64m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin,$PROJECT_DIR$/out/artifacts/KotlinAndroidExtensions" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/android-studio/sdk/bin" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="android-studio" />
<envs />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method>
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinPlugin" />
</option>
<option name="BuildArtifacts" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -1,31 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Codegen Tests on Android" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="android-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="1.8" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.android.tests" />
<option name="MAIN_CLASS_NAME" value="org.jetbrains.kotlin.android.tests.AndroidRunner" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx850m -XX:+UseCodeCacheFlushing -Djna.nosys=true" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs />
<patterns />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
</component>

View File

@@ -1,28 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Codegen Tests with JVM target 1.6 on JDK 1.6" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.codegen.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="compiler-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="1.8" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.codegen" />
<option name="MAIN_CLASS_NAME" value="org.jetbrains.kotlin.codegen.CodegenJdkCommonTestSuite" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-Dkotlin.test.default.jvm.target=1.6 -Dkotlin.test.box.in.separate.process.port=5100 -Dkotlin.test.java.compilation.target=1.6 -ea -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=128m -Djna.nosys=true" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
<method />
</configuration>
</component>

View File

@@ -1,28 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Codegen Tests with JVM target 1.6 on JDK 9" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.codegen.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="compiler-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="9-ea" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.codegen" />
<option name="MAIN_CLASS_NAME" value="org.jetbrains.kotlin.codegen.CodegenJdkCommonTestSuite" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-Dkotlin.test.default.jvm.target=1.6 -ea -XX:+HeapDumpOnOutOfMemoryError -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=128m -Djna.nosys=true --add-opens java.desktop/javax.swing=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
<method />
</configuration>
</component>

View File

@@ -1,28 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Codegen Tests with JVM target 1.8 on JDK 1.8" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.codegen.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="compiler-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="1.8" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.codegen" />
<option name="MAIN_CLASS_NAME" value="org.jetbrains.kotlin.codegen.CodegenJdkCommonTestSuite" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-Dkotlin.test.default.jvm.target=1.8 -ea -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=128m -Djna.nosys=true" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
<method />
</configuration>
</component>

View File

@@ -1,28 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Codegen Tests with JVM target 1.8 on JDK 9" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.codegen.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="compiler-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="9-ea" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.codegen" />
<option name="MAIN_CLASS_NAME" value="org.jetbrains.kotlin.codegen.CodegenJdkCommonTestSuite" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-Dkotlin.test.default.jvm.target=1.8 -ea -XX:+HeapDumpOnOutOfMemoryError -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=128m -Djna.nosys=true --add-opens java.desktop/javax.swing=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
<method />
</configuration>
</component>

View File

@@ -1,28 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Codegen Tests with JVM target 9 on JDK 9 " type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.codegen.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="compiler-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="9-ea" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.codegen" />
<option name="MAIN_CLASS_NAME" value="org.jetbrains.kotlin.codegen.CodegenJdkCommonTestSuite" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-Dkotlin.test.default.jvm.target=1.8 -Dkotlin.test.substitute.bytecode.1.8.to.1.9=true -ea -XX:+HeapDumpOnOutOfMemoryError -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=128m -Djna.nosys=true --add-opens java.desktop/javax.swing=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
<method />
</configuration>
</component>

View File

@@ -1,37 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Compiler Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="compiler-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=128m -Djna.nosys=true -Dkotlin.colors.enabled=false" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs />
<patterns />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Profile " />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
</component>

View File

@@ -1,31 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Eval4j Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="eval4j" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="org.jetbrains.eval4j.test" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -Djna.nosys=true" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
</component>

View File

@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Generate All Tests" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="generateTests" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<method />
</configuration>
</component>

View File

@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Generate Compiler Tests" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$/compiler" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value=":compiler:generateTests" />
<option value=":compiler:tests-java8:generateTests" />
<option value=":js:js.tests:generateTests" />
<option value=":core:descriptors.runtime:generateTests" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<method />
</configuration>
</component>

View File

@@ -1,34 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Generate Tests" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.generators.tests.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="MAIN_CLASS_NAME" value="org.jetbrains.kotlin.generators.tests.GenerateTestsKt" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="generators" />
<envs />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Profile " />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method>
<option name="Make" enabled="false" />
<option name="MakeNoErrorCheck" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Generate standard library sources" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$/libraries/tools/kotlin-stdlib-gen" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="--configure-on-demand" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="run" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<method />
</configuration>
</component>

View File

@@ -1,50 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="IDEA" type="Application" factoryName="Application" singleton="true">
<log_file path="$PROJECT_DIR$/ideaSDK/system-idea/log/idea.log" checked="true" skipped="true" show_all="false" alias="idea.log" />
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
<option name="VM_PARAMETERS" value="-Xmx1250m -XX:ReservedCodeCacheSize=128m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Dkotlin.internal.mode.enabled=true -Didea.additional.classpath=../idea-kotlin-runtime/kotlin-runtime.jar,../idea-kotlin-runtime/kotlin-reflect.jar" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/ideaSDK/bin" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="idea-runner" />
<envs />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="JavaRebel">
<option name="bootstrapPath" />
<option name="jrebelArgs" value="" />
<option name="loggingEnabled" value="false" />
<option name="useBootstrapDefaults" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="JavaRebel Debug">
<option name="bootstrapPath" />
<option name="debugPort" value="" />
<option name="jrebelArgs" value="" />
<option name="loggingEnabled" value="false" />
<option name="transport" value="0" />
<option name="useBootstrapDefaults" value="true" />
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Profile " />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Profile " />
<ConfigurationWrapper RunnerId="Run" />
<method>
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinPlugin" />
<configuration default="false" name="IDEA" type="GradleRunConfiguration" factoryName="Gradle" singleton="true">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/idea-runner/runner.xml" target="force-enable-kotlin-plugin" />
</method>
<option name="taskNames">
<list>
<option value="runIde" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="IDEA Ultimate" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="-P intellijUltimateEnabled" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="runUltimate" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<method />
</configuration>
</component>

View File

@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="IDEA Ultimate (No ProcessCanceledException) " type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="-PnoPCE" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="runUltimate" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<method />
</configuration>
</component>

View File

@@ -1,32 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="IDEA (No ProcessCanceledException)" type="Application" factoryName="Application" singleton="true">
<log_file path="$PROJECT_DIR$/ideaSDK/system-idea/log/idea.log" checked="true" skipped="true" show_all="false" alias="idea.log" />
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
<option name="VM_PARAMETERS" value="-Xmx1250m -XX:ReservedCodeCacheSize=128m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Didea.ProcessCanceledException=disabled -Dkotlin.internal.mode.enabled=true -Didea.additional.classpath=../idea-kotlin-runtime/kotlin-runtime.jar,../idea-kotlin-runtime/kotlin-reflect.jar" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/ideaSDK/bin" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="idea-runner" />
<envs />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method>
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinPlugin" />
<configuration default="false" name="IDEA (No ProcessCanceledException)" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="-PnoPCE" />
<option name="taskDescriptions">
<list />
</option>
<option name="BuildArtifacts" enabled="true" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/idea-runner/runner.xml" target="force-enable-kotlin-plugin" />
</method>
<option name="taskNames">
<list>
<option value="runIde" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<method />
</configuration>
</component>

View File

@@ -1,40 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="J2K Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="j2k" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="pattern" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx700m -Djna.nosys=true" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs />
<patterns>
<pattern testClass="org.jetbrains.kotlin.idea.conversion.copy.*" />
<pattern testClass="org.jetbrains.kotlin.j2k.*" />
</patterns>
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Profile " />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
</component>

View File

@@ -1,28 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Java 8 Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="compiler-tests-java8" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="1.8" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=128m -Djna.nosys=true -Dkotlin.colors.enabled=false" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
<method />
</configuration>
</component>

View File

@@ -1,28 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Java 8 Tests on JDK 9" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="compiler-tests-java8" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="9-ea" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=128m -Djna.nosys=true --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.desktop/javax.swing=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
<method />
</configuration>
</component>

View File

@@ -1,31 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Js-backend tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="js.tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.js.test" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx1250m -XX:+UseCodeCacheFlushing -Djna.nosys=true -Dkotlin.js.skipMinificationTest=false" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs />
<patterns />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
</component>

View File

@@ -1,31 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="KAnnotator Jps Plugin Test" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="kannotator-jps-plugin-test" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.jps.build.kannotator" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -Djna.nosys=true" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs />
<patterns />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
</component>

View File

@@ -1,42 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Smart Completion Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.completion.handlers.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="idea" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.completion.handlers" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="pattern" />
<option name="VM_PARAMETERS" value="-ea -Xmx850m -Djna.nosys=true" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns>
<pattern testClass="org.jetbrains.kotlin.idea.completion.test.JvmSmartCompletionTestGenerated" />
<pattern testClass="org.jetbrains.kotlin.idea.completion.test.handlers.SmartCompletionHandlerTestGenerated" />
<pattern testClass="org.jetbrains.kotlin.idea.completion.test.handlers.SmartCompletionMultifileHandlerTest" />
<pattern testClass="org.jetbrains.kotlin.idea.completion.test.weighers.SmartCompletionWeigherTestGenerated" />
<pattern testClass="org.jetbrains.kotlin.idea.completion.test.MultiFileSmartCompletionTestGenerated" />
</patterns>
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
</component>

View File

@@ -0,0 +1,21 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Test: public API binary compatibility validator, overwrite results" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$/libraries/tools/binary-compatibility-validator" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value=" --tests * " />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value=":tools:binary-compatibility-validator:cleanTest" />
<option value=":tools:binary-compatibility-validator:test" />
</list>
</option>
<option name="vmOptions" value="-Doverwrite.output=true" />
</ExternalSystemSettings>
<method />
</configuration>
</component>

View File

@@ -1,29 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Update-Dist-Run" type="Application" factoryName="Application" singleton="true">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
<option name="VM_PARAMETERS" value="-Xmx1250m -XX:ReservedCodeCacheSize=64m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Dkotlin.internal.mode.enabled=true -Didea.additional.classpath=../idea-kotlin-runtime/kotlin-runtime.jar,../idea-kotlin-runtime/kotlin-reflect.jar" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/ideaSDK/bin" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="idea-runner" />
<envs />
<method>
<option name="Make" enabled="false" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/build.xml" target="clean_idea_output" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/update_dependencies.xml" target="update" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/build.xml" target="dist" />
<option name="MakeProject" enabled="true" />
<option name="RunConfigurationTask" enabled="true" run_configuration_name="Generate Tests" run_configuration_type="Application" />
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinPlugin" />
</option>
<option name="BuildArtifacts" enabled="true" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/idea_runner/runner.xml" target="force_enable_kotlin_plugin" />
</method>
</configuration>
</component>

Some files were not shown because too many files have changed in this diff Show More