[NI] Reanalyze coroutine-block if there is inapplicable call
It's not clear how one should rollback _all_ resolution results if there is inapplicable call. Ideally, such calls should not be available in coroutine block but for now, to have backward compatibility, we'll just reanalyze coroutine block as a usual lambda if there is at least one such call. As a result, also remove diagnostic about non-applicable call as it become useless with current reanalysis #KT-37061 Fixed #KT-32097 Fixed #KT-32203 Fixed #KT-35306 Fixed #KT-36202 Fixed #KT-36220 Fixed #KT-32654 Fixed
This commit is contained in:
+4
-5
@@ -1,7 +1,6 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
@@ -26,12 +25,12 @@ val test2 = generate {
|
||||
notYield(3)
|
||||
}
|
||||
|
||||
val test3 = <!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>generate<!> {
|
||||
val test3 = <!NI;NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>generate<!> {
|
||||
yield(3)
|
||||
<!NI;NON_APPLICABLE_CALL_FOR_BUILDER_INFERENCE!>yieldBarReturnType(3)<!>
|
||||
yieldBarReturnType(3)
|
||||
}
|
||||
|
||||
val test4 = <!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>generate<!> {
|
||||
val test4 = <!NI;NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>generate<!> {
|
||||
yield(3)
|
||||
<!NI;NON_APPLICABLE_CALL_FOR_BUILDER_INFERENCE!>barReturnType()<!>
|
||||
barReturnType()
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
package
|
||||
|
||||
public val test1: kotlin.collections.List<kotlin.Int>
|
||||
public val test2: kotlin.collections.List<kotlin.Int>
|
||||
public val test3: kotlin.collections.List<kotlin.Int>
|
||||
public val test4: kotlin.collections.List<kotlin.Int>
|
||||
public fun </*0*/ S> generate(/*0*/ @kotlin.BuilderInference g: suspend GenericController<S>.() -> kotlin.Unit): kotlin.collections.List<S>
|
||||
|
||||
public final class GenericController</*0*/ T> {
|
||||
public constructor GenericController</*0*/ T>()
|
||||
public final fun barReturnType(): T
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun notYield(/*0*/ t: T): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final suspend fun yield(/*0*/ t: T): kotlin.Unit
|
||||
public final suspend fun yieldBarReturnType(/*0*/ t: T): T
|
||||
}
|
||||
compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/inferCoroutineTypeInOldVersion.kt
Vendored
+2
-3
@@ -1,7 +1,6 @@
|
||||
// !LANGUAGE: -ExperimentalBuilderInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
class Builder<T> {
|
||||
suspend fun add(t: T) {}
|
||||
@@ -22,8 +21,8 @@ val memberWithoutAnn = <!NI;NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, OI;TYPE_
|
||||
<!ILLEGAL_SUSPEND_FUNCTION_CALL!>add<!>(42)
|
||||
}
|
||||
|
||||
val extension = <!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>build<!> {
|
||||
<!NI;NON_APPLICABLE_CALL_FOR_BUILDER_INFERENCE!>extensionAdd("foo")<!>
|
||||
val extension = <!NI;NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>build<!> {
|
||||
extensionAdd("foo")
|
||||
}
|
||||
|
||||
val safeExtension = build {
|
||||
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
package
|
||||
|
||||
public val extension: kotlin.collections.List<kotlin.String>
|
||||
public val member: kotlin.collections.List<kotlin.Int>
|
||||
public val memberWithoutAnn: [ERROR : Type for wrongBuild {
|
||||
add(42)
|
||||
}]
|
||||
public val safeExtension: kotlin.collections.List<kotlin.String>
|
||||
public fun </*0*/ S> build(/*0*/ g: suspend Builder<S>.() -> kotlin.Unit): kotlin.collections.List<S>
|
||||
public fun </*0*/ S> wrongBuild(/*0*/ g: Builder<S>.() -> kotlin.Unit): kotlin.collections.List<S>
|
||||
public fun </*0*/ S> Builder<S>.extensionAdd(/*0*/ s: S): kotlin.Unit
|
||||
public suspend fun </*0*/ S> Builder<S>.safeExtensionAdd(/*0*/ s: S): kotlin.Unit
|
||||
|
||||
public final class Builder</*0*/ T> {
|
||||
public constructor Builder</*0*/ T>()
|
||||
public final suspend fun add(/*0*/ t: T): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
fun aFlow(): Flow<Unit> = channelFlow {
|
||||
awaitClose {
|
||||
}
|
||||
}
|
||||
|
||||
interface Flow<out T> {
|
||||
suspend fun collect(collector: FlowCollector<T>)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <T> channelFlow(@BuilderInference block: suspend ProducerScope<T>.() -> Unit): Flow<T> = TODO()
|
||||
|
||||
interface ProducerScope<in E>
|
||||
|
||||
interface FlowCollector<in T> {
|
||||
suspend fun emit(value: T)
|
||||
}
|
||||
|
||||
suspend fun ProducerScope<*>.awaitClose(block: () -> Unit = {}) {}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package
|
||||
|
||||
public fun aFlow(): Flow<kotlin.Unit>
|
||||
@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ T> channelFlow(/*0*/ @kotlin.BuilderInference block: suspend ProducerScope<T>.() -> kotlin.Unit): Flow<T>
|
||||
public suspend fun ProducerScope<*>.awaitClose(/*0*/ block: () -> kotlin.Unit = ...): kotlin.Unit
|
||||
|
||||
public interface Flow</*0*/ out T> {
|
||||
public abstract suspend fun collect(/*0*/ collector: FlowCollector<T>): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface FlowCollector</*0*/ in T> {
|
||||
public abstract suspend fun emit(/*0*/ value: T): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface ProducerScope</*0*/ in E> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
class Buildee<T>
|
||||
class Builder<T>
|
||||
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
inline fun <T> builder(@BuilderInference block: Builder<T>.() -> Unit): Buildee<T> = TODO()
|
||||
|
||||
private fun <T> Builder<T>.consumer(builder: Builder<T>): Unit = TODO()
|
||||
|
||||
fun <T> Builder<T>.foo(): Buildee<T> = builder {
|
||||
consumer(this)
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package
|
||||
|
||||
@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public inline fun </*0*/ T> builder(/*0*/ @kotlin.BuilderInference block: Builder<T>.() -> kotlin.Unit): Buildee<T>
|
||||
private fun </*0*/ T> Builder<T>.consumer(/*0*/ builder: Builder<T>): kotlin.Unit
|
||||
public fun </*0*/ T> Builder<T>.foo(): Buildee<T>
|
||||
|
||||
public final class Buildee</*0*/ T> {
|
||||
public constructor Buildee</*0*/ T>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Builder</*0*/ T> {
|
||||
public constructor Builder</*0*/ T>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
interface Build<T>
|
||||
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <T> build(@BuilderInference fn: Builder<T>.() -> Unit): Build<T> = TODO()
|
||||
|
||||
// Works completely
|
||||
val build = build {
|
||||
value(1)
|
||||
}
|
||||
|
||||
// Works completely
|
||||
val buildWithWrappedValue = build {
|
||||
wrappedValue(Wrapped(1))
|
||||
}
|
||||
|
||||
// Works completely
|
||||
val buildWithFn = build {
|
||||
valueFn {
|
||||
1
|
||||
}
|
||||
}
|
||||
|
||||
// Works, but the ide complains with "Non-applicable call for builder inference"
|
||||
val buildWithFnWrapped = build {
|
||||
wrappedValueFn {
|
||||
Wrapped(1)
|
||||
}
|
||||
}
|
||||
|
||||
interface Builder<T> {
|
||||
fun value(value: T)
|
||||
fun wrappedValue(value: Wrapped<T>)
|
||||
fun wrappedValueFn(fn: () -> Wrapped<T>)
|
||||
fun valueFn(fn: () -> T)
|
||||
}
|
||||
|
||||
data class Wrapped<T>(val value: T)
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package
|
||||
|
||||
public val build: Build<kotlin.Int>
|
||||
public val buildWithFn: Build<kotlin.Int>
|
||||
public val buildWithFnWrapped: Build<kotlin.Int>
|
||||
public val buildWithWrappedValue: Build<kotlin.Int>
|
||||
@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ T> build(/*0*/ @kotlin.BuilderInference fn: Builder<T>.() -> kotlin.Unit): Build<T>
|
||||
|
||||
public interface Build</*0*/ T> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface Builder</*0*/ T> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public abstract fun value(/*0*/ value: T): kotlin.Unit
|
||||
public abstract fun valueFn(/*0*/ fn: () -> T): kotlin.Unit
|
||||
public abstract fun wrappedValue(/*0*/ value: Wrapped<T>): kotlin.Unit
|
||||
public abstract fun wrappedValueFn(/*0*/ fn: () -> Wrapped<T>): kotlin.Unit
|
||||
}
|
||||
|
||||
public final data class Wrapped</*0*/ T> {
|
||||
public constructor Wrapped</*0*/ T>(/*0*/ value: T)
|
||||
public final val value: T
|
||||
public final operator /*synthesized*/ fun component1(): T
|
||||
public final /*synthesized*/ fun copy(/*0*/ value: T = ...): Wrapped<T>
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
interface Build<T>
|
||||
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <T> build(@BuilderInference fn: Builder<T>.() -> Unit): Build<T> = TODO()
|
||||
|
||||
interface Builder<T> {
|
||||
fun foo(fn: () -> T)
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val bar = build {
|
||||
foo { listOf(1, 2, 3).firstOrNull() }
|
||||
}
|
||||
val baz = build {
|
||||
foo { listOf(1, 2, 3).firstOrNull() ?: 0 }
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package
|
||||
|
||||
@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ T> build(/*0*/ @kotlin.BuilderInference fn: Builder<T>.() -> kotlin.Unit): Build<T>
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public interface Build</*0*/ T> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface Builder</*0*/ T> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public abstract fun foo(/*0*/ fn: () -> T): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !WITH_NEW_INFERENCE
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
class TypeDefinition<KotlinType : Any> {
|
||||
fun parse(parser: (serializedValue: String) -> KotlinType?): Unit = TODO()
|
||||
fun serialize(parser: (value: KotlinType) -> Any?): Unit = TODO()
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <KotlinType : Any> defineType(@BuilderInference definition: TypeDefinition<KotlinType>.() -> Unit): Unit = TODO()
|
||||
|
||||
fun main() {
|
||||
<!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>defineType<!> {
|
||||
parse { it.toInt() }
|
||||
serialize { <!OI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>it<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>toString<!>() }
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package
|
||||
|
||||
@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ KotlinType : kotlin.Any> defineType(/*0*/ @kotlin.BuilderInference definition: TypeDefinition<KotlinType>.() -> kotlin.Unit): kotlin.Unit
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public final class TypeDefinition</*0*/ KotlinType : kotlin.Any> {
|
||||
public constructor TypeDefinition</*0*/ KotlinType : kotlin.Any>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun parse(/*0*/ parser: (serializedValue: kotlin.String) -> KotlinType?): kotlin.Unit
|
||||
public final fun serialize(/*0*/ parser: (value: KotlinType) -> kotlin.Any?): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+2
-3
@@ -1,7 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !WITH_NEW_INFERENCE
|
||||
// FILE: annotation.kt
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
package kotlin
|
||||
|
||||
@@ -29,8 +28,8 @@ val memberWithoutAnn = <!NI;NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, OI;TYPE_
|
||||
add(42)
|
||||
}
|
||||
|
||||
val extension = <!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>build<!> {
|
||||
<!NI;NON_APPLICABLE_CALL_FOR_BUILDER_INFERENCE!>extensionAdd("foo")<!>
|
||||
val extension = <!NI;NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>build<!> {
|
||||
extensionAdd("foo")
|
||||
}
|
||||
|
||||
val safeExtension = build {
|
||||
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
package
|
||||
|
||||
public val extension: kotlin.collections.List<kotlin.String>
|
||||
public val member: kotlin.collections.List<kotlin.Int>
|
||||
public val memberWithoutAnn: [ERROR : Type for wrongBuild {
|
||||
add(42)
|
||||
}]
|
||||
public val safeExtension: kotlin.collections.List<kotlin.String>
|
||||
public fun </*0*/ S> build(/*0*/ @kotlin.BuilderInference g: Builder<S>.() -> kotlin.Unit): kotlin.collections.List<S>
|
||||
public fun </*0*/ S> wrongBuild(/*0*/ g: Builder<S>.() -> kotlin.Unit): kotlin.collections.List<S>
|
||||
public fun </*0*/ S> Builder<S>.extensionAdd(/*0*/ s: S): kotlin.Unit
|
||||
@kotlin.BuilderInference public fun </*0*/ S> Builder<S>.safeExtensionAdd(/*0*/ s: S): kotlin.Unit
|
||||
|
||||
public final class Builder</*0*/ T> {
|
||||
public constructor Builder</*0*/ T>()
|
||||
public final fun add(/*0*/ t: T): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
package kotlin {
|
||||
|
||||
public final annotation class BuilderInference : kotlin.Annotation {
|
||||
public constructor BuilderInference()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -1,6 +1,5 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
// FILE: annotation.kt
|
||||
|
||||
@@ -25,8 +24,8 @@ val normal = generate {
|
||||
yield(42)
|
||||
}
|
||||
|
||||
val extension = <!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>generate<!> {
|
||||
<!NI;NON_APPLICABLE_CALL_FOR_BUILDER_INFERENCE!>extensionYield("foo")<!>
|
||||
val extension = <!NI;NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>generate<!> {
|
||||
extensionYield("foo")
|
||||
}
|
||||
|
||||
val safeExtension = generate {
|
||||
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
package
|
||||
|
||||
public val extension: kotlin.collections.List<kotlin.String>
|
||||
public val normal: kotlin.collections.List<kotlin.Int>
|
||||
public val safeExtension: kotlin.collections.List<kotlin.String>
|
||||
public fun </*0*/ S> generate(/*0*/ @kotlin.BuilderInference g: suspend GenericController<S>.() -> kotlin.Unit): kotlin.collections.List<S>
|
||||
public suspend fun </*0*/ S> GenericController<S>.extensionYield(/*0*/ s: S): kotlin.Unit
|
||||
@kotlin.BuilderInference public suspend fun </*0*/ S> GenericController<S>.safeExtensionYield(/*0*/ s: S): kotlin.Unit
|
||||
|
||||
public final class GenericController</*0*/ T> {
|
||||
public constructor GenericController</*0*/ T>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final suspend fun yield(/*0*/ t: T): kotlin.Unit
|
||||
}
|
||||
|
||||
package kotlin {
|
||||
|
||||
public final annotation class BuilderInference : kotlin.Annotation {
|
||||
public constructor BuilderInference()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user