[NI] Fix exception on capturing stub type from coroutine-inference
#KT-30853 Fixed
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
suspend fun main() {
|
||||
iFlow { emit(1) }
|
||||
}
|
||||
|
||||
|
||||
@UseExperimental(ExperimentalTypeInference::class)
|
||||
fun <K> iFlow(@BuilderInference block: suspend iFlowCollector<in K>.() -> Unit): iFlow<K> = TODO()
|
||||
|
||||
interface iFlowCollector<S> {
|
||||
suspend fun emit(value: S)
|
||||
}
|
||||
|
||||
interface iFlow<out V>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package
|
||||
|
||||
@kotlin.UseExperimental(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ K> iFlow(/*0*/ @kotlin.BuilderInference block: suspend iFlowCollector<in K>.() -> kotlin.Unit): iFlow<K>
|
||||
public suspend fun main(): kotlin.Unit
|
||||
|
||||
public interface iFlow</*0*/ out V> {
|
||||
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 iFlowCollector</*0*/ S> {
|
||||
public abstract suspend fun emit(/*0*/ value: S): 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
|
||||
}
|
||||
Reference in New Issue
Block a user