Alexey Sedunov
75e76dda54
Kotlin Facet: Do not reset configuration if "Use project settings" is switched on
...
#KT-15735 Fixed
2017-01-16 18:27:30 +03:00
Alexey Sedunov
aeb6af546f
Kotlin Facet: Switch off "Use project settings" on Maven/Gradle import
...
#KT-15682 Fixed
2017-01-16 18:27:29 +03:00
Denis Zharkov
9f217de10b
Write kotlin metadata on class-files for coroutine state machines
...
Otherwise it breaks JPS assumptions, that leads to exceptions like:
Error:Kotlin: [Internal Error] java.lang.AssertionError: Couldn't load KotlinClass from /Users/jetbrains/IdeaProjects/KotlinPlaygroundBeta11/out/production/KotlinPlaygroundBeta11/Counter$both$1.class; it may happen because class doesn't have valid Kotlin annotations
at org.jetbrains.kotlin.build.GeneratedJvmClass.<init>(generatedFiles.kt:36)
at org.jetbrains.kotlin.jps.build.KotlinBuilder.getGeneratedFiles(KotlinBuilder.kt:469)
at org.jetbrains.kotlin.jps.build.KotlinBuilder.doBuild(KotlinBuilder.kt:241)
at org.jetbrains.kotlin.jps.build.KotlinBuilder.build(KotlinBuilder.kt:140)
...
2017-01-16 17:53:15 +03:00
mglukhikh
93b2c56bb4
Fixed KNPE in convert primary constructor to secondary #KT-14745 Fixed
2017-01-16 17:35:51 +03:00
Dmitry Petrov
cd33a40612
KT-15734
...
Combine nullability for nested type alias expansion result.
2017-01-16 17:26:28 +03:00
Dmitry Petrov
954204da82
KT-1560
...
Report warning on extensions shadowed by members.
2017-01-16 17:25:13 +03:00
Nikolay Krasko
ded7d5911b
Fix tests
...
Addition to 5d08e82aaf
2017-01-16 16:05:02 +03:00
Roman Elizarov
25739a08ea
CoroutineContext Key and Element are now inside CoroutineContext interface itself (just like Map.Entry)
...
ContinuationInterceptor companion object is named Key
CoroutineContext.Element property for key is named just key
AbstractCoroutineContextElement implements all of CoroutineContext.Element, including key
2017-01-16 14:33:02 +03:00
Nikolay Krasko
ea7fac07c4
Ban import member intentions from import directives (KT-13710)
...
#KT-13710 Fixed
2017-01-16 13:00:50 +03:00
Nikolay Krasko
ad72918ff9
Remove deprecated ConcurrentWeakValueHashMap
2017-01-16 13:00:48 +03:00
Nikolay Krasko
5d08e82aaf
Fix look up for breakpoint in crossinline lambdas in android (KT-15282)
...
#KT-15282 Fixed
2017-01-16 13:00:46 +03:00
Mikhail Glukhikh
b94c62649a
Create header implementation: select among modules only with configured source roots #KT-15641 Fixed
2017-01-16 11:31:07 +03:00
Ilya Gorbunov
07e529c8ec
Fix completion test: expected appearance of 'takeIf' and 'also'
2017-01-16 09:32:17 +03:00
Ilya Gorbunov
914c55b57f
Refactor: use new functions in stdlib code
2017-01-16 09:31:45 +03:00
Ilya Gorbunov
1ae56c374f
Introduce new function 'takeIf' to replace value with null if it doesn't match the predicate.
...
#KT-7858
2017-01-16 05:58:51 +03:00
Ilya Gorbunov
1ac9815d76
Introduce new scope function: 'also'. Works like 'apply' but with 'it' instead of 'this' inside lambda.
...
#KT-6903
2017-01-16 05:58:51 +03:00
Stanislav Erokhin
0ef1234f2e
Added special error for incorrect KClass type in signatures.
2017-01-16 05:44:46 +03:00
Ilya Gorbunov
3d70d73964
Rename file class CoroutinesLibraryKt to CoroutinesKt
2017-01-15 20:57:11 +03:00
Yan Zhulanow
1fb90ac0fd
Copy compiler arguments from iml even if "Use project settings" checkbox is checked. This is deadly needed for the compiler plugins no-arg and all-open, assuming that the default state of the checkbox is "on". (KT-15686, KT-15686).
...
This is a temporary fix, and it should be reverted when "Use project settings" will be disabled by default in modules imported from external build tools (Maven, Gradle).
2017-01-15 22:11:11 +09:00
Yan Zhulanow
50a7164efe
Kapt3, Gradle: Fix kapt execution in tests. Check filtered dependencies list properly (KT-15459)
2017-01-15 22:11:11 +09:00
Yan Zhulanow
ec291455fa
Kapt3: Replace error/NonExistentClass with the actual type (from PSI) (KT-15421)
2017-01-15 22:11:11 +09:00
Yan Zhulanow
ee57446397
Kapt3, Gradle: Prevent circular dependency between kapt and kotlinCompile tasks (KT-15713)
2017-01-15 22:11:11 +09:00
Yan Zhulanow
c136498cc0
Minor: Add uast-kotlin to 'idea' module classpath (fix failing Lint tests)
2017-01-15 22:11:10 +09:00
Ilya Gorbunov
9f303ed06e
Migrate to new coroutines API, rename Iterator implementation, annotate new API with SinceKotlin.
2017-01-14 20:14:06 +03:00
Ilya Gorbunov
ffb183a2f3
Move a bit of bytecode out of next()
2017-01-14 20:14:05 +03:00
Ilya Gorbunov
560c184fd4
Merge AbstractIterator and SequenceBuilder, remove hasNext call from next.
2017-01-14 20:14:03 +03:00
Ilya Gorbunov
141ad43039
Introduce buildSequence and buildIterator functions based on coroutines.
2017-01-14 20:14:01 +03:00
Ilya Gorbunov
3225ec8935
Provide headers for coroutine building blocks
2017-01-14 20:14:00 +03:00
Denis Zharkov
14f942aca7
Refine ABI for coroutine lambdas
...
Make their invoke work in the same way as any other suspend function:
it should return SUSPENDED_MARKER iff. it indeed became suspended
2017-01-14 19:51:05 +03:00
Denis Zharkov
85a3fefcc6
Get rid of SuspendFunctionX interfaces
...
Use a pair of effectively abstract methods in CoroutineImpl instead
2017-01-14 15:13:37 +03:00
Denis Zharkov
d346cbbe61
Update test data for light-analysis/coroutines
2017-01-14 15:13:37 +03:00
Denis Zharkov
c7f76d7ec8
Minor. Fix tests after CoroutineContext introduction
2017-01-14 15:13:36 +03:00
Denis Zharkov
6a1ad3a279
Get rid of unnecessary additional declarations in tests
2017-01-14 13:24:53 +03:00
Ilya Gorbunov
2dfcb490a5
Fix CoroutineContext tests, update public API dump
2017-01-14 13:24:53 +03:00
Roman Elizarov
8d6a913cee
CoroutineContext and ContinuationInterceptor (instead of dispatcher)
2017-01-14 13:24:53 +03:00
Denis Zharkov
f611e39a69
Fix return keyword completetion tests
...
Now suspendOrReturn is toplevel, so we should explicitly choose "return" item
2017-01-14 13:24:53 +03:00
Denis Zharkov
f56d9cfb26
Ignore failing coroutine related tests on JS
2017-01-14 13:24:53 +03:00
Denis Zharkov
10e67a9b4e
Minor. Run Generate tests
2017-01-14 13:24:53 +03:00
Denis Zharkov
c479aa7d65
JS: simplify how suspend functions inlined
2017-01-14 13:24:53 +03:00
Denis Zharkov
2fcc2bbae0
JS: allow to call suspend function from any position within another suspend function
2017-01-14 13:24:53 +03:00
Denis Zharkov
1f0d0028b2
Minor. Simplify coroutine related code in ExpressionCodegen
...
After previous change (treating suspend function as they return j/l/Object)
most of existing hacks concerning suspend functions' return type
became unnecessary
2017-01-14 13:24:53 +03:00
Denis Zharkov
2286027bed
Fix verify error with 'return when/if/try' in suspend function
...
The problem appears for tail-optimized suspend functions,
we erroneously assumed that when/if/try expressions in tail-call
position have simple types like `I` while actually, they can return SUSPENDED
object, i.e. must have `java/lang/Object` as return type.
But this only concerns branching operations in tail-call position,
so we have to make an additional analysis for remembering whether
a given expression is in a tail-call position.
Also, it's important here that we now assume
the return type of the current function as `java/lang/Object`
that is necessary to avoid wrong checkcasts.
#KT-15364 Fixed
2017-01-14 13:24:53 +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
695b6d9e67
Minor. Add test on local vars of suspend function type
2017-01-14 13:24:53 +03:00
Denis Zharkov
7837d736f7
Merge RestrictedCoroutineImpl into CoroutineImpl
2017-01-14 13:24:53 +03:00
Denis Zharkov
d487c1ef0f
Refine dispatching convention
...
Dispatching happens only via `suspendWithCurrentContinuation` calls
instead of each `resume` call
#KT-15657 Fixed
2017-01-14 13:24:53 +03:00
Denis Zharkov
0240ab0738
Support non-tail suspend calls in JVM back-end
...
#KT-15597 In Progress
2017-01-14 13:24:53 +03:00