Commit Graph

42283 Commits

Author SHA1 Message Date
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