Nikolay Lunyak
2e7dcd6096
[FIR] Require overrides to have matching isSuspend flag value
...
^KT-57100 Fixed
2023-10-09 06:55:43 +00:00
Nikolay Lunyak
f674529558
[FIR] Report MIXING_SUSPEND_AND_NON_SUSPEND_SUPERTYPES
...
^KT-59367 Fixed
2023-08-17 21:45:42 +00:00
Ilmir Usmanov
d7fd2471b8
JVM IR: Remove remains of 1.2 coroutines from tests
...
Remove CoroutineAdapter and LANGUAGE: +ReleaseContinuation,
which are meaninless now.
Update the tests accordingly.
2023-05-31 05:56:18 +00:00
Ilya Kirillov
1bbcae5ed2
[FIR] fix resolve contract violation from scopes
...
We cannot call lazy resolve to STATUS phase from scopes as scopes may be accessed on a STATUS phase or earlier
^KT-54890
^KTIJ-23587 fixed
2023-01-13 21:32:51 +00:00
Ilya Kirillov
644d1bf0d0
[FIR] ignore tests which fail because of resolve contracts violation
2022-12-12 16:21:07 +00:00
Ilmir Usmanov
09c9641e23
FE: Use safe call when searching for suspend modifier
...
The modifier does not exist, when the parameter type is typealias.
#KT-35187 Fixed
2022-06-29 06:12:44 +02:00
Ilmir Usmanov
f75a8109d2
FE 1.0: Make 'suspend fun', where 'suspend' is not builtin error in 1.8
...
#KT-49264 Fixed
2022-04-11 12:02:28 +00:00
Denis.Zharkov
65d7da122f
FIR: Fix invalid INITIALIZER_TYPE_MISMATCH for suspend lambda
2021-11-10 22:00:01 +03:00
Mikhail Glukhikh
8f1d07084b
FIR: introduce ILLEGAL_SUSPEND_FUNCTION_CALL & PROPERTY_ACCESS diagnostics
2021-07-30 19:06:46 +03:00
Ilmir Usmanov
dc2485ae71
Support suspend functions as superinterfaces
...
Forbid mixing suspend and non-suspend functional supertypes.
Since JVM BE generates suspend functional types as non-suspend ones
with SuspendFunction marker interface, there is not way to distinguish
non-suspend functional type from suspend one if they are mixed.
#KT-18707 Fixed
2021-04-26 22:14:32 +02:00
Denis.Zharkov
0b0a6d6ede
Fix false positive ENCLOSING_SUSPEND_FUNCTION_FOR_SUSPEND_FUNCTION_CALL
...
Previously added additional processing at findEnclosingSuspendFunction
seems unnecessary anymore
^KT-43258 Fixed
2021-04-13 11:47:05 +03:00
Victor Petukhov
e754585e38
NI: add fallback strategy to get lexical scope to checking coroutine call legality
...
^KT-40247 Fixed
^KT-40337 Fixed
2020-07-16 15:33:27 +03:00
Mikhail Glukhikh
aada7bfe51
FIR: handle suspend functions in callable reference resolve properly
2020-04-20 17:05:31 +03:00
simon.ogorodnik
f573719cc1
[FIR] Fix missing receiver type if anonymous function without label
2020-04-08 14:56:17 +03:00
Dmitriy Novozhilov
2536fa0cd5
[FIR-TEST] Add new testdata generated after changes in previous commit
2019-12-12 16:11:46 +03:00
Alexander Udalov
77c87fa6c9
Remove API_VERSION 1.3 from compiler tests
...
So that these tests will now check behavior on the latest API version
2018-12-20 12:53:23 +01:00
Ilmir Usmanov
0c867b4804
Disable callable references to suspend functions in 1.2
...
#KT-25604: Fixed
2018-08-02 18:55:49 +03:00
Ilmir Usmanov
4ec82cad90
Minor: add test to call callable references from Java
2018-07-05 15:09:06 +03:00
Ilmir Usmanov
28ad498956
Use AnonymousFunctionDescriptor for suspend callable references
...
Also use it for local suspend functions, which allows us to remove hack
with dropSuspend.
Regenerate tests.
2018-07-05 15:08:49 +03:00
Ilmir Usmanov
eea95441c5
Add diagnostics tests. Forbid callable reference to coroutineContext
...
#KT-16908: Fixed
2018-07-05 15:08:42 +03:00
Denis Zharkov
1d5144b168
Move coroutine-related diagnostic tests to run them with stdlib
...
It's necessary because all coroutine related declarations (Continuation, etc)
are now in the stdlib
2017-01-27 23:24:13 +03:00
Denis Zharkov
8fa8ba7055
Move coroutine-related runtime parts to kotlin.coroutines.experimental package
...
#KT-15975 Fixed
2017-01-27 23:24:13 +03:00
Dmitry Petrov
9d4047f5e4
Calls for suspend functions imported from object should be checked in CoroutineSuspendCallChecker.
2017-01-26 09:39:53 +03:00
Dmitry Petrov
b9f9894310
KT-15677 KT-15775
...
Update parser & descriptor renderer to handle parenthesized types and function types properly.
Resolve annotations in parenthesized types.
AnnotationsImpl.isEmpty() returned false for targeted annotations only
(e.g., 'fun @receiver:Ann C?.foo()').
Properly keep track of targeted annotations.
2017-01-19 09:53:17 +03:00
Denis Zharkov
d0d617b44e
Fix signature mapping for default suspend function from interface
...
Use jvm suspend function view in function codegen.
Also use SUSPEND_FUNCTION_TO_JVM_VIEW slice if the value exists
for the given key
#KT-15552 Fixed
2017-01-18 12:00:45 +03:00
Denis Zharkov
de9c41c412
Fix overridability rules for suspend functions
...
Treat suspend and non-suspend functions as conflicting
#KT-15413 Fixed
2017-01-14 13:24:53 +03:00
Denis Zharkov
978f53414f
Prohibit local suspend functions
...
#KT-15392 Fixed
2017-01-14 13:24:53 +03:00
Denis Zharkov
d43a4199f8
Prohibit suspend function type in supertype list
...
#KT-15391 Fixed
2017-01-14 13:24:53 +03:00
Denis Zharkov
f12409504f
Prohibit callable references to suspend functions
...
#KT-15662 Fixed
2017-01-14 13:24:53 +03:00
Denis Zharkov
a048dde7a5
Support non-tail suspend calls in front-end
...
#KT-15597 In Progress
2017-01-14 13:24:53 +03:00
Denis Zharkov
2cb9d3a8ad
Move coroutine intrinsics to kotlin.coroutine.intrinsics package
...
Also rename val SUSPENDED to SUSPENDED_MARKER
#KT-15698 Fixed
2017-01-14 13:24:53 +03:00
Denis Zharkov
8475869fb3
Support common calls on suspend function typed values
...
Also support multiple value parameters in suspend function type
#KT-15379 Fixed
#KT-15380 Fixed
2016-12-22 11:15:52 +03:00
Denis Zharkov
5ec62108ee
Rename RestrictsSuspendExtensions -> RestrictsSuspension
2016-12-16 18:56:30 +03:00
Stanislav Erokhin
b527a4d158
Global rename in test data for coroutines
...
(cherry picked from commit 132f97b)
2016-12-15 23:58:26 +03:00
Stanislav Erokhin
8968bc3dd6
RestrictSuspension -> RestrictsSuspendExtensions
...
(cherry picked from commit 9e0c733)
2016-12-15 23:58:24 +03:00
Dmitry Petrov
f19581dc4d
Suspend lambdas can't have value parameters (UNSUPPORTED in M04).
2016-12-15 23:58:16 +03:00
Stanislav Erokhin
c5aeaae8e6
Support explicit this receiver (this.foo()) for RestrictSuspension function call.
2016-12-15 23:58:15 +03:00
Mikhail Zarechenskiy
4b892b1c9c
Report corresponding diagnostic on suspend lambda
2016-12-15 23:58:13 +03:00
Stanislav Erokhin
b88c8ea2e7
Support checks for annotation RestrictSuspension.
2016-12-15 23:58:12 +03:00
Mikhail Zarechenskiy
664485f4bb
Introduce keys to control applicability of coroutines
...
By default now we produce warnings on coroutines
2016-12-15 23:58:07 +03:00
Dmitry Petrov
80bd916f5d
'SuspendFunction$n' should not be visible in member scopes (should be unresolved).
...
'SuspendFunction$n' class descriptors are created on demand by KotlinBuiltIns (and cached).
On serialization, types constructed with 'SuspendFunction$n' are written as 'Function$n' with extra flag (SUSPEND_TYPE).
On deserialization, corresponding 'SuspendFunction$n' classes are used.
2016-12-15 23:58:05 +03:00
Dmitry Petrov
a3338b2230
Allow only 'out' modifier for value parameter modifiers in functional type
...
(comments also mention 'lazy' and 'ref'; these value parameter modifiers are unsupported, anyway).
2016-12-15 23:58:02 +03:00
Dmitry Petrov
eec96f1954
Extension functions & inference.
2016-12-15 23:58:01 +03:00
Stanislav Erokhin
55983a7808
Support type inference for coroutines.
2016-12-15 23:57:55 +03:00
Stanislav Erokhin
34a4159a94
Added coroutine import to front-end tests.
2016-12-15 23:57:53 +03:00
Stanislav Erokhin
0132f3eea7
Remove kotlin.coroutine package from default imports.
2016-12-15 23:57:51 +03:00
Stanislav Erokhin
90586a5a22
Minor. Add some new test cases for suspend function type inside suspend function type.
2016-12-15 23:57:49 +03:00
Stanislav Erokhin
2671826ed1
Fix front-end test data: replace @Suspend -> suspend.
2016-12-15 23:57:49 +03:00
Dmitry Petrov
6d73e13798
Generic type arguments inference for lambdas as suspend functions.
2016-12-15 23:57:46 +03:00
Dmitry Petrov
bf987cff5f
Tests for basic SuspendFunction-related restrictions (already implemented within type system)
2016-12-15 23:57:45 +03:00