Commit Graph

44855 Commits

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