Commit Graph

54884 Commits

Author SHA1 Message Date
Ilmir Usmanov e7c78d8d7e Update bootstrap
Update reference public API. Before 266976ac1e
suspend inline functions with crossinline parameters were effectively
inline-only. Fixing it exposed suspendCoroutine as public API.
Update jps artifacts after bootstrap.
2019-05-23 09:28:31 +03:00
Ilya Kirillov ff774f6249 New J2K: Run nj2k tests by default 2019-05-22 22:20:18 +03:00
Ilya Kirillov 9ccedc5bc4 New J2K: Fix wrong line separators on windows
It causes some inspections in post-processing to work not properly
2019-05-22 22:20:18 +03:00
Ilya Kirillov f0012de6ea New J2K: add string method conversions 2019-05-22 22:20:18 +03:00
Ilya Kirillov 54432448e3 New J2K: correctly remove redundant property type in a case of nullable initializer 2019-05-22 22:20:17 +03:00
Ilya Kirillov 8f5c690cdd New J2K: do not convert var to val if super property is var 2019-05-22 22:20:17 +03:00
Ilya Kirillov fa8a067c85 Fix losing flexible type enhancement in type substituting
It breaks `org.jetbrains.kotlin.nj2k.NewJavaToKotlinConverterSingleFileTestGenerated.ToArray#testToArray` test due to losing external nullability annotations
2019-05-22 22:20:17 +03:00
Ilya Kirillov 0a974cd419 New J2K: remove unused dependency from nj2k-services 2019-05-22 22:20:16 +03:00
Ilya Kirillov c9decd5dc9 New J2K: correctly retrieve all type variables in printing 2019-05-22 22:20:16 +03:00
Ilya Kirillov 7db4958a17 New J2K: fix tests due to changes in inspections behaviour 2019-05-22 22:20:16 +03:00
Ilya Kirillov 37f8d72756 New J2K: make inner private constructors public when accessed 2019-05-22 22:20:16 +03:00
Ilya Kirillov 78fd56bdf0 New J2K: Fix running some post processings in incorrect thread
#KT-31234 fixed
2019-05-22 22:20:15 +03:00
Ilya Kirillov 90ab39f50f New J2K: Fix CCE in post processing
#KT-31217 fixed
2019-05-22 22:15:28 +03:00
Sergey Igushkin 8b150d2b07 Fix Android 3.3 Gradle integration tests running with low Gradle version 2019-05-22 18:11:18 +03:00
victor.petukhov d4515031de Report warning about implicitly inferred nothing only for return position
^KT-31535 Fixed
2019-05-22 15:45:59 +03:00
Roman Artemev 72f7287ad2 [IR BE] Fix array constructor loop. Use index parameter as immutable value 2019-05-22 15:18:13 +03:00
Roman Artemev dfa38f4a4d [JS IR BE] Fix state machine generation in case of composition of loops, inline functions and finally blocks
* lower finally blocks in any cases
 * do not optimize exit blocks for if-statements
2019-05-22 15:18:13 +03:00
Roman Artemev 9c7d47789c [JS IR BE] Implement type check for SuspendFunctionN 2019-05-22 15:18:13 +03:00
Steven Schäfer 9894c216c1 Fix test for static default methods in KotlinTypeMapper 2019-05-22 13:33:08 +02:00
Steven Schäfer cf13293363 Use FQ names for string plus intrinsic in FlattenStringConcatenationLowering 2019-05-22 12:14:43 +02:00
Alexander Udalov 43bf962d79 Fix CLI test data on -XXLanguage arguments
We should use '\:' instead of ':' because the latter is replaced to the
path separator in AbstractCliTest.readArg which is ';' on Windows.
2019-05-22 08:48:37 +02:00
Alexander Udalov d340f6dc62 Minor, simplify code in parseCommandLineArguments 2019-05-22 08:48:37 +02:00
Ilmir Usmanov effbcdaf70 Do not generate $$forInline suffix for enclosing method
in OUTERCLASS field.

The inliner generates two versions of suspend functions/lambdas in
inline functions: with state-machine and without. The former is used
to call the function from Java or via reflection and have ordinary
name, while the latter is used by inliner and have $$forInline suffix.
The inliner throws the state-machine version away, duplicates
$$forInline version and then call state-machine generator.

If these suspend functions/lambdas are not going to be inlined,
$$forInline version is not generated. However, all objects, which are
used in these suspend functions/lambdas, have $$forInline version
written to OUTERCLASS field. This leads to errors by proguard.
Since they are used in both state-machine version and for-inline ones,
we can simply remove $$forInline suffix from OUTERCLASS field and this
fixes the issue.

 #KT-31242 Fixed
2019-05-21 21:09:36 +03:00
Svyatoslav Kuzmich dd6bc100ed [JS IR BE] Don't detach assignment operator from receiver 2019-05-21 19:19:31 +03:00
Svyatoslav Kuzmich 5495da5241 [JS IR BE] Allow empty call arguments only for external functions 2019-05-21 19:19:31 +03:00
Svyatoslav Kuzmich e9ceee388e [JS IR BE] Don't transform toString with extension receiver 2019-05-21 19:19:31 +03:00
Svyatoslav Kuzmich 3153a7dd7e [JS IR BE] Fix boolean and/or generation 2019-05-21 19:19:31 +03:00
Svyatoslav Kuzmich b8bbcb3f93 [JS IR BE] Copy type metadata for Boolean, Char and Long varargs 2019-05-21 19:19:31 +03:00
Svyatoslav Kuzmich 59617c97b4 [JS IR BE] Fix VarargLowering
- Enable empty vararg transformation for all IrFunctionAccessExpression
- Fix empty vararg boxing
- Refactor inline class boxing logic
- Fix types of generated expressions
2019-05-21 19:19:31 +03:00
Svyatoslav Kuzmich f80b6ff947 [JS IR BE] Put file names into JsDoc 2019-05-21 19:19:31 +03:00
Sergey Igushkin 71bd88bdb3 Fix the AGP deprecation warning on usage of getPackageLibrary, KT-30784
Use the new API that returns the task provider, if available.

Issue #KT-30784 Fixed
2019-05-21 19:08:29 +03:00
Ilya Gorbunov 0a3ebb5780 Unmute tests for JVM_IR that pass after making assertFailsWith inline 2019-05-21 18:53:53 +03:00
Ilya Gorbunov 6632cf5b1d Add hidden methods to keep binary compatibility in kotlin-test for JVM 2019-05-21 18:53:52 +03:00
Ilya Gorbunov 22694fa6b0 Make assertFails(With) inline-only functions
So that the lambda passed to these functions can capture suspend
function calls.

#KT-31194 Fixed
2019-05-21 18:53:52 +03:00
pyos 6b2d874ccc JVM_IR: generate non-null assertions for arguments 2019-05-21 18:30:27 +03:00
Ilmir Usmanov 266976ac1e Fix Java interop of inline suspend functions with suspend parameters
In 1.3.31 I fixed Java interop for inline function with coroutines
(TL;DR: when we need a state machine, generate two methods: one with
normal name, and the other one with $$forInline suffix, for the inliner
to use, just like inline suspend functions), however, I forgot a case
with inline suspend function with inline suspend function parameter.
In this case, the compiler a generated two functions, as needed, but,
neither of them had a state-machine. This change adds the state-machine
for the method with normal name. Note, that suspend inline functions
with crossinline parameter, which are also supported by the change,
did not cause incorrect behaviour, since until now they were generated
as synthetic.

 #KT-31354 Fixed
2019-05-21 17:50:25 +03:00
Georgy Bronnikov 2b9e05e30f JVM_IR: copy-paste parameter name generation from descriptor-based code 2019-05-21 17:24:53 +03:00
Jiaxiang Chen afcbd76c9e Implement stub methods generation for Kotlin Immutable Collection classes.
This change is to fill the gap between Kotlin Collection
classes(immutable) and Java Collection classes(mutable), to avoid
calling an unsupported operation like remove() on an immutable class in
jvm.
2019-05-21 17:20:20 +03:00
Elena Lepilkina 8c3cef97bd New shared version 2019-05-21 16:56:39 +03:00
Mikhail Glukhikh 0cf318918c Clean & fix tests in "replace manual range with indices / iteration"
Related to KT-14344
2019-05-21 13:34:29 +03:00
Natalia Selezneva 7c46338181 Drop ScriptBinariesScopeCache from plugin.xml because it was moved to ScriptDependenciesCache
^KT-31521 Fixed
2019-05-21 12:07:11 +03:00
Mikhael Bogdanov 007af75e1e Properly calculate call site file in JVM IR inliner 2019-05-21 07:42:16 +02:00
Mikhael Bogdanov 6ef3e9ea42 Minor. Code clean 2019-05-21 07:42:15 +02:00
Mikhael Bogdanov c630df3e49 Simplify code 2019-05-21 07:42:14 +02:00
Mikhael Bogdanov de62f0123b Minor. Apply minor TODOs 2019-05-21 07:42:14 +02:00
Mikhael Bogdanov b8b2607a02 Minor. Clean up code 2019-05-21 07:42:13 +02:00
Igor Yakovlev f044d654f0 Fix KotlinLintTest.parcel test
Added plugin classpath of android compiler extensions to module facet
2019-05-20 19:54:46 +03:00
Benjamin Orsini 3e39f26379 Add map() documentation sample
* docs: add map() sample
* docs: add samples for Map and CharSequence
* docs: add another sample for Maps.map()
2019-05-20 19:20:09 +03:00
pyos 08ea982688 Remove imports of javafx from Gradle build files 2019-05-20 17:31:28 +02:00
Vyacheslav Gerasimov c2a2d80d4c Build: Minor cleanup & format root build.gradle.kts 2019-05-20 15:16:22 +03:00