Alexander Udalov
e8c9e81235
Minor, move and rename test data directory
2016-12-20 17:29:30 +03:00
Alexander Udalov
ca886ecb8d
Do not report "delegation member hides override" when hidden member is final
...
This situation is erroneous because OVERRIDING_FINAL_MEMBER_BY_DELEGATION is
already reported, no need to report another error
2016-12-20 17:29:17 +03:00
Alexander Udalov
482b43631c
Refactor DelegationChecker and related code
...
- move getDelegates from CodegenUtil to DelegationResolver, reuse it in
DelegationChecker
- use getAllOverriddenDescriptors + filterOutOverridden instead of a manual DFS
2016-12-20 17:28:50 +03:00
Denis Zharkov
2dd7d89048
Fix built-ins overridability issue
...
See the comment for clarification
#KT-15097 Fixed
2016-12-20 16:35:26 +03:00
Alexey Andreev
eb5c79c70d
JS: support int overflow behaviour in augmented assignment
2016-12-20 15:47:38 +03:00
Alexey Andreev
c411a8febe
JS: update tests
2016-12-20 15:47:37 +03:00
Mikhail Zarechenskiy
24d5bdd62c
Fix test data after migration to 'rem'
2016-12-20 15:20:47 +03:00
Mikhail Zarechenskiy
35e732a97f
Place inference from getters under the language feature
2016-12-20 14:14:19 +03:00
Mikhael Bogdanov
6ca1d47207
Published-api checker refactoring, support java package-protected visibility
2016-12-20 09:42:13 +01:00
Dmitry Petrov
0fa2c54ae8
Identity comparison for primitives is deprecated (warning).
...
Identity comparison for primitive vs non-primitive is a warning (due to implicit boxing).
2016-12-20 11:00:58 +03:00
Ilya Gorbunov
10f8e70322
Rename ClosedComparableRange to ClosedFloatingPointRange
2016-12-19 18:36:52 +03:00
Mikhail Glukhikh
5947d49dee
Multi-platform fix: no more errors for top-level impl fun / val / var in IDE
2016-12-19 14:55:49 +03:00
Alexander Udalov
63cc5d872d
Minor, fix test data
2016-12-19 12:15:59 +03:00
Alexander Udalov
da6c3c3231
Support header/impl enum classes
...
- prohibit constructors for header enum classes
- prohibit bodies for header enum entries
- all entries from header enum must be present in impl enum
2016-12-19 11:54:40 +03:00
Alexander Udalov
56d4ff0cad
Support nested header/impl classes
2016-12-19 11:54:38 +03:00
Alexander Udalov
a57455ce62
Relax requirements on function modifiers in multiplatform projects
...
Allow to implement header functions with external/tailrec/inline/infix/operator
functions
2016-12-19 11:53:39 +03:00
Alexander Udalov
0634782e47
Allow open impl class for final header class
2016-12-19 11:50:49 +03:00
Alexander Udalov
546e47dc44
Allow fake overrides and delegates to be impl for header declarations
...
Also fix a bug with matching supertype lists of header/impl classes
2016-12-19 11:50:40 +03:00
Alexander Udalov
7deaf8cc41
Allow impl class to be data class, allow impl constructor properties
2016-12-19 11:50:30 +03:00
Alexander Udalov
3e97c9fff9
Rename platform->header, definition->impl in test data
2016-12-19 11:50:21 +03:00
Denis Zharkov
a1ac77d382
Support async iterator case with coroutines
...
Not all the `hasNext` operators return types is exactly Z,
suspend operators return boxed versions.
So the fix is just coercing result value after invoked function to Z
2016-12-19 11:07:33 +03:00
Denis Zharkov
5dbc04abbb
Refine returns codegen for suspend functions
...
This change should make the logic a bit more simple.
For all suspend functions/coroutines treat them in expression codegen
like they return boxed version of the original type.
Everything works fine then, except Unit type functions:
their bodies must be generated just like they're VOID and then load
Unit on stack manually.
2016-12-19 11:07:32 +03:00
Dmitry Petrov
33ed98a0d3
Update typing rules for class literal expressions.
...
C::class : KClass<C>
expr: T => expr::class : KClass<out T>
NB: this means Obj::class : KClass<out Obj> for object Obj.
2016-12-19 10:41:49 +03:00
Denis Zharkov
5ec62108ee
Rename RestrictsSuspendExtensions -> RestrictsSuspension
2016-12-16 18:56:30 +03:00
Mikhael Bogdanov
761aa9df09
Report error when delegation method hides superttype override
...
#KT-12531 Fixed
2016-12-16 13:17:28 +01:00
Mikhael Bogdanov
686b698d80
Test data update
2016-12-16 13:17:27 +01:00
Denis Zharkov
fa013f0bbf
Add test on inference with SAM adapter
...
#KT-12144 Fixed
2016-12-16 15:01:19 +03:00
Denis Zharkov
01ff975cc0
Minor. Update tests on coroutines
2016-12-16 13:27:11 +03:00
Mikhael Bogdanov
004ff86bec
Fix for KT-14774: Incorrect inner class modifier generated for sealed inner classes
...
#KT-14774 Fixed
2016-12-16 11:22:40 +01:00
Alexander Udalov
49de52e7ef
Fix kotlinFunction for inline reified methods in reflection
...
Inline functions with reified type parameters are generated as private (see
AsmUtil.specialCaseVisibility), so we should treat them as "declared" in
reflection to look them up via getDeclaredMethod, not getMethod
#KT-14721 Fixed
2016-12-16 13:12:41 +03:00
Stanislav Erokhin
d7566d84d0
Fixed testdata.
2016-12-16 02:01:12 +03:00
Stanislav Erokhin
ab53978793
Allowed ast access for some tests.
2016-12-16 00:57:04 +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
Alexey Andreev
e2d969d8b0
JS: implement new coroutine convention
2016-12-15 23:58:20 +03:00
Dmitry Petrov
9fd1ac72a9
Purge remaining traces of @AllowSuspendExtensions.
2016-12-15 23:58:19 +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
d1a3c4c48b
Fix description of -Xcoroutines key
2016-12-15 23:58:11 +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
Denis Zharkov
4737b3dd7f
Update stubBuilder/deserialization tests on coroutines
2016-12-15 23:58:02 +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
Denis Zharkov
845e116aa9
Update bytecodeText and bytecodeListing tests on coroutines
2016-12-15 23:58:00 +03:00
Denis Zharkov
8387d04425
Revert "Add special tests for interceptRun support"
...
This reverts commit 01c21e218a .
2016-12-15 23:57:59 +03:00
Denis Zharkov
7ffefb515f
Update test data for LightAnalysis/Coroutines
2016-12-15 23:57:58 +03:00
Stanislav Erokhin
42440f50dc
Remove soft keyword coroutine & isCoroutine from ValueParameterDescriptor.
2016-12-15 23:57:56 +03:00