Commit Graph

50313 Commits

Author SHA1 Message Date
Ilya Gorbunov 7d3de70754 Correct replacement for js Math.log
The correspondent kotlin.math function is ln(x)

#KT-28251 Fixed
2018-11-17 00:20:54 +03:00
Ilya Gorbunov e81859b50d Document exceptions that can be thrown from MatchGroupCollection.get(name) 2018-11-16 20:29:38 +03:00
Ilya Gorbunov 8d0d6d1bf3 Do not mutate Matcher in MatchResult.next()
Instead of mutating the matcher create a new one when `next()` is called.
This allows getting named groups from that matcher later.

Add lookbehind in matchSequence test to ensure this change doesn't alter
the existing behavior.

Also fixes #KT-20865
2018-11-16 20:29:38 +03:00
Ilya Gorbunov f76c0568ea Additionally run kotlin-stdlib-jdk8 tests on jdk9 and jdk10/11 if available 2018-11-16 19:46:38 +03:00
Ilya Gorbunov c0a7c5cff4 Refactor: use ArrayDeque instead of Stack in FileTreeWalkIterator
Cleanup modifiers, replace if with when.

#KT-27251 Fixed
2018-11-16 19:40:40 +03:00
Toshiaki Kameyama 52ca1803d3 Call chain into sequence: use registerProblemWithoutOfflineInformation() #KT-28231 Fixed 2018-11-16 18:20:40 +03:00
Nikolay Krasko 6c3f01ce2c Refactoring: move channels titles and urls to single place 2018-11-16 17:45:04 +03:00
Nikolay Krasko bc85b531ee Include jre -> jdk library replacement to cleanup 2018-11-16 17:45:02 +03:00
Nikolay Krasko c568ea043f Reformat parameterInfo 2018-11-16 17:45:01 +03:00
Nikolay Krasko b1cf98d82a Reformat completion.handlers 2018-11-16 17:45:00 +03:00
Toshiaki Kameyama 8b2fef3812 Remove explicit type specification: don't propose for ext function type
#KT-8875 Fixed
2018-11-16 16:35:04 +03:00
Dmitry Savvinov c8cbe05722 [Minor] Add even more logging for EA-119635 2018-11-16 14:46:46 +03:00
Toshiaki Kameyama 8089d2e9e3 Replace deprecated symbol usage in whole project: enable on annotation declared without parentheses #KT-12479 Fixed 2018-11-16 13:07:36 +03:00
Toshiaki Kameyama fa51354ef9 Reformat: DeprecatedSymbolUsageInWholeProjectFix 2018-11-16 13:07:36 +03:00
Toshiaki Kameyama 75755afc00 Remove redundant spread operator: don't remove inner argument spread operator #KT-27699 Fixed 2018-11-16 13:06:25 +03:00
Toshiaki Kameyama 52c499166e Reformat: RemoveRedundantSpreadOperatorInspection 2018-11-16 13:06:25 +03:00
Denis Zharkov aa63ad4a45 Report a warning when comparing incompatible enums
I've put `isIncompatibleEnums` to TypeIntersector because I placed
all of its usages after all of the TypeIntersector::isIntersectionEmpty ones

^KT-28225 Fixed
2018-11-16 10:36:09 +03:00
Dmitry Petrov a0d74be7cf KT-28235: Make sure array access produces unique elements
This requires generating calls on-demand in
LValueWithGetterAndSetterCalls.
2018-11-16 10:33:30 +03:00
Dmitry Petrov 080c177ed2 Minor: formatting 2018-11-16 10:33:30 +03:00
Mikhail Zarechenskiy 090d3327c0 Use wrapper class of an inline one as a result for javaClass
#KT-28185 Fixed
 #KT-28246 Open
2018-11-16 00:55:01 +03:00
Alexander Udalov 1a2579d8e8 Minor, add test for obsolete issue
#KT-21692 Obsolete
2018-11-15 20:29:34 +01:00
Igor Chevdar 2ff87ab1ce Fixed tests on IR copier 2018-11-15 19:13:06 +03:00
Igor Chevdar 728b7b130b Removed descriptors usage from IR copier 2018-11-15 19:13:06 +03:00
Nikolay Krasko 2d1c76344c Store presence of spread operator for value argument in stubs 2018-11-15 18:55:56 +03:00
Alexander Udalov 4c64db66dc Use File.toPath instead of Paths.get+File.toURI in moduleVisibilityUtils
#KT-27930 Fixed
2018-11-15 16:51:37 +01:00
Roman Artemev d5acc8ff5b [JS BE] Set enclosing exception state in finally block
[Fix KT-28207]
2018-11-15 18:44:22 +03:00
Denis Zharkov 353b469f4a Update bootstrap to 1.3.20-dev-1708 2018-11-15 17:17:41 +03:00
Simon Ogorodnik ad6ae3ba48 Fix failing test for AS33 2018-11-15 16:27:57 +03:00
Simon Ogorodnik 2d514d410f Update testData due to platform changes 2018-11-15 16:27:56 +03:00
Simon Ogorodnik 6b07cd1950 Update testData due to changes in stdlib
New function equals, and kotlin.js.JsName in common
2018-11-15 16:27:20 +03:00
Toshiaki Kameyama 2a03e1b3da Leaking this: fix for 'this' in enum class #KT-15835 Fixed 2018-11-15 15:16:48 +03:00
Xavi Arias Seguí 14311e77c2 Fix typo in Kotlin doc for contract method
Fix the typo in "Specifies the contact of a function."
2018-11-15 03:58:41 +03:00
Alexander Udalov 9b07bbdf56 Do not use backslash for escaping outside of string literals in argfiles
This fixes CLI tests testArgfileWithEscaping and
testApiVersionLessThanLanguageUsingArgfile on Windows

 #KT-28180 Fixed
2018-11-14 12:53:24 +01:00
Ilya Gorbunov 607b11e6b9 Replace kotlin-stdlib-jre8 dependency with -jdk8 in 'idea' module
No API is used from -jre8 artifact and -jdk8 is required in runtime for tests
2018-11-14 14:28:34 +03:00
Ilya Gorbunov 3e72c0bece Add stdlib-jdk7/8 to Kotlin IDEA plugin classpath
Motivation: standard library dynamically loads its JDK7/8 extensions by class name.
When these extensions are missing from the plugin classloader, they are loaded by
the parent classloader thus becoming assignment incompatible with the base class.

Fixes EA-120914
2018-11-14 14:28:33 +03:00
Mikhail Glukhikh ad4ebcd953 Do not run MPP wizard tests for AS34 (fixes test suite warning) 2018-11-14 13:14:22 +03:00
Dmitry Petrov 08f23d981b Minor: generated tests 2018-11-14 13:01:00 +03:00
Alexey Tsvetkov 5fa627c501 Add flag to enable intra-project parallel tasks
To enable parallel tasks execution within a project,
add 'kotlin.parallel.tasks.in.project=true'
to gradle.properties or local.properties file .

    #KT-28155 fixed
2018-11-14 11:41:43 +03:00
Alexey Tsvetkov 4678a00324 Always clear local state directories for non-incremental build 2018-11-14 11:41:43 +03:00
Alexey Tsvetkov 21289722b7 Move after-compilation cleanup actions to GradleKotlinCompilerWork
Otherwise cleanup actions would run in-parallel or before
compilation when Gradle Workers are used
2018-11-14 11:41:43 +03:00
Alexey Tsvetkov ff81a46233 Pass arguments to GradleKotlinCompilerWork in GradleKotlinCompilerWorkArguments
It's less error prone to add/remove/reorder arguments this way,
because named arguments can be used and the compiler actually
checks that all arguments are passed to GradleKotlinCompilerWorkArguments's
constructor.
2018-11-14 11:41:43 +03:00
Alexey Tsvetkov 349386960e Minor: remove unnecessary return 2018-11-14 11:41:43 +03:00
Alexey Tsvetkov 4fc05f74c3 Wrap null values into serializable optional
Otherwise worker executor fails with NPE
2018-11-14 11:41:43 +03:00
Alexey Tsvetkov a41c2d759a Avoid catching exceptions from workers in GradleKotlinCompilerRunner
Exceptions were catched in `KotlinCompilerRunner.runCompiler`.
When the method from superclass is not used in
`GradleKotlinCompilerRunner`, the superclass does not make much sense
anymore, so I turned it into util object.
2018-11-14 11:41:43 +03:00
Alexey Tsvetkov 37dfe2b608 Use Workers API for NMPP tasks
This change enables parallel execution of compile tasks in NMPP projects
within a subproject.

    #KT-28155 In Progress
2018-11-14 11:41:43 +03:00
Alexey Tsvetkov ba5795519b Minor: move compile iteration result to daemon common
The class is used on both server and client, but it was defined in
server module.
Gradle plugin worked, because all classes are present in kotlin compiler
embeddable, but the code was red in IDE (which is correct because
Gradle plugin does not depend on daemon server module).
2018-11-14 11:41:43 +03:00
Alexey Tsvetkov 80597b6206 Update dokka to 0.9.17 2018-11-14 11:40:13 +03:00
Mikhail Zarechenskiy 35fb3ba096 Fix CCE when unboxed inline class receiver is passed to inline function
Initial problem is started in `capturedBoundReferenceReceiver` method
 where we assume that bound receiver is captured for usual call.

 Note that if method is inline then we don't pass actual name reference
 receiver, but pass special CAPTURED_RECEIVER_FIELD, which is then
 is used to find special instructions during inline and fold several
 instructions in `foldFieldAccessChainIfNeeded`.

 As a result, we got unboxed reference receiver for inline call, which
 caused CCE and to fix it we should box receiver one more time during
 inline

 #KT-28188 Fixed
2018-11-14 11:21:04 +03:00
Dmitry Petrov 99d8f2eb0c Support 'call' for primary value of an inline class
Getter of a primary value of an inline class belongs to the box class.
Its arguments should not be unboxed when the method is called.
However, its result might require boxing if it's an inline class value.

When we have an internal primary value, there's no getter method.
In fact, we can use box/unbox methods for inline class directly
(don't forget to box the result, it may be an inline class type value).

 #KT-26748
2018-11-14 09:57:51 +03:00
Alexey Tsvetkov 78ee48e1cd Minor: add missing import 2018-11-13 22:11:18 +03:00