Commit Graph

45134 Commits

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