Files
Denis Zharkov 944b0d058a Allow calling some pieces of the experimental coroutine API
- Calling suspend functions is allowed
- Presence of suspend function type still makes declaration
unusable unless it belongs to a value parameter as a top-level type
containing less then three parameters

Still, warning should be emitted because they will become unsupported in 1.4

 #KT-25683 In Progress
2018-08-21 13:44:02 +03:00

31 lines
2.7 KiB
Plaintext
Vendored

warning: language version 1.3 is experimental, there are no backwards compatibility guarantees for new language and library features
warning: runtime JAR files in the classpath should have the same version. These files were found in the classpath:
$DIST_DIR$/kotlin-stdlib-coroutines.jar (version 1.3)
$PROJECT_DIR$/lib/kotlin-stdlib.jar (version 1.2)
$PROJECT_DIR$/lib/kotlin-script-runtime.jar (version 1.2)
$PROJECT_DIR$/lib/kotlin-reflect.jar (version 1.2)
warning: consider providing an explicit dependency on kotlin-reflect 1.3 to prevent strange errors
warning: some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath
compiler/testData/compileKotlinAgainstCustomBinaries/experimentalCoroutineCallFromRelease/release.kt:2:5: error: using 'constructor WithTypeParameter<T : suspend () -> Unit>()' is an error. Experimental coroutine cannot be used with API version 1.3
WithTypeParameter<suspend () -> Unit>()
^
compiler/testData/compileKotlinAgainstCustomBinaries/experimentalCoroutineCallFromRelease/release.kt:3:5: error: using 'returnsSuspend(): suspend () -> Unit' is an error. Experimental coroutine cannot be used with API version 1.3
returnsSuspend()
^
compiler/testData/compileKotlinAgainstCustomBinaries/experimentalCoroutineCallFromRelease/release.kt:4:5: error: using 'withTypeParameter(): () -> Unit' is an error. Experimental coroutine cannot be used with API version 1.3
withTypeParameter<suspend () -> Unit>()
^
compiler/testData/compileKotlinAgainstCustomBinaries/experimentalCoroutineCallFromRelease/release.kt:6:5: error: using 'suspendFunctionNested(List<suspend () -> Unit>): Unit' is an error. Experimental coroutine cannot be used with API version 1.3
suspendFunctionNested(listOf(suspend { }))
^
compiler/testData/compileKotlinAgainstCustomBinaries/experimentalCoroutineCallFromRelease/release.kt:7:5: error: using 'suspendFunctionNestedInFunctionType((suspend () -> Unit) -> Unit): Unit' is an error. Experimental coroutine cannot be used with API version 1.3
suspendFunctionNestedInFunctionType {}
^
compiler/testData/compileKotlinAgainstCustomBinaries/experimentalCoroutineCallFromRelease/release.kt:8:5: error: using 'suspendFunctionType3(suspend (Int, Int, Int) -> Unit): Unit' is an error. Experimental coroutine cannot be used with API version 1.3
suspendFunctionType3 { x, y, z -> }
^
compiler/testData/compileKotlinAgainstCustomBinaries/experimentalCoroutineCallFromRelease/release.kt:10:5: error: using 'suspendVarargs(vararg suspend () -> Unit): Unit' is an error. Experimental coroutine cannot be used with API version 1.3
suspendVarargs({}, {})
^
COMPILATION_ERROR