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
Dmitry Petrov
bc069cd686
Lambda in position with suspend function expected type:
...
simple case - val initializer.
2016-12-15 23:57:44 +03:00
Dmitry Petrov
cf4fb1eb25
Since '@A R.() -> T' is now parsed as '@A (R.() -> T)',
...
receiver type with modifiers or annotations should be surrounded in parentheses on rendering: '(@A R).() -> T'
This also fixes stub builder tests (which check that stubs are consistent with rendered descriptors).
2016-12-15 23:57:42 +03:00
Dmitry Petrov
6e1340da82
Introduce 'SuspendFunction$n<...>' types.
2016-12-15 23:57:41 +03:00
Dmitry Petrov
a15d423db4
Support modifiers on types in parser
...
(required for 'suspend' on functional types).
TYPE_REFERENCE element now has MODIFIER_LIST child, which hosts annotations and modifiers for the corresponding type reference.
Annotations and modifiers written before an extension function type are now parsed as annotations and modifiers for the functional type, not the receiver type.
So, '@Ann A.(B) -> C' was '(@Ann A).(B) -> C', and became '@Ann (A.(B) -> C)'.
NB: DSL_SCOPE_VIOLATION testData updated accordingly.
Type projection variance modifiers ('in', 'out') belong to a separate modifier list under corresponding type projection (not under a type reference).
'A<in suspend T>' is 'A<(in (suspend T))>', 'A<suspend in T>' is an error.
In stub builder, create a modifier list node to host annotations and modifiers (none so far; TODO properly serialize/deserialize types with modifiers).
2016-12-15 23:57:41 +03:00
Denis Zharkov
1ab003c029
Support another one coroutine convention in front-end
...
- There will be no `coroutine` keyword for builders
- They accept a special suspend function type instead
(it's return type is straightforward, not Continuation<Unit>)
- Instances of these types may be run with special built-in functions
- These built-ins functions are parametrized
with handleResult/handleException/interceptResume, so these operators
become unnecessary (and controllers too)
NB: `@Suspend` annotation is subject to replace with the `suspend` modifier
on types
2016-12-15 23:32:11 +03:00
Alexey Andreev
e6501591fa
JS: serialize type of local anonymous class as its denotable supertype. See KT-14888
2016-12-15 19:05:32 +03:00
Alexey Andreev
b08afb0e93
JS: prohibit overriding external functions with optional parameters by non-external fake functions
2016-12-15 19:05:32 +03:00
Alexey Andreev
e2dab5ab5c
JS: prohibit overriding external functions with optional parameters by non-external functions. See KT-13889
2016-12-15 19:05:32 +03:00
Ilya Gorbunov
9acfde7c5a
Revert changes from daac46b since kotlin.Comparator now has lower priority than explicit star-import of java.util.*
2016-12-15 13:39:10 +03:00
Alexander Udalov
212240a008
Collect all deprecations, do not stop on the first found one
...
#KT-15245 In Progress
2016-12-15 11:46:17 +03:00
Stanislav Erokhin
3600b51d90
Minor. fix test data.
2016-12-14 23:59:38 +03:00
Stanislav Erokhin
457918a6dd
Changed name resolution for dynamic extension. Added annotation DynamicExtension.
2016-12-14 21:36:26 +03:00
Mikhail Zarechenskiy
5b5d09b6b2
Fix test data: rename 'mod' to 'rem'
2016-12-14 15:29:00 +03:00
Mikhail Zarechenskiy
e83568bcf3
Update test data after adding operator rem to builtIns
2016-12-14 15:29:00 +03:00
Mikhail Zarechenskiy
e67543e08e
Revert "Update test data as operator 'mod' became deprecated"
...
This reverts commit 040f4e90ce .
2016-12-14 15:29:00 +03:00
Mikhail Zarechenskiy
42d867b3bf
Support number conversion for binary 'rem' operator
2016-12-14 15:29:00 +03:00
Stanislav Erokhin
59efedf610
Rename platform to header.
2016-12-13 18:00:00 +03:00
Alexey Andreev
9dc16f0564
JS: prohibit runtime annotations on external declarations. Warn about runtime annotation in remaining cases. See KT-13895
2016-12-13 13:58:41 +03:00
Stanislav Erokhin
dbe8edda5f
Remove propertyDelegate and fix unused parameter checker for provideDelegate.
2016-12-12 23:14:09 +03:00
Stanislav Erokhin
9dc9fb578f
Rename toDelegateFor to provideDelegate.
2016-12-12 23:14:07 +03:00
Dmitry Petrov
e2b6d2d849
Drop 'propertyDelegated' convention (without additional deprecation ceremony).
2016-12-12 23:13:58 +03:00
Dmitry Petrov
5ddf8e60e6
Use delegate initializer expression resolution scope for 'toDelegateFor' resolution.
2016-12-12 23:13:57 +03:00
Dmitry Petrov
a6bc7271ae
operator toDelegateFor: add front-end test for local delegate property
2016-12-12 23:13:56 +03:00
Dmitry Petrov
2ee31916c7
'createDelegate' operator renamed to 'toDelegateFor'
2016-12-12 23:13:55 +03:00
Dmitry Petrov
e2ba288323
'createDelegate' operator convention:
...
- resolution & inference
- additional diagnostic for language feature support
2016-12-12 23:13:54 +03:00
Dmitry Petrov
d3ab0f066e
'createDelegate' operator declaration
2016-12-12 23:13:53 +03:00
Mikhail Zarechenskiy
7a0e44b8f9
Resolve '%' as 'mod' when LV=1.0
2016-12-09 17:01:41 +03:00
Mikhail Zarechenskiy
7a09faa606
Fix test on JS conventions
2016-12-09 17:00:41 +03:00
Mikhail Zarechenskiy
bc4a492f4d
Resolve for rem/modAssign and mod/remAssign
...
rem/remAssign always wins if it is possible
2016-12-09 17:00:27 +03:00
Mikhail Zarechenskiy
8e73a902e4
Additional tests on mod/rem migration
2016-12-09 16:59:26 +03:00
Mikhail Zarechenskiy
040f4e90ce
Update test data as operator 'mod' became deprecated
...
Revert this commit after changing 'mod' to 'rem' in stdlib
2016-12-09 16:59:25 +03:00
Mikhail Zarechenskiy
5f71f1bcad
Add warnings at declaration and call sites of operator 'mod'
2016-12-09 16:59:24 +03:00
Mikhail Zarechenskiy
97ca51381a
Gradual migration of operator 'mod' to 'rem'
...
- Introduce new 'rem' operator convention
- Prefer 'rem()' to 'mod()' when both are available, even if mod() is a
member, and rem() -- an extension
- Place operator 'rem' under the language feature
2016-12-09 16:43:35 +03:00
Alexey Andreev
2df9daab1f
JS: prohibit private inline members of external classes, since KT-14031 was postponed
2016-12-09 15:13:10 +03:00
Alexey Andreev
df34e69d7d
JS: prohibit inheritance of external classes from non-external (see KT-15130)
2016-12-09 15:13:09 +03:00
Alexey Andreev
fff1af4ff6
JS: allow to inherit external classes with overloaded functions in case we don't override them (see KT-13910).
2016-12-09 15:13:09 +03:00
Alexey Andreev
ecb498717a
JS: rework diagnostics names. Prohibit external inner classes (see KT-14027)
2016-12-09 15:13:08 +03:00
Alexey Andreev
cf8161507c
JS: prohibit private members of external classes (see KT-14029)
2016-12-09 15:13:08 +03:00
Alexey Andreev
3882bf7564
JS: prohibit native (external) extension properties and functions. See KT-13896
2016-12-09 15:13:07 +03:00
Mikhael Bogdanov
f4259c5f82
Added deprecation for protected call within inline functions
2016-12-09 11:55:16 +01:00
Mikhael Bogdanov
038065e827
Updated NON_PUBLIC_CALL_FROM_PUBLIC_INLINE diagnostic to support @PublishedApi
2016-12-09 11:55:15 +01:00
Mikhael Bogdanov
7ea29d3397
Wrong @PublishedApi usage diagnostic
2016-12-09 11:55:15 +01:00
Alexey Andreev
a2d45153ba
JS: prohibit dynamic on RHS of in and !in operators (see KT-6579)
2016-12-09 12:03:52 +03:00
Alexey Andreev
fc6eaa015f
JS: prohibit using more than one argument in indexed access with dynamic receiver (see KT-6580)
2016-12-09 12:03:51 +03:00
Ilya Gorbunov
e4ab3f3b93
Fix rendered descriptors in test data after enhancing signatures.
2016-12-08 20:34:59 +03:00