Fixed testdata.
This commit is contained in:
@@ -1,12 +1,24 @@
|
|||||||
package-fragment kotlin.coroutines
|
package-fragment kotlin.coroutines
|
||||||
|
|
||||||
@kotlin.SinceKotlin(version = "1.1") public inline suspend fun </*0*/ T> suspendWithCurrentContinuation(/*0*/ body: (kotlin.coroutines.Continuation<T>) -> kotlin.Any?): T
|
@kotlin.PublishedApi internal inline suspend fun </*0*/ T> suspendWithCurrentContinuation(/*0*/ body: (kotlin.coroutines.Continuation<T>) -> kotlin.Any?): T
|
||||||
|
|
||||||
@kotlin.SinceKotlin(version = "1.1") public interface Continuation</*0*/ in P> {
|
@kotlin.SinceKotlin(version = "1.1") public interface Continuation</*0*/ in T> {
|
||||||
public abstract fun resume(/*0*/ data: P): kotlin.Unit
|
public abstract fun resume(/*0*/ value: T): kotlin.Unit
|
||||||
public abstract fun resumeWithException(/*0*/ exception: kotlin.Throwable): kotlin.Unit
|
public abstract fun resumeWithException(/*0*/ exception: kotlin.Throwable): kotlin.Unit
|
||||||
}
|
}
|
||||||
|
|
||||||
@kotlin.SinceKotlin(version = "1.1") public object Suspend {
|
@kotlin.SinceKotlin(version = "1.1") public interface ContinuationDispatcher {
|
||||||
/*primary*/ private constructor Suspend()
|
public open fun </*0*/ T> dispatchResume(/*0*/ value: T, /*1*/ continuation: kotlin.coroutines.Continuation<T>): kotlin.Boolean
|
||||||
|
public open fun dispatchResumeWithException(/*0*/ exception: kotlin.Throwable, /*1*/ continuation: kotlin.coroutines.Continuation<*>): kotlin.Boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.SinceKotlin(version = "1.1") public object CoroutineIntrinsics {
|
||||||
|
/*primary*/ private constructor CoroutineIntrinsics()
|
||||||
|
@kotlin.SinceKotlin(version = "1.1") public final val SUSPENDED: kotlin.Any
|
||||||
|
public final fun <get-SUSPENDED>(): kotlin.Any
|
||||||
|
public final inline suspend fun </*0*/ T> suspendCoroutineOrReturn(/*0*/ block: (kotlin.coroutines.Continuation<T>) -> kotlin.Any?): T
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.SinceKotlin(version = "1.1") @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS}) @kotlin.annotation.Retention(value = AnnotationRetention.BINARY) public final annotation class RestrictsSuspendExtensions : kotlin.Annotation {
|
||||||
|
/*primary*/ public constructor RestrictsSuspendExtensions()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
|
||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
// WITH_REFLECT
|
|
||||||
|
|
||||||
import kotlin.test.assertTrue
|
|
||||||
import kotlin.test.assertFalse
|
|
||||||
import kotlin.test.assertEquals
|
|
||||||
|
|
||||||
inline fun Unit.foo(
|
|
||||||
noinline coroutine x: Unit.() -> Continuation<Unit>,
|
|
||||||
vararg vararg: Unit
|
|
||||||
) {}
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val p = Unit::foo.parameters
|
|
||||||
|
|
||||||
assertEquals(2, p.size)
|
|
||||||
|
|
||||||
assertFalse(p[0].isVararg)
|
|
||||||
assertTrue(p[0].isCoroutine)
|
|
||||||
|
|
||||||
assertTrue(p[1].isVararg)
|
|
||||||
assertFalse(p[1].isCoroutine)
|
|
||||||
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
+2
-1
@@ -2,6 +2,7 @@
|
|||||||
// FULL_JDK
|
// FULL_JDK
|
||||||
|
|
||||||
import java.util.concurrent.CompletableFuture
|
import java.util.concurrent.CompletableFuture
|
||||||
|
import kotlin.coroutines.*
|
||||||
|
|
||||||
fun foo(): CompletableFuture<String> = CompletableFuture.supplyAsync { "foo" }
|
fun foo(): CompletableFuture<String> = CompletableFuture.supplyAsync { "foo" }
|
||||||
fun bar(v: String): CompletableFuture<String> = CompletableFuture.supplyAsync { "bar with $v" }
|
fun bar(v: String): CompletableFuture<String> = CompletableFuture.supplyAsync { "bar with $v" }
|
||||||
@@ -43,7 +44,7 @@ fun box(): String {
|
|||||||
|
|
||||||
// LIBRARY CODE
|
// LIBRARY CODE
|
||||||
|
|
||||||
fun <T> async(c: @Suspend() (() -> T)): CompletableFuture<T> {
|
fun <T> async(c: suspend () -> T): CompletableFuture<T> {
|
||||||
val future = CompletableFuture<T>()
|
val future = CompletableFuture<T>()
|
||||||
c.startCoroutine(object : Continuation<T> {
|
c.startCoroutine(object : Continuation<T> {
|
||||||
override fun resume(data: T) {
|
override fun resume(data: T) {
|
||||||
|
|||||||
+3
-2
@@ -2,6 +2,7 @@
|
|||||||
// FULL_JDK
|
// FULL_JDK
|
||||||
|
|
||||||
import java.util.concurrent.CompletableFuture
|
import java.util.concurrent.CompletableFuture
|
||||||
|
import kotlin.coroutines.*
|
||||||
|
|
||||||
fun exception(v: String): CompletableFuture<String> = CompletableFuture.supplyAsync { throw RuntimeException(v) }
|
fun exception(v: String): CompletableFuture<String> = CompletableFuture.supplyAsync { throw RuntimeException(v) }
|
||||||
|
|
||||||
@@ -40,9 +41,9 @@ fun box(): String {
|
|||||||
return "No exception"
|
return "No exception"
|
||||||
}
|
}
|
||||||
|
|
||||||
fun <T> async(c: @Suspend() (() -> T)): CompletableFuture<T> {
|
fun <T> async(c: suspend () -> T): CompletableFuture<T> {
|
||||||
val future = CompletableFuture<T>()
|
val future = CompletableFuture<T>()
|
||||||
c.startContinuation(object : Continuation<T> {
|
c.startCoroutine(object : Continuation<T> {
|
||||||
override fun resume(data: T) {
|
override fun resume(data: T) {
|
||||||
future.complete(data)
|
future.complete(data)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
public final class Controller {
|
public final class Controller {
|
||||||
private @org.jetbrains.annotations.NotNull field log: java.lang.String
|
private @org.jetbrains.annotations.NotNull field log: java.lang.String
|
||||||
private field resumeIndex: int
|
private field resumeIndex: int
|
||||||
@@ -17,15 +18,15 @@ public final class CoroutineUtilKt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public final class DispatchResumeKt {
|
||||||
|
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||||
|
public final static @org.jetbrains.annotations.NotNull method test(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function2): java.lang.String
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public final class EmptyContinuation {
|
public final class EmptyContinuation {
|
||||||
public final static field INSTANCE: EmptyContinuation
|
public final static field INSTANCE: EmptyContinuation
|
||||||
private method <init>(): void
|
private method <init>(): void
|
||||||
public method resume(@org.jetbrains.annotations.Nullable p0: java.lang.Object): void
|
public method resume(@org.jetbrains.annotations.Nullable p0: java.lang.Object): void
|
||||||
public method resumeWithException(@org.jetbrains.annotations.NotNull p0: java.lang.Throwable): void
|
public method resumeWithException(@org.jetbrains.annotations.NotNull p0: java.lang.Throwable): void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public final class InterceptResumeKt {
|
|
||||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
|
||||||
public final static @org.jetbrains.annotations.NotNull method test(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function2): java.lang.String
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,14 +1,21 @@
|
|||||||
// FILE: A.kt
|
// FILE: A.kt
|
||||||
package a
|
package a
|
||||||
|
|
||||||
|
import kotlin.coroutines.*
|
||||||
|
|
||||||
class Controller {
|
class Controller {
|
||||||
suspend fun suspendHere() = CoroutineIntrinsics.suspendCoroutineOrReturn<String> { x ->
|
suspend fun suspendHere() = CoroutineIntrinsics.suspendCoroutineOrReturn<String> { x ->
|
||||||
x.resume("OK")
|
x.resume("OK")
|
||||||
Suspend
|
CoroutineIntrinsics.SUSPENDED
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {
|
fun builder(c: suspend Controller.() -> Unit) {
|
||||||
c(Controller()).resume(Unit)
|
c.startCoroutine(Controller(), object : Continuation<Unit> {
|
||||||
|
override fun resume(value: Unit) {}
|
||||||
|
|
||||||
|
override fun resumeWithException(exception: Throwable) {}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// FILE: B.kt
|
// FILE: B.kt
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
package test
|
package test
|
||||||
|
|
||||||
fun test1(): suspend () -> Unit = null!!
|
fun test1(): suspend () -> Unit = null!!
|
||||||
fun test2(): suspend (Int, String) -> Int = null!!
|
fun test2(): suspend Int.() -> Int = null!!
|
||||||
fun test3(): suspend Int.(String) -> Int = null!!
|
fun test3(): List<suspend () -> Unit> = null!!
|
||||||
fun test4(): List<suspend () -> Unit> = null!!
|
fun test4(): suspend () -> (suspend () -> Unit) = null!!
|
||||||
fun test5(): suspend (suspend () -> Unit) -> Unit = null!!
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package test
|
package test
|
||||||
|
|
||||||
public fun test1(): suspend () -> kotlin.Unit
|
public fun test1(): suspend () -> kotlin.Unit
|
||||||
public fun test2(): suspend (kotlin.Int, kotlin.String) -> kotlin.Int
|
public fun test2(): suspend kotlin.Int.() -> kotlin.Int
|
||||||
public fun test3(): suspend kotlin.Int.(kotlin.String) -> kotlin.Int
|
public fun test3(): kotlin.collections.List<suspend () -> kotlin.Unit>
|
||||||
public fun test4(): kotlin.collections.List<suspend () -> kotlin.Unit>
|
public fun test4(): suspend () -> suspend () -> kotlin.Unit
|
||||||
public fun test5(): suspend (suspend () -> kotlin.Unit) -> kotlin.Unit
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import kotlin.coroutines.*
|
||||||
|
|
||||||
header fun f1()
|
header fun f1()
|
||||||
|
|
||||||
header fun f2(name: String)
|
header fun f2(name: String)
|
||||||
@@ -32,5 +34,5 @@ header inline fun f19(crossinline s: () -> Unit)
|
|||||||
header inline fun f20(s: () -> Unit)
|
header inline fun f20(s: () -> Unit)
|
||||||
header inline fun f21(noinline s: () -> Unit)
|
header inline fun f21(noinline s: () -> Unit)
|
||||||
header inline fun f22(s: () -> Unit)
|
header inline fun f22(s: () -> Unit)
|
||||||
header fun f23(coroutine c: Unit.() -> Continuation<Unit>)
|
header fun f23(c: suspend Unit.() -> Unit)
|
||||||
header fun f24(c: Unit.() -> Continuation<Unit>)
|
header fun f24(c: Unit.() -> Unit)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import kotlin.coroutines.*
|
||||||
|
|
||||||
impl fun f1(): String = ""
|
impl fun f1(): String = ""
|
||||||
|
|
||||||
impl fun f2(otherName: String) {}
|
impl fun f2(otherName: String) {}
|
||||||
@@ -32,5 +34,5 @@ impl inline fun f19(s: () -> Unit) {}
|
|||||||
impl inline fun f20(crossinline s: () -> Unit) {}
|
impl inline fun f20(crossinline s: () -> Unit) {}
|
||||||
impl inline fun f21(s: () -> Unit) {}
|
impl inline fun f21(s: () -> Unit) {}
|
||||||
impl inline fun f22(noinline s: () -> Unit) {}
|
impl inline fun f22(noinline s: () -> Unit) {}
|
||||||
impl fun f23(c: Unit.() -> Continuation<Unit>) {}
|
impl fun f23(c: Unit.() -> Unit) {}
|
||||||
impl fun f24(coroutine c: Unit.() -> Continuation<Unit>) {}
|
impl fun f24(c: suspend Unit.() -> Unit) {}
|
||||||
|
|||||||
@@ -5,202 +5,202 @@ Output:
|
|||||||
-- JVM --
|
-- JVM --
|
||||||
Exit code: COMPILATION_ERROR
|
Exit code: COMPILATION_ERROR
|
||||||
Output:
|
Output:
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:1:1: error: header declaration 'f1' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:3:1: error: header declaration 'f1' has no implementation in module
|
||||||
The following declaration is incompatible because return type is different:
|
The following declaration is incompatible because return type is different:
|
||||||
public impl fun f1(): String
|
public impl fun f1(): String
|
||||||
|
|
||||||
header fun f1()
|
header fun f1()
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:3:1: error: header declaration 'f2' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:5:1: error: header declaration 'f2' has no implementation in module
|
||||||
The following declaration is incompatible because parameter names are different:
|
The following declaration is incompatible because parameter names are different:
|
||||||
public impl fun f2(otherName: String): Unit
|
public impl fun f2(otherName: String): Unit
|
||||||
|
|
||||||
header fun f2(name: String)
|
header fun f2(name: String)
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:5:1: error: header declaration 'f3' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:7:1: error: header declaration 'f3' has no implementation in module
|
||||||
The following declaration is incompatible because parameter types are different:
|
The following declaration is incompatible because parameter types are different:
|
||||||
public impl fun f3(name: Double): Unit
|
public impl fun f3(name: Double): Unit
|
||||||
|
|
||||||
header fun f3(name: String)
|
header fun f3(name: String)
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:6:1: error: header declaration 'f3ext' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:8:1: error: header declaration 'f3ext' has no implementation in module
|
||||||
The following declaration is incompatible because parameter types are different:
|
The following declaration is incompatible because parameter types are different:
|
||||||
public impl fun Double.f3ext(): Unit
|
public impl fun Double.f3ext(): Unit
|
||||||
|
|
||||||
header fun String.f3ext()
|
header fun String.f3ext()
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:8:1: error: header declaration 'f4' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:10:1: error: header declaration 'f4' has no implementation in module
|
||||||
The following declaration is incompatible because parameter shapes are different (extension vs non-extension):
|
The following declaration is incompatible because parameter shapes are different (extension vs non-extension):
|
||||||
public impl fun String.f4(): Unit
|
public impl fun String.f4(): Unit
|
||||||
|
|
||||||
header fun f4(name: String)
|
header fun f4(name: String)
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:10:1: error: header declaration 'f5' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:12:1: error: header declaration 'f5' has no implementation in module
|
||||||
The following declaration is incompatible because parameter shapes are different (extension vs non-extension):
|
The following declaration is incompatible because parameter shapes are different (extension vs non-extension):
|
||||||
public impl fun f5(name: String): Unit
|
public impl fun f5(name: String): Unit
|
||||||
|
|
||||||
header fun String.f5()
|
header fun String.f5()
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:12:1: error: header declaration 'f6' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:14:1: error: header declaration 'f6' has no implementation in module
|
||||||
The following declaration is incompatible because number of value parameters is different:
|
The following declaration is incompatible because number of value parameters is different:
|
||||||
public impl fun f6(p2: Int): Unit
|
public impl fun f6(p2: Int): Unit
|
||||||
|
|
||||||
header fun f6(p1: String, p2: Int)
|
header fun f6(p1: String, p2: Int)
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:14:1: error: header declaration 'f7' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:16:1: error: header declaration 'f7' has no implementation in module
|
||||||
The following declaration is incompatible because number of type parameters is different:
|
The following declaration is incompatible because number of type parameters is different:
|
||||||
public impl fun <K, V> f7(): Unit
|
public impl fun <K, V> f7(): Unit
|
||||||
|
|
||||||
header fun <T> f7()
|
header fun <T> f7()
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:16:1: error: header declaration 'f8' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:18:1: error: header declaration 'f8' has no implementation in module
|
||||||
The following declaration is incompatible because visibility is different:
|
The following declaration is incompatible because visibility is different:
|
||||||
public impl fun f8(): Unit
|
public impl fun f8(): Unit
|
||||||
|
|
||||||
internal header fun f8()
|
internal header fun f8()
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:17:1: error: header declaration 'f9' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:19:1: error: header declaration 'f9' has no implementation in module
|
||||||
The following declaration is incompatible because visibility is different:
|
The following declaration is incompatible because visibility is different:
|
||||||
internal impl fun f9(): Unit
|
internal impl fun f9(): Unit
|
||||||
|
|
||||||
private header fun f9()
|
private header fun f9()
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:18:1: error: header declaration 'f10' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:20:1: error: header declaration 'f10' has no implementation in module
|
||||||
The following declaration is incompatible because visibility is different:
|
The following declaration is incompatible because visibility is different:
|
||||||
private impl fun f10(): Unit
|
private impl fun f10(): Unit
|
||||||
|
|
||||||
public header fun f10()
|
public header fun f10()
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:24:1: error: header declaration 'f14' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:26:1: error: header declaration 'f14' has no implementation in module
|
||||||
The following declaration is incompatible because some type parameter is reified in one declaration and non-reified in the other:
|
The following declaration is incompatible because some type parameter is reified in one declaration and non-reified in the other:
|
||||||
public inline impl fun <reified X> f14(): Unit
|
public inline impl fun <reified X> f14(): Unit
|
||||||
|
|
||||||
header inline fun <X> f14()
|
header inline fun <X> f14()
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:25:1: error: header declaration 'f15' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:27:1: error: header declaration 'f15' has no implementation in module
|
||||||
The following declaration is incompatible because some type parameter is reified in one declaration and non-reified in the other:
|
The following declaration is incompatible because some type parameter is reified in one declaration and non-reified in the other:
|
||||||
public inline impl fun <Y> f15(): Unit
|
public inline impl fun <Y> f15(): Unit
|
||||||
|
|
||||||
header inline fun <reified Y> f15()
|
header inline fun <reified Y> f15()
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:27:1: error: header declaration 'f16' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:29:1: error: header declaration 'f16' has no implementation in module
|
||||||
The following declaration is incompatible because some parameters have default values:
|
The following declaration is incompatible because some parameters have default values:
|
||||||
public impl fun f16(s: String = ...): Unit
|
public impl fun f16(s: String = ...): Unit
|
||||||
|
|
||||||
header fun f16(s: String)
|
header fun f16(s: String)
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:29:1: error: header declaration 'f17' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:31:1: error: header declaration 'f17' has no implementation in module
|
||||||
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
||||||
public impl fun f17(s: Array<out String>): Unit
|
public impl fun f17(s: Array<out String>): Unit
|
||||||
|
|
||||||
header fun f17(vararg s: String)
|
header fun f17(vararg s: String)
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:30:1: error: header declaration 'f18' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:32:1: error: header declaration 'f18' has no implementation in module
|
||||||
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
||||||
public impl fun f18(vararg s: String): Unit
|
public impl fun f18(vararg s: String): Unit
|
||||||
|
|
||||||
header fun f18(s: Array<out String>)
|
header fun f18(s: Array<out String>)
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:31:1: error: header declaration 'f19' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:33:1: error: header declaration 'f19' has no implementation in module
|
||||||
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
||||||
public inline impl fun f19(s: () -> Unit): Unit
|
public inline impl fun f19(s: () -> Unit): Unit
|
||||||
|
|
||||||
header inline fun f19(crossinline s: () -> Unit)
|
header inline fun f19(crossinline s: () -> Unit)
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:32:1: error: header declaration 'f20' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:34:1: error: header declaration 'f20' has no implementation in module
|
||||||
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
||||||
public inline impl fun f20(crossinline s: () -> Unit): Unit
|
public inline impl fun f20(crossinline s: () -> Unit): Unit
|
||||||
|
|
||||||
header inline fun f20(s: () -> Unit)
|
header inline fun f20(s: () -> Unit)
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:33:1: error: header declaration 'f21' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:35:1: error: header declaration 'f21' has no implementation in module
|
||||||
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
||||||
public inline impl fun f21(s: () -> Unit): Unit
|
public inline impl fun f21(s: () -> Unit): Unit
|
||||||
|
|
||||||
header inline fun f21(noinline s: () -> Unit)
|
header inline fun f21(noinline s: () -> Unit)
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:34:1: error: header declaration 'f22' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:36:1: error: header declaration 'f22' has no implementation in module
|
||||||
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
||||||
public inline impl fun f22(noinline s: () -> Unit): Unit
|
public inline impl fun f22(noinline s: () -> Unit): Unit
|
||||||
|
|
||||||
header inline fun f22(s: () -> Unit)
|
header inline fun f22(s: () -> Unit)
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:35:1: error: header declaration 'f23' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:37:1: error: header declaration 'f23' has no implementation in module
|
||||||
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
The following declaration is incompatible because parameter types are different:
|
||||||
public impl fun f23(c: Unit.() -> Continuation<Unit>): Unit
|
public impl fun f23(c: Unit.() -> Unit): Unit
|
||||||
|
|
||||||
header fun f23(coroutine c: Unit.() -> Continuation<Unit>)
|
header fun f23(c: suspend Unit.() -> Unit)
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:36:1: error: header declaration 'f24' has no implementation in module
|
compiler/testData/multiplatform/incompatibleCallables/common.kt:38:1: error: header declaration 'f24' has no implementation in module
|
||||||
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
The following declaration is incompatible because parameter types are different:
|
||||||
public impl fun f24(coroutine c: Unit.() -> Continuation<Unit>): Unit
|
public impl fun f24(c: suspend Unit.() -> Unit): Unit
|
||||||
|
|
||||||
header fun f24(c: Unit.() -> Continuation<Unit>)
|
header fun f24(c: Unit.() -> Unit)
|
||||||
^
|
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:1:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
|
||||||
impl fun f1(): String = ""
|
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:3:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:3:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl fun f2(otherName: String) {}
|
impl fun f1(): String = ""
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:5:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:5:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
|
impl fun f2(otherName: String) {}
|
||||||
|
^
|
||||||
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:7:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl fun f3(name: Double) {}
|
impl fun f3(name: Double) {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:6:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:8:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl fun Double.f3ext() {}
|
impl fun Double.f3ext() {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:8:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:10:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl fun String.f4() {}
|
impl fun String.f4() {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:10:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:12:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl fun f5(name: String) {}
|
impl fun f5(name: String) {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:12:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:14:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl fun f6(p2: Int) {}
|
impl fun f6(p2: Int) {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:14:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:16:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl fun <K, V> f7() {}
|
impl fun <K, V> f7() {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:16:8: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:18:8: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
public impl fun f8() {}
|
public impl fun f8() {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:17:10: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:19:10: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
internal impl fun f9() {}
|
internal impl fun f9() {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:18:9: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:20:9: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
private impl fun f10() {}
|
private impl fun f10() {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:24:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:26:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl inline fun <reified X> f14() {}
|
impl inline fun <reified X> f14() {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:25:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:27:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl inline fun <Y> f15() {}
|
impl inline fun <Y> f15() {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:27:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:29:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl fun f16(s: String = "") {}
|
impl fun f16(s: String = "") {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:29:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:31:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl fun f17(s: Array<out String>) {}
|
impl fun f17(s: Array<out String>) {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:30:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:32:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl fun f18(vararg s: String) {}
|
impl fun f18(vararg s: String) {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:31:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:33:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl inline fun f19(s: () -> Unit) {}
|
impl inline fun f19(s: () -> Unit) {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:32:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:34:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl inline fun f20(crossinline s: () -> Unit) {}
|
impl inline fun f20(crossinline s: () -> Unit) {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:33:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:35:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl inline fun f21(s: () -> Unit) {}
|
impl inline fun f21(s: () -> Unit) {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:34:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:36:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl inline fun f22(noinline s: () -> Unit) {}
|
impl inline fun f22(noinline s: () -> Unit) {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:35:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:37:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl fun f23(c: Unit.() -> Continuation<Unit>) {}
|
impl fun f23(c: Unit.() -> Unit) {}
|
||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:36:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:38:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||||
impl fun f24(coroutine c: Unit.() -> Continuation<Unit>) {}
|
impl fun f24(c: suspend Unit.() -> Unit) {}
|
||||||
^
|
^
|
||||||
|
|
||||||
|
|||||||
-6
@@ -13831,12 +13831,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("parameters.kt")
|
|
||||||
public void testParameters() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/parameters.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("properties.kt")
|
@TestMetadata("properties.kt")
|
||||||
public void testProperties() throws Exception {
|
public void testProperties() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/properties.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/properties.kt");
|
||||||
|
|||||||
@@ -13831,12 +13831,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("parameters.kt")
|
|
||||||
public void testParameters() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/parameters.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("properties.kt")
|
@TestMetadata("properties.kt")
|
||||||
public void testProperties() throws Exception {
|
public void testProperties() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/properties.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/properties.kt");
|
||||||
|
|||||||
@@ -13831,12 +13831,6 @@ public class LightAnalysisModeCodegenTestGenerated extends AbstractLightAnalysis
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("parameters.kt")
|
|
||||||
public void testParameters() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/parameters.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("properties.kt")
|
@TestMetadata("properties.kt")
|
||||||
public void testProperties() throws Exception {
|
public void testProperties() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/properties.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/properties.kt");
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
<node text="Retention (kotlin.annotation)"/>
|
<node text="Retention (kotlin.annotation)"/>
|
||||||
<node text="Repeatable (kotlin.annotation)"/>
|
<node text="Repeatable (kotlin.annotation)"/>
|
||||||
<node text="MustBeDocumented (kotlin.annotation)"/>
|
<node text="MustBeDocumented (kotlin.annotation)"/>
|
||||||
|
<node text="RestrictsSuspendExtensions (kotlin.coroutines)"/>
|
||||||
<node text="ExtensionFunctionType (kotlin)"/>
|
<node text="ExtensionFunctionType (kotlin)"/>
|
||||||
<node text="Metadata (kotlin)"/>
|
<node text="Metadata (kotlin)"/>
|
||||||
<node text="DslMarker (kotlin)"/>
|
<node text="DslMarker (kotlin)"/>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ Exit code: ADDITIONAL_PASS_REQUIRED
|
|||||||
Cleaning output files:
|
Cleaning output files:
|
||||||
out/production/module/META-INF/module.kotlin_module
|
out/production/module/META-INF/module.kotlin_module
|
||||||
out/production/module/usage/Controller.class
|
out/production/module/usage/Controller.class
|
||||||
|
out/production/module/usage/UsageKt$async$1.class
|
||||||
out/production/module/usage/UsageKt$bar$1.class
|
out/production/module/usage/UsageKt$bar$1.class
|
||||||
out/production/module/usage/UsageKt.class
|
out/production/module/usage/UsageKt.class
|
||||||
End of files
|
End of files
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
package usage
|
package usage
|
||||||
|
import kotlin.coroutines.*
|
||||||
|
|
||||||
fun async(coroutine x: Controller.() -> Continuation<Unit>) {
|
fun async(x: suspend Controller.() -> Unit) {
|
||||||
x(Controller()).resume(Unit)
|
x.startCoroutine(Controller(), object : Continuation<Unit> {
|
||||||
|
override fun resume(value: Unit) {}
|
||||||
|
|
||||||
|
override fun resumeWithException(exception: Throwable) {}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
class Controller {
|
class Controller {
|
||||||
|
|||||||
-12
@@ -17318,18 +17318,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("parameters.kt")
|
|
||||||
public void testParameters() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/parameters.kt");
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("properties.kt")
|
@TestMetadata("properties.kt")
|
||||||
public void testProperties() throws Exception {
|
public void testProperties() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/properties.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/properties.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user