Commit Graph

54859 Commits

Author SHA1 Message Date
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
Vyacheslav Gerasimov 40e9f48bd0 Build: Fix cache redirector configuration for all projects
Since we forcing project evaluation in root build script cache redirector
should be configured before we do so, otherwise `afterEvaluate` is not called
2019-05-20 15:16:22 +03:00
Vadim Brilyantov d5be5bd96e Fix obsolete compiler classpath in SourceSectionsTest 2019-05-20 14:23:34 +03:00
Igor Yakovlev 611b6f36ce Remove redundant import from QuickFixMultiFileTestGenerated 2019-05-20 12:50:09 +03:00
Mikhail Glukhikh b68e536e2a Add note about inspection highlighting range 2019-05-20 12:31:58 +03:00
KilianCallebaut 3451c60f93 Suggest to replace manual range with explicit indices or iterable
#KT-14344 Fixed
2019-05-20 12:24:52 +03:00
Alexander Udalov 8cda5cb849 Regenerate tests 2019-05-20 11:18:54 +02:00
Toshiaki Kameyama 2c424afefa Elvis -> if intention: don't produce boilerplate code for return/break/continue/throw in RHS
#KT-14369 Fixed
2019-05-20 11:15:41 +03:00
Natalia Selezneva 160de2dbe2 Do not load script dependencies if all script templates aren't loaded 2019-05-20 10:41:15 +03:00
Natalia Selezneva 58eca451c4 Sdk passed in script dependencies should be used during script resolve
PsiElementFinder doesn't find classes from sdks that aren't Project SDK, so when Script Sdk differs from it we need to additionally search classes in script sdk using KotlinScriptDependenciesClassFinder (as we do for classes from ScriptDependencies.classpath)

^KT-31152 Fixed
2019-05-20 10:41:15 +03:00
Natalia Selezneva 5bc7b61497 Refactoring: move ScriptBinariesScopeCache to ScriptDependenciesCache 2019-05-20 10:41:14 +03:00
Natalia Selezneva c2717b3006 Filter out all non JavaSdk from script sdks 2019-05-20 10:41:14 +03:00
Natalia Selezneva 144ff8ae91 Refactoring: move method that find sdk for script to ScriptDependenciesManager 2019-05-20 10:41:14 +03:00
Natalia Selezneva 2f5deefd0a Scripts refactoring: move all scripts caches to ScriptDependenciesCache
Introduce base class for caches based on SLRUMap (with write lock) to avoid exceptions with concurrent map modifications
2019-05-20 10:41:13 +03:00
Natalia Selezneva 1ef4d987d1 Add debug log for script dependencies loading process 2019-05-20 10:41:13 +03:00
Sergey Rostov 6388cdc3b7 Gradle, js, npm: skip KotlinProjectExtensions from different class loaders 2019-05-20 09:55:37 +03:00
Sergey Rostov 9a90627b32 Gradle, js: fix supporting sub targets DSL in build.gradle.kts 2019-05-20 09:55:36 +03:00
Sergey Rostov 3a9f3525f1 Gradle, js, npm: skip old Kotlin2JsPlugin compilations 2019-05-20 09:55:36 +03:00
Sergey Rostov 7589d89a59 Gradle, js: create run task only when project evaluated
As it may be created after js target configuration by java application plugin
2019-05-20 09:55:36 +03:00
Sergey Rostov 15e0d6af92 Gradle, js, npm: fix case when resolver visits dependents projects first 2019-05-20 09:55:36 +03:00
Sergey Rostov 52f01ef43f Gradle, js: implement NpmSimpleLinker for cases when there are no npm dependencies 2019-05-20 09:55:36 +03:00
Sergey Rostov 75708dad87 Gradle, js: fix task input annotations 2019-05-20 09:55:36 +03:00
Sergey Rostov 48fd3b6b87 Gradle, tests: don't use gradle testing internals by default 2019-05-20 09:55:35 +03:00
Ting-Yuan Huang 75646f97a4 MoveCompanionObjectFields: copy constants into interfaces
Fields having const attribute in companion objects are observable in
Java and should be copied to outer interfaces.
2019-05-20 08:43:00 +02:00
Toshiaki Kameyama 6ff776ba65 Convert property to function: fix incorrectly conversion when property has explicit generic type
#KT-29192 Fixed
2019-05-19 14:57:25 +07:00
Toshiaki Kameyama 354f8f0bf1 Redundant 'suspend' modifier inspection: don't report when function has suspend operator invoke
#KT-25465 Fixed
2019-05-18 11:54:57 +03:00