Yan Zhulanow
02ee3aef3f
Kapt: Fix "Unknown option: infoAsWarnings" (#KT-25396)
2018-07-17 20:54:28 +03:00
Svyatoslav Kuzmich
1abb4f42ac
[JS IR BE] Add ranges to runtime, rangeTo for primitive numbers
2018-07-17 20:18:29 +03:00
Pavel V. Talanov
4c38899a2a
Improve error message on failing to get javaResolutionFacade
2018-07-17 17:37:22 +02:00
Pavel V. Talanov
770c280ba5
Light classes: handle broken context in case of supertype delegation
...
This lead to an exception being thrown frequently
Proper fix would be to prevent binding context from being corrupted
Known cases are hard to debug/reproduce
#EA-101081 Fixed
2018-07-17 17:37:20 +02:00
Ilmir Usmanov
991b4251f3
Remove redundant RequireKotlin annotations from coroutines' stdlib.
2018-07-17 17:31:03 +03:00
Ilmir Usmanov
38c4006d9e
Update bootstrap compiler.
2018-07-17 17:30:58 +03:00
Dmitry Savvinov
db1fc7f358
Use 'stableName' instead of 'name' in tests on module name
2018-07-17 17:14:22 +03:00
Mikhael Bogdanov
52b261e19e
Fix test data
2018-07-17 13:30:43 +02:00
Alexander Udalov
bca3e1b95b
Restore getDefaultImports for compatibility with an external plugin
...
(see ce34deb9af )
2018-07-17 12:48:43 +02:00
Roman Elizarov
2236049341
Wrapper for suspend fun main and @Test suspend fun testXXX functions.
2018-07-17 12:15:02 +03:00
Roman Elizarov
d33d21907d
SuccessOrFailure test on JVM added
2018-07-17 12:15:01 +03:00
Roman Elizarov
0b59061bfe
Coroutines debug probes
2018-07-17 12:15:01 +03:00
Roman Elizarov
78192ea712
Fixed createCoroutineFromSuspendFunction
...
Passes an object that extends BaseContinuationImpl to the
suspend function invocation, so that it can use .intercepted on it.
This requires implementation to track its state via label variable.
2018-07-17 12:14:59 +03:00
Roman Elizarov
d3982472a4
Explanatory comment to createCoroutineFromSuspendFunction
2018-07-17 11:28:48 +03:00
Roman Elizarov
96b5bb1b31
Fixed JVM Serialization problems:
...
* EmptyCoroutineContext readResolve fixed
* CombinedContext.writeReplace serializes all context elements
2018-07-17 11:28:38 +03:00
Roman Elizarov
e0f6165f10
Updated SuccessOrFailure:
...
* Parameter names for lambda
* getOrElse takes exception parameters
* fold added
* Improved docs
2018-07-17 11:26:49 +03:00
Nikolay Krasko
2a6dfba8bc
Check kotlinx.coroutines libraries used with Kotlin 1.3 in Gradle (KT-25251)
...
#KT-25251 In Progress
2018-07-17 02:46:34 +03:00
Nikolay Krasko
f9de91016a
Inspection for experimental coroutines imports migration (KT-25251)
...
#KT-25251 In Progress
2018-07-17 02:22:14 +03:00
Nikolay Krasko
5b34498162
Do not report code style warnings on overridden declarations (KT-25416)
...
#KT-25416 Fixed
2018-07-17 02:22:14 +03:00
Mikhail Zarechenskiy
b6db8971e4
Warn about annotations that targets non-existing accessors
...
#KT-15453 In Progress
2018-07-17 00:22:53 +03:00
Dmitry Savvinov
70144f8003
Make warning about usage of -XX-flags less scary
2018-07-16 18:49:21 +03:00
Dmitry Savvinov
9634734abf
Minor: fix kdoc of LanguageFeature.Kind
2018-07-16 18:49:20 +03:00
Pavel V. Talanov
48a38f1820
Do not try inexact resolve on scripts
...
Script light psi depends on script definition
which is costly to compute correctly
#KT-25395 Fixed
2018-07-16 16:25:18 +02:00
Mikhael Bogdanov
5b8df2f6f2
Use proto flag to determine companion field moved to interface
2018-07-16 16:13:18 +02:00
Mikhael Bogdanov
e00b7a993f
Write version requirements for @JvmField in interface companion
2018-07-16 16:13:18 +02:00
Mikhael Bogdanov
b412c90cef
Move version requirements serialization for @JvmDefault to JvmSerializerExtension
2018-07-16 16:13:17 +02:00
Mikhael Bogdanov
0ca3afbb34
Code clean after converion
2018-07-16 16:13:17 +02:00
Mikhael Bogdanov
8633e8b329
Convert JvmSerializerExtension to Kotlin
2018-07-16 16:13:16 +02:00
Mikhael Bogdanov
ac7f33a9b5
Rename JvmSerializerExtension.java to JvmSerializerExtension.kt
2018-07-16 16:13:16 +02:00
Mikhael Bogdanov
1d283d243e
Support @JvmField on interface properties
...
#KT-15807 Fixed
2018-07-16 16:13:15 +02:00
Mikhael Bogdanov
719c1882e0
Add new flag to proto for field moved out from interface companion
2018-07-16 16:13:14 +02:00
Mikhael Bogdanov
f3b419377b
Minor. Reformat
2018-07-16 16:13:14 +02:00
Alexey Sedunov
65e763d562
Misc: Fix flaky test failing due to unstable ordering of libraries
2018-07-16 16:12:23 +03:00
Ilmir Usmanov
8fa3584c5c
Minor. Fix test
2018-07-16 15:09:23 +03:00
Ilmir Usmanov
bc4a7aec76
Remove suspendCoroutineOrReturn intrinsic from compiler
...
#KT-21240: Fixed
Also, change logic of intrinsics check.
#KT-23438: Fixed
2018-07-16 15:09:18 +03:00
Alexander Udalov
f766b2c473
Improve "optimize imports" behavior on default imports
...
Optimize imports to classes when there's an import of a type alias to
that class with the same name. This results in "java.lang.*" imports
being optimized in favor of the corresponding type aliases in "kotlin.*"
which are imported by default
2018-07-16 13:45:11 +02:00
Alexander Udalov
ce34deb9af
Delete DefaultImportProvider, refactor TargetPlatform.defaultImports
2018-07-16 13:45:11 +02:00
Alexander Udalov
1f0fb4823f
Simplify DefaultImportProvider, introduce "low priority imports"
...
Previously, packages `java.lang` and `kotlin.jvm` were imported on JVM
by default on the same rights, causing problems when the same classifier
existed both in `java.lang` and `kotlin.jvm`. Since the only known case
of such conflict were type aliases to JVM classes, the corresponding
classes (expansions of those type aliases) were manually excluded from
default imports. This made the code in DefaultImportProvider complicated
and resulted in multiple problems, regarding both correctness and
performance (see 82364ad3e5 , a9f2f5c7d0 , dd3dbda719 ).
This change adds a new concept, a "low priority import", and treats
`java.lang` as such. Since these imports are now separated from the rest
of default imports in LazyImportScope via secondaryClassImportResolver,
conflicts between classifiers are handled naturally: the one from
`kotlin.jvm` always wins (unless the one from `java.lang` is imported
explicitly, of course). This approach is simpler, safer and does not
require any memory to cache anything.
Skip ResolveToJava.kt test for javac-based resolve; it now fails because
of a weird issue which I didn't have time to investigate (this is OK
because it's a corner case of an experimental functionality)
2018-07-16 13:45:11 +02:00
Mikhail Zarechenskiy
857cc0f728
Make tests about mod and varargs valid for 1.3 version
2018-07-16 14:01:59 +03:00
Alexander Udalov
f03dc62173
Ignore tests on big function types until master is 1.3
2018-07-16 11:11:35 +02:00
Alexander Udalov
dcbb8045bd
Disallow function types with big arity on JVM if LV < 1.3 or API < 1.3
...
The implementation is a bit obscure because this worked on JS since
Kotlin 1.0 and we should not break that; however, on JVM, a diagnostic
will be reported with old language/API version
#KT-25241 Fixed
2018-07-16 10:41:27 +02:00
Alexander Udalov
56f509ba09
Support function types with >= 23 parameters
...
See https://github.com/Kotlin/KEEP/issues/107
#KT-13764 Fixed
2018-07-16 10:41:27 +02:00
Max Medvedev
5c8afea68e
Completion fallback to DescriptorToSourceUtilsIde.getAnyDeclaration
...
That's in case if DescriptorToSourceUtils.getSourceFromDescriptor fails
#KT-22373 Fixed
2018-07-14 15:17:03 +03:00
Zalim Bashorov
74df1208ae
Make "localClassCaptureExtensionReceiver" test more robust and mute it for JS IR BE
2018-07-13 23:42:41 +03:00
Zalim Bashorov
3f0b31dc23
Speed up JS IR BE tests compiling the common parts (runtime + test common utils) once (on demand) and sharing the result between tests
...
It's a temporary hack until we implement IR based library format.
It relies on the fact that currently, IR BE generates stable (enough) names.
2018-07-13 23:42:41 +03:00
Zalim Bashorov
34758110ee
JS IR test runner: collect all .kt files from the "irRuntime" dir automatically instead of declaring each one in the list
2018-07-13 23:42:40 +03:00
Nikolay Krasko
dfcc41ebb0
Fix source position NPE (EA-118863)
2018-07-13 20:00:05 +03:00
Nikolay Krasko
f1c87376b9
Another NPE in PlainTextPasteImportResolver.kt (EA-91517)
2018-07-13 20:00:05 +03:00
Nikolay Krasko
5e35fd1758
Check created javaFileFacadeFqName short name (EA-122324)
2018-07-13 20:00:05 +03:00
Nikolay Krasko
819f6c036b
Add '//' char to identifier validity check
2018-07-13 20:00:05 +03:00