Commit Graph

49532 Commits

Author SHA1 Message Date
Ilya Chernikov 7fbfad814e Fix default host configuration property - make it not shared:
Shared instance is incorrect here and causes clashes when many
definitions are loaded in the same process.
Also make the diagnostics in case of clashes more verbose.
2018-10-10 10:53:57 +02:00
John Eismeier ac69fa14d5 Is the Interface with out the f a type? 2018-10-10 09:44:10 +03:00
Ilmir Usmanov 9af7316845 Add call checker to report error more granulary if possible
This, however, works only for calls of 'synchronized' only. Thus, it
does not support inline functions of any kind.
2018-10-09 22:55:51 +03:00
Ilmir Usmanov 281f09f077 Rework check of suspension point inside critical section
There is a trade-off between robustness of check and accuracy of the
diagnostic: the previous version, which works on generation, was too
fragile and lead to false-positives. Now we check on state machine
generation. However, since we do not have PSI for call, we can only
report diagnostic on whole suspend function or suspend lambda.
Additionally, the state machine is generated on crossinline suspend
lambdas regeneration and thus we do not have the PSI for the lambda as
well!

 #KT-27130 Fixed
 #KT-27258 Open
2018-10-09 22:55:48 +03:00
Ilmir Usmanov 1b04945625 Revert: Forbid suspension points in critical sections 2018-10-09 22:55:43 +03:00
Vyacheslav Gerasimov 37a88fda78 Build: Remove shadow jar task from custom-deps/intellij-sdk project 2018-10-09 20:48:27 +03:00
Vyacheslav Gerasimov 78d4abf954 Build: set version for build-scan plugin to 1.15 since 1.16 fails with NPE 2018-10-09 20:27:15 +03:00
Sergey Igushkin 294bd8c7fa Fix resolution of Java Usage artifacts for configurations with no usage
When Gradle resolves a dependency on a publication with no metadata
(or with metadata disabled), it represents it as two variants, one with
Usage `java-api`, the other with `java-runtime`. It turns out that the
`java-api` one does not contain transitive dependencies with Maven scope
`runtime`.

This commit makes the Kotlin Gradle plugin disambiguation rules behave
the same way as those defined in the JavaBasePlugin: when no Usage is
requested, prefer the runtime usages as they are more complete.
2018-10-09 19:17:36 +03:00
Sergey Igushkin 748dc203e5 Fix unresolved library with 'java-api' and 'java-runtime' usages 2018-10-09 19:17:36 +03:00
romanart d77a0f109b Update tests 2018-10-09 15:33:04 +03:00
romanart 5af114da07 Add unit into compilation 2018-10-09 15:33:03 +03:00
romanart 9b40981368 [JS IR BE] Unit Materialization lowering
Fix unit-related things across backend
2018-10-09 15:32:52 +03:00
Toshiaki Kameyama 57ae60e9dc "Add else branch" on when quickfix: don't add braces #KT-5088 Fixed 2018-10-09 12:28:08 +03:00
Toshiaki Kameyama f22133be7e Call chain into sequence refactoring: introduce & use isIterable
Related to KT-26650
2018-10-09 12:22:19 +03:00
Toshiaki Kameyama 416d33fc92 Refactoring: extract KtCallExpression.isCall(FqName) function 2018-10-09 12:22:18 +03:00
Toshiaki Kameyama 9a725b99b2 Call chain into sequence: fix false negative on Iterable
#KT-26650 Fixed
2018-10-09 12:22:17 +03:00
Mikhail Glukhikh 2e5ee242c7 Minor refactoring: implicitVisibility 2018-10-09 11:50:21 +03:00
Toshiaki Kameyama 3be5f2b843 "Redundant visibility": Fix false positive for overridden setter
#KT-26051 Fixed
2018-10-09 11:48:00 +03:00
Toshiaki Kameyama 1c8e75eb34 if then to elvis: propose transformation to 'let' #KT-26653 Fixed 2018-10-09 11:41:06 +03:00
Toshiaki Kameyama 539c55c5b2 Call chain into sequence: fix false negative on implicit receiver
Part of KT-26650
2018-10-09 11:33:55 +03:00
Mikhail Glukhikh 0285cae2fd Minor: introduce 'lazyTerminations' in Call chain --> Sequence
Related to KT-27104
2018-10-09 11:32:25 +03:00
Toshiaki Kameyama 8fc5fefc7f Call chain --> Sequence: don't report if first call is 'groupingBy'
#KT-27104 Fixed
2018-10-09 11:26:50 +03:00
Mikhail Glukhikh b500239bd1 Call chain -> sequence: minor style fix 2018-10-09 11:09:58 +03:00
Toshiaki Kameyama 3c75dd7b5a Fix inspection message 2018-10-09 11:09:43 +03:00
Toshiaki Kameyama 920c200693 Call chain --> Sequence: introduce "call chain length" parameter
#KT-26571 Fixed
2018-10-09 11:09:28 +03:00
Mikhail Glukhikh a43be4cbe8 Fix testNotPossible (no more conversion to secondary constructor) 2018-10-09 11:08:37 +03:00
victor.petukhov c01362a943 Fix path separators for Windows in spec test validator 2018-10-09 10:00:07 +03:00
victor.petukhov 4ee0a666cb Temporary mute test with FrontEndException (KT-26386) 2018-10-09 09:59:56 +03:00
victor.petukhov f61980732b Mute tests with unexpected behaviour 2018-10-09 09:59:46 +03:00
victor.petukhov e90cf4b955 Actualize test with return expression in contract description (implies) 2018-10-09 09:59:35 +03:00
victor.petukhov 4a372458d6 Include part of the spec tests to the compiler dist tests 2018-10-09 09:59:20 +03:00
Ilya Matveev 85ba5f11d6 Add configuration methods for kotlinOptions in K/N tasks
Issue #KT-26758 fixed.
2018-10-08 17:44:32 +03:00
Ilya Matveev ee5bc95da5 Fix up-to-date checks for framework compilation 2018-10-08 17:44:32 +03:00
Ilya Matveev 73138073f1 Take K/N version into account in UP-TO-DATE checks for cinterop tasks 2018-10-08 17:44:32 +03:00
Alex Saveau 524ae9df7d Fix bugs causing early task evaluation (#1812)
* Fix bugs causing early task evaluation

Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>

* Fix merge mistakes

Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>

* Fix another call forcing tasks evaluation  Add a test for lazy tasks
2018-10-08 14:07:22 +03:00
James Wald b7d0d20739 Fix typo in expression precedence table 2018-10-08 14:00:51 +03:00
Nikolay Krasko 1aab3c890c Minor: fix typo 2018-10-08 13:40:29 +03:00
Alexey Belkov f3bb952148 Remove useless code to determine default visibility 2018-10-08 13:40:28 +03:00
Nikolay Krasko daf6036bc0 Update Android Studio 3.3 dependency to 3.3.0.10 2018-10-08 13:40:27 +03:00
Nikolay Krasko 76a3f23df0 Test for stubs of extension/non-extension properties with same name (KT-27274)
An issue was probably fixed in 98232265d7

 #KT-27274 Fixed
2018-10-08 13:40:25 +03:00
Toshiaki Kameyama b0c3461eab Add quickfix for ASSIGN_OPERATOR_AMBIGUITY on mutable collection '+=', '-='
KT-26236 Fixed
2018-10-05 15:58:39 +03:00
Toshiaki Kameyama 725cb88f41 Add quick-fix to "Unlabeled return inside lambda" inspection #KT-27007 Fixed 2018-10-05 10:01:31 +02:00
Vyacheslav Gerasimov d7b885159e Revert Workaround IndexOuOfBoundsException on configuration with gradle 4.7 2018-10-04 18:28:16 +03:00
Toshiaki Kameyama f4a637a72e "Convert object literal to lambda" inspection: report at INFORMATION level if object literal has 'return' #KT-27116 Fixed 2018-10-04 13:13:52 +02:00
Toshiaki Kameyama 23734bae3e Add quickfix for DECLARATION_CANT_BE_INLINED #KT-9983 Fixed 2018-10-04 13:11:36 +02:00
Toshiaki Kameyama c44d3a8d68 Show lambda parameter info #KT-13118 Fixed 2018-10-03 19:08:56 +03:00
victor.petukhov 30fc76a602 Remove redundant directives to contracts use 2018-10-03 13:49:32 +03:00
victor.petukhov 4819223b74 Add generated codegen box tests for Boolean literals as identifiers 2018-10-03 13:49:31 +03:00
victor.petukhov 1bc0c4092c Add codegen box test templates for identifiers 2018-10-03 13:49:30 +03:00
victor.petukhov dd91727a78 Add generated PSI tests for Boolean literals as identifiers 2018-10-03 13:49:22 +03:00