[NI] Fix composite substitution for stubbed type in builder-inference
#KT-32038 Fixed
This commit is contained in:
+29
@@ -0,0 +1,29 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
interface MyFlow<out T>
|
||||
interface MyFlowCollector<in T>
|
||||
|
||||
fun <F> flow(@BuilderInference block: MyFlowCollector<F>.() -> Unit): MyFlow<F> = TODO()
|
||||
|
||||
interface SendChannel<in E> {
|
||||
fun send(element: E)
|
||||
}
|
||||
|
||||
fun <P> produce(@BuilderInference block: SendChannel<P>.() -> Unit) {}
|
||||
|
||||
fun <C> MyFlow<C>.collect(action: (C) -> Unit) {}
|
||||
|
||||
private fun <T> MyFlow<T>.idScoped(): MyFlow<T> {
|
||||
return flow {
|
||||
produce {
|
||||
collect {
|
||||
send(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ F> flow(/*0*/ @kotlin.BuilderInference block: MyFlowCollector<F>.() -> kotlin.Unit): MyFlow<F>
|
||||
public fun </*0*/ P> produce(/*0*/ @kotlin.BuilderInference block: SendChannel<P>.() -> kotlin.Unit): kotlin.Unit
|
||||
public fun </*0*/ C> MyFlow<C>.collect(/*0*/ action: (C) -> kotlin.Unit): kotlin.Unit
|
||||
private fun </*0*/ T> MyFlow<T>.idScoped(): MyFlow<T>
|
||||
|
||||
public interface MyFlow</*0*/ out 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 MyFlowCollector</*0*/ in 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 SendChannel</*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 abstract fun send(/*0*/ element: E): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user