Dmitriy Dolovov
d76dc6f57e
[Commonizer] Call commonizer on Gradle configuration phase
...
Issue #KT-36858
Initially it was called on execution step which may be omit
during project import into IDEA.
2020-02-21 21:54:15 +07:00
Mikhail Zarechenskiy
f2f95496e3
[NI] Complete contradictory candidates inside builder-inference
...
In this test `kotlin` was resolved to the extension
`val Class<T>.kotlin` because it was saved in builder-inference.
Usually, it's fine, but not for qualified expressions as they have
fallback resolve in case of error
2020-02-21 17:39:50 +03:00
Toshiaki Kameyama
3398683093
Unused symbol: do not report for secondary constructor when class is used as typealias
...
#KT-20907 Fixed
2020-02-21 15:11:38 +01:00
Mikhail Glukhikh
81f1f441fc
[FIR] Add stub default values to kotlin.Enum constructor parameters
2020-02-21 16:39:00 +03:00
Mikhail Glukhikh
39bd97147f
[FIR] Don't create initializers for simple enum entries
...
Usually FIR enum entry is initialized by anonymous object,
which is the container for all enum entry' declarations.
However, for simple enum entries there is no need of initializer at all.
2020-02-21 16:38:52 +03:00
Mikhail Glukhikh
b1e9dbf994
[FIR] Use super<Enum> as delegated calls in enum constructors
2020-02-21 16:37:56 +03:00
Mikhail Glukhikh
f173af9238
FIR2IR: use enum constructor call for enum entries
2020-02-21 16:37:50 +03:00
Mikhail Glukhikh
9e3f17c52a
[FIR TEST] Add test for unresolved reference in default argument
...
See KT-36905
2020-02-21 16:37:10 +03:00
Toshiaki Kameyama
a3252b9480
Unused symbol: fix false positive in anonymous object in top level or companion object
...
#KT-31800 Fixed
#KT-20868 Fixed
2020-02-21 14:36:18 +01:00
Toshiaki Kameyama
ef1e54eda9
ReplaceToStringWithStringTemplateInspection: insert curly braces if needed
...
#KT-36735 Fixed
2020-02-21 14:28:07 +01:00
Toshiaki Kameyama
c87bc2123c
Add "Change to val" quick fix for MUST_BE_INITIALIZED
...
#KT-15723 Fixed
2020-02-21 14:09:54 +01:00
Nikolay Krasko
a46c6ce5df
Revert global project settings to LATEST_STABLE in teardown
2020-02-21 16:07:24 +03:00
Nikolay Krasko
f995192f21
Always configure and restore api version settings in tests
2020-02-21 16:07:24 +03:00
Nikolay Krasko
6c83e9fb85
Clean LANGUAGE_VERSION_SETTINGS after the test
2020-02-21 16:07:24 +03:00
Nikolay Krasko
19bc39d3ab
Clean facet if it wasn't set before test (fix tests on 201)
2020-02-21 16:07:23 +03:00
Nikolay Krasko
af3b057ba2
Always clean language and api versions after usage
2020-02-21 16:07:23 +03:00
Nikolay Krasko
c0dac9bf32
Refactoring: extract long function out of local context
2020-02-21 16:07:23 +03:00
Nikolay Krasko
3a5f42cc5e
Refactoring: always use compiler settings with de-configuration in tests
2020-02-21 16:07:23 +03:00
Nikolay Krasko
018215f47d
De-bunch KotlinLightCodeInsightFixtureTestCase.kt
2020-02-21 16:07:23 +03:00
Pavel Punegov
94be4d77ff
Fix init order in inline fun (native test)
2020-02-21 16:04:53 +03:00
Toshiaki Kameyama
19093e2e02
Redundant companion reference: fix false positive when companion has same name member as companion name
...
#KT-36707 Fixed
2020-02-21 13:57:04 +01:00
Vasily Levchenko
98ce49ba73
[build][native] version with milestone clause
2020-02-21 13:51:20 +01:00
Vladimir Dolzhenko
7053f1d00c
Drop CancellationCheck usage from 193
...
Relates to #KT-36891
2020-02-21 13:40:48 +01:00
Toshiaki Kameyama
5a6cf19c68
Complete statement for class declaration: add '()' to supertype
...
#KT-31668 Fixed
2020-02-21 13:21:26 +01:00
Dmitry Petrov
e9a7be4a46
Fix intersection type handling in PSI2IR
2020-02-21 15:11:16 +03:00
Mikhail Zarechenskiy
1624327ba4
[NI] Fix substitution in builder-inference for empty common system
2020-02-21 14:24:57 +03:00
pyos
c5ffbfd33c
JVM_IR: mark origins of capture fields in suspend lambdas
2020-02-21 12:11:19 +01:00
pyos
6b98ea2378
JVM_IR: do not place suspend markers around crossinline lambda calls
2020-02-21 12:11:19 +01:00
pyos
39ebc8cfa5
Add a suspend test that fails on JVM_IR
2020-02-21 12:11:19 +01:00
Ilmir Usmanov
52e7cd5725
JVM_IR: Remove $$forInline suffix for fake inliner variables
...
Otherwise, IDE will not be able to navigate to inline functions.
#KT-36797 Fixed
2020-02-21 12:08:25 +01:00
Ilmir Usmanov
325ad14ac9
JVM_IR: Treat suspend main wrapper as always tail-call function
...
In other words, never generate suspend call markers inside it.
2020-02-21 12:00:54 +01:00
Ilmir Usmanov
8c4eef9844
JVM_IR: Return COROUTINE_SUSPENDED from suspend main wrapper
...
Before, if the code inside suspend main suspended, the wrapper would
just ignore it and return Unit. This was a signal for runSuspend to exit
main loop and return said Unit.
Instead of poping whatever suspend main returns, just return it.
2020-02-21 12:00:52 +01:00
Kristoffer Andersen
5b62c9e54d
[WIP] Add Compiler Smoke Tests for (suspend) main methods
...
This commit ports the (parameterless) main integration tests in
`CompilerSmokeTest` to the IR backend. It also includes a simple
suspend main test.
The advanced ones (like `helloAppSuspendParameterlessMain`) are
currently blocked by pending changes to capturing suspend lambdas,
which are underway.
2020-02-21 12:00:50 +01:00
Kristoffer Andersen
55aafb3430
[JVM IR] Support Suspend Main
...
This adds supports for (parameterless) suspend main entry points for
the JVM IR backend.
In case main is a suspend function, it gains a continuation during
lowering, so we simply generate a plain old `public static void
main(String[] args)`. This entry point invokes `suspend main` via
`kotlin.coroutines.jvm.internal.RunSuspendKt#runSuspend`.
This PR introduces `runSuspend` as a built-in, and generates the
following `main`, passing `args` as appropriate:
```
fun main(args: Array<String>) {
runSuspend { main(args) }
}
```
The phase ordering has been reshuffled countrary to previous
discussion on #2780 , as the MainMethodGeneration pass now introduces lambdas in
the IR. Hence, it has to run before InventNamesForLocalClasses, yet
still after JvmOverloadsAnnotations.
Some dead code was discovered in AddContinuationLowering
2020-02-21 12:00:47 +01:00
Ilya Goncharov
068d547375
[Gradle, JS] UpperCased KotlinJsCompilerType
2020-02-21 13:14:36 +03:00
Ilya Goncharov
9acd98071e
[Gradle, JS] Divide KotlinJsCompilerAttribute
2020-02-21 13:14:36 +03:00
Ilya Goncharov
cc97138e9c
[Gradle, JS] Extract JS presets container, no js in codegen since now
2020-02-21 13:14:36 +03:00
Ilya Goncharov
fa335b5360
[Gradle, JS] Js default compiler type for mpp
2020-02-21 13:14:36 +03:00
Ilya Goncharov
8dc75def19
[Gradle, JS] Use default configuration names only once in constants
2020-02-21 13:14:36 +03:00
Ilya Goncharov
664775a43f
[Gradle, JS] Configure compiler type with single platform plugin
2020-02-21 13:14:35 +03:00
Ilya Goncharov
e631146fa7
[Gradle, JS] Fix DSL for Gradle JS wizard
2020-02-21 13:03:21 +03:00
Ilya Goncharov
3ae6b27556
[Gradle, JS] Fix DSL for JVM/JS wizard
...
#KT-36889 fixed
2020-02-21 13:03:18 +03:00
Abduqodiri Qurbonzoda
6670a2fff8
Update public api dump
2020-02-20 21:14:52 +03:00
Ilya Goncharov
569decce43
[Gradle, JS] Fix missed import
2020-02-20 19:32:35 +03:00
Ilya Goncharov
d114945b76
[Gradle, JS] Change message in polite manner
...
#KT-36489 fixed
#KT-36843 fixed
2020-02-20 19:32:35 +03:00
Ilya Goncharov
e0be8f271f
[Gradle, JS] Not error, but warning with test fix
2020-02-20 19:32:35 +03:00
Ilya Goncharov
40fb6c67d2
[Gradle, JS] Add diagnostic messages for js targets
2020-02-20 19:32:34 +03:00
Ilya Goncharov
aefaa6dc7f
[Gradle, JS] Remove deprecated configurations
2020-02-20 19:32:34 +03:00
Ilya Goncharov
92291c03e8
[Gradle, JS] Add methods with string definition of compiler
2020-02-20 19:32:34 +03:00
Ilya Goncharov
203ca018e5
[Gradle, JS] Rename public KotlinJsCompilerType
2020-02-20 19:32:34 +03:00