[FE] Remove BuilderInference annotation from tests

This commit is contained in:
Victor Petukhov
2022-06-18 18:53:09 +02:00
parent dbe7f3ab0d
commit fa7809cd80
221 changed files with 366 additions and 348 deletions
@@ -2,8 +2,6 @@ FILE fqName:<root> fileName:/kt47082.kt
FUN name:produce visibility:public modality:FINAL <E> (block:@[ExtensionFunctionType] kotlin.Function1<<root>.Derived<E of <root>.produce>, kotlin.Unit>) returnType:E of <root>.produce
TYPE_PARAMETER name:E index:0 variance: superTypes:[kotlin.Any?] reified:false
VALUE_PARAMETER name:block index:0 type:@[ExtensionFunctionType] kotlin.Function1<<root>.Derived<E of <root>.produce>, kotlin.Unit>
annotations:
BuilderInference
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun produce <E> (block: @[ExtensionFunctionType] kotlin.Function1<<root>.Derived<E of <root>.produce>, kotlin.Unit>): E of <root>.produce declared in <root>'
TYPE_OP type=E of <root>.produce origin=CAST typeOperand=E of <root>.produce
+1 -1
View File
@@ -5,7 +5,7 @@
import kotlin.experimental.ExperimentalTypeInference
fun <E> produce(@BuilderInference block: Derived<E>.() -> Unit): E = null as E
fun <E> produce(block: Derived<E>.() -> Unit): E = null as E
interface Derived<in E> : Base<E>
+1 -1
View File
@@ -1,4 +1,4 @@
fun <E : Any?> produce(@BuilderInference block: @ExtensionFunctionType Function1<Derived<E>, Unit>): E {
fun <E : Any?> produce(block: @ExtensionFunctionType Function1<Derived<E>, Unit>): E {
return null as E
}
@@ -4,8 +4,6 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
OptIn(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalTypeInference modality:FINAL visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass<kotlin.experimental.ExperimentalTypeInference>])
TYPE_PARAMETER name:R index:0 variance: superTypes:[kotlin.Any?] reified:false
VALUE_PARAMETER name:block index:0 type:@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction2<<root>.CoroutineScope, <root>.FlowCollector<R of <root>.scopedFlow>, kotlin.Unit>
annotations:
BuilderInference
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun scopedFlow <R> (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction2<<root>.CoroutineScope, <root>.FlowCollector<R of <root>.scopedFlow>, kotlin.Unit>): <root>.Flow<R of <root>.scopedFlow> declared in <root>'
CALL 'public final fun flow <T> (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.FlowCollector<T of <root>.flow>, kotlin.Unit>): <root>.Flow<T of <root>.flow> declared in <root>' type=<root>.Flow<R of <root>.scopedFlow> origin=null
@@ -56,8 +54,6 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
OptIn(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalTypeInference modality:FINAL visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass<kotlin.experimental.ExperimentalTypeInference>])
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
VALUE_PARAMETER name:block index:0 type:@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.FlowCollector<T of <root>.unsafeFlow>, kotlin.Unit> [crossinline]
annotations:
BuilderInference
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun unsafeFlow <T> (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.FlowCollector<T of <root>.unsafeFlow>, kotlin.Unit>): <root>.Flow<T of <root>.unsafeFlow> [inline] declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
@@ -196,8 +192,6 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
OptIn(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalTypeInference modality:FINAL visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass<kotlin.experimental.ExperimentalTypeInference>])
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
VALUE_PARAMETER name:block index:0 type:@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.FlowCollector<T of <root>.flow>, kotlin.Unit>
annotations:
BuilderInference
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun flow <T> (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.FlowCollector<T of <root>.flow>, kotlin.Unit>): <root>.Flow<T of <root>.flow> declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
@@ -206,8 +200,6 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
OptIn(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalTypeInference modality:FINAL visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass<kotlin.experimental.ExperimentalTypeInference>])
TYPE_PARAMETER name:R index:0 variance: superTypes:[kotlin.Any?] reified:false
VALUE_PARAMETER name:block index:0 type:@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.CoroutineScope, R of <root>.flowScope>
annotations:
BuilderInference
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun flowScope <R> (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.CoroutineScope, R of <root>.flowScope>): R of <root>.flowScope [suspend] declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
@@ -315,8 +307,6 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
TYPE_PARAMETER name:E index:0 variance: superTypes:[kotlin.Any?] reified:false
$receiver: VALUE_PARAMETER name:<this> type:<root>.CoroutineScope
VALUE_PARAMETER name:block index:0 type:@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.ProducerScope<E of <root>.produce>, kotlin.Unit>
annotations:
BuilderInference
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun produce <E> (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.ProducerScope<E of <root>.produce>, kotlin.Unit>): <root>.ReceiveChannel<E of <root>.produce> declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
@@ -1,5 +1,5 @@
@OptIn(markerClass = [ExperimentalTypeInference::class])
fun <R : Any?> scopedFlow(@BuilderInference block: @ExtensionFunctionType SuspendFunction2<CoroutineScope, FlowCollector<R>, Unit>): Flow<R> {
fun <R : Any?> scopedFlow(block: @ExtensionFunctionType SuspendFunction2<CoroutineScope, FlowCollector<R>, Unit>): Flow<R> {
return flow<R>(block = local suspend fun FlowCollector<R>.<anonymous>() {
val collector: FlowCollector<R> = $this$flow
flowScope<Unit>(block = local suspend fun CoroutineScope.<anonymous>() {
@@ -22,7 +22,7 @@ suspend fun <T : Any?> FlowCollector<T>.invokeSafely(action: @ExtensionFunctionT
}
@OptIn(markerClass = [ExperimentalTypeInference::class])
inline fun <T : Any?> unsafeFlow(@BuilderInference crossinline block: @ExtensionFunctionType SuspendFunction1<FlowCollector<T>, Unit>): Flow<T> {
inline fun <T : Any?> unsafeFlow(crossinline block: @ExtensionFunctionType SuspendFunction1<FlowCollector<T>, Unit>): Flow<T> {
return TODO()
}
@@ -84,12 +84,12 @@ class SafeCollector<T : Any?> : FlowCollector<T> {
}
@OptIn(markerClass = [ExperimentalTypeInference::class])
fun <T : Any?> flow(@BuilderInference block: @ExtensionFunctionType SuspendFunction1<FlowCollector<T>, Unit>): Flow<T> {
fun <T : Any?> flow(block: @ExtensionFunctionType SuspendFunction1<FlowCollector<T>, Unit>): Flow<T> {
return TODO()
}
@OptIn(markerClass = [ExperimentalTypeInference::class])
suspend fun <R : Any?> flowScope(@BuilderInference block: @ExtensionFunctionType SuspendFunction1<CoroutineScope, R>): R {
suspend fun <R : Any?> flowScope(block: @ExtensionFunctionType SuspendFunction1<CoroutineScope, R>): R {
return TODO()
}
@@ -127,7 +127,7 @@ interface ReceiveChannel<out E : Any?> {
}
@OptIn(markerClass = [ExperimentalTypeInference::class])
fun <E : Any?> CoroutineScope.produce(@BuilderInference block: @ExtensionFunctionType SuspendFunction1<ProducerScope<E>, Unit>): ReceiveChannel<E> {
fun <E : Any?> CoroutineScope.produce(block: @ExtensionFunctionType SuspendFunction1<ProducerScope<E>, Unit>): ReceiveChannel<E> {
return TODO()
}
@@ -4,8 +4,6 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
OptIn(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalTypeInference modality:OPEN visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass<kotlin.experimental.ExperimentalTypeInference>])
TYPE_PARAMETER name:R index:0 variance: superTypes:[kotlin.Any?] reified:false
VALUE_PARAMETER name:block index:0 type:@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction2<<root>.CoroutineScope, <root>.FlowCollector<R of <root>.scopedFlow>, kotlin.Unit>
annotations:
BuilderInference
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun scopedFlow <R> (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction2<<root>.CoroutineScope, <root>.FlowCollector<R of <root>.scopedFlow>, kotlin.Unit>): <root>.Flow<R of <root>.scopedFlow> declared in <root>'
CALL 'public final fun flow <T> (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.FlowCollector<T of <root>.flow>, kotlin.Unit>): <root>.Flow<T of <root>.flow> declared in <root>' type=<root>.Flow<R of <root>.scopedFlow> origin=null
@@ -56,8 +54,6 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
OptIn(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalTypeInference modality:OPEN visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass<kotlin.experimental.ExperimentalTypeInference>])
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
VALUE_PARAMETER name:block index:0 type:@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.FlowCollector<T of <root>.unsafeFlow>, kotlin.Unit> [crossinline]
annotations:
BuilderInference
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun unsafeFlow <T> (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.FlowCollector<T of <root>.unsafeFlow>, kotlin.Unit>): <root>.Flow<T of <root>.unsafeFlow> [inline] declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
@@ -196,8 +192,6 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
OptIn(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalTypeInference modality:OPEN visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass<kotlin.experimental.ExperimentalTypeInference>])
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
VALUE_PARAMETER name:block index:0 type:@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.FlowCollector<T of <root>.flow>, kotlin.Unit>
annotations:
BuilderInference
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun flow <T> (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.FlowCollector<T of <root>.flow>, kotlin.Unit>): <root>.Flow<T of <root>.flow> declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
@@ -206,8 +200,6 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
OptIn(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalTypeInference modality:OPEN visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass<kotlin.experimental.ExperimentalTypeInference>])
TYPE_PARAMETER name:R index:0 variance: superTypes:[kotlin.Any?] reified:false
VALUE_PARAMETER name:block index:0 type:@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.CoroutineScope, R of <root>.flowScope>
annotations:
BuilderInference
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun flowScope <R> (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.CoroutineScope, R of <root>.flowScope>): R of <root>.flowScope [suspend] declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
@@ -315,8 +307,6 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
TYPE_PARAMETER name:E index:0 variance: superTypes:[kotlin.Any?] reified:false
$receiver: VALUE_PARAMETER name:<this> type:<root>.CoroutineScope
VALUE_PARAMETER name:block index:0 type:@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.ProducerScope<E of <root>.produce>, kotlin.Unit>
annotations:
BuilderInference
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun produce <E> (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<<root>.ProducerScope<E of <root>.produce>, kotlin.Unit>): <root>.ReceiveChannel<E of <root>.produce> declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
@@ -3,7 +3,7 @@
import kotlin.experimental.ExperimentalTypeInference
@OptIn(ExperimentalTypeInference::class)
fun <R> scopedFlow(@BuilderInference block: suspend CoroutineScope.(FlowCollector<R>) -> Unit): Flow<R> =
fun <R> scopedFlow(block: suspend CoroutineScope.(FlowCollector<R>) -> Unit): Flow<R> =
flow {
val collector = this
flowScope { block(collector) }
@@ -22,7 +22,7 @@ suspend fun <T> FlowCollector<T>.invokeSafely(
}
@OptIn(ExperimentalTypeInference::class)
inline fun <T> unsafeFlow(@BuilderInference crossinline block: suspend FlowCollector<T>.() -> Unit): Flow<T> = TODO()
inline fun <T> unsafeFlow(crossinline block: suspend FlowCollector<T>.() -> Unit): Flow<T> = TODO()
@Deprecated(level = DeprecationLevel.HIDDEN, message = "binary compatibility with a version w/o FlowCollector receiver")
public fun <T> Flow<T>.onCompletion(action: suspend (cause: Throwable?) -> Unit) =
@@ -48,10 +48,10 @@ class SafeCollector<T> constructor(
}
@OptIn(ExperimentalTypeInference::class)
fun <T> flow(@BuilderInference block: suspend FlowCollector<T>.() -> Unit): Flow<T> = TODO()
fun <T> flow(block: suspend FlowCollector<T>.() -> Unit): Flow<T> = TODO()
@OptIn(ExperimentalTypeInference::class)
suspend fun <R> flowScope(@BuilderInference block: suspend CoroutineScope.() -> R): R = TODO()
suspend fun <R> flowScope(block: suspend CoroutineScope.() -> R): R = TODO()
suspend inline fun <T> Flow<T>.collect(crossinline action: suspend (value: T) -> Unit) {}
@@ -72,7 +72,7 @@ interface ReceiveChannel<out E>
@OptIn(ExperimentalTypeInference::class)
fun <E> CoroutineScope.produce(
@BuilderInference block: suspend ProducerScope<E>.() -> Unit
block: suspend ProducerScope<E>.() -> Unit
): ReceiveChannel<E> = TODO()
interface ProducerScope<in E> : CoroutineScope, SendChannel<E> {
@@ -1,5 +1,5 @@
@OptIn(markerClass = [ExperimentalTypeInference::class])
fun <R : Any?> scopedFlow(@BuilderInference block: @ExtensionFunctionType SuspendFunction2<CoroutineScope, FlowCollector<R>, Unit>): Flow<R> {
fun <R : Any?> scopedFlow(block: @ExtensionFunctionType SuspendFunction2<CoroutineScope, FlowCollector<R>, Unit>): Flow<R> {
return flow<R>(block = local suspend fun FlowCollector<R>.<anonymous>() {
val collector: FlowCollector<R> = $this$flow
flowScope<Unit>(block = local suspend fun CoroutineScope.<anonymous>() {
@@ -22,7 +22,7 @@ suspend fun <T : Any?> FlowCollector<T>.invokeSafely(action: @ExtensionFunctionT
}
@OptIn(markerClass = [ExperimentalTypeInference::class])
inline fun <T : Any?> unsafeFlow(@BuilderInference crossinline block: @ExtensionFunctionType SuspendFunction1<FlowCollector<T>, Unit>): Flow<T> {
inline fun <T : Any?> unsafeFlow(crossinline block: @ExtensionFunctionType SuspendFunction1<FlowCollector<T>, Unit>): Flow<T> {
return TODO()
}
@@ -84,12 +84,12 @@ class SafeCollector<T : Any?> : FlowCollector<T> {
}
@OptIn(markerClass = [ExperimentalTypeInference::class])
fun <T : Any?> flow(@BuilderInference block: @ExtensionFunctionType SuspendFunction1<FlowCollector<T>, Unit>): Flow<T> {
fun <T : Any?> flow(block: @ExtensionFunctionType SuspendFunction1<FlowCollector<T>, Unit>): Flow<T> {
return TODO()
}
@OptIn(markerClass = [ExperimentalTypeInference::class])
suspend fun <R : Any?> flowScope(@BuilderInference block: @ExtensionFunctionType SuspendFunction1<CoroutineScope, R>): R {
suspend fun <R : Any?> flowScope(block: @ExtensionFunctionType SuspendFunction1<CoroutineScope, R>): R {
return TODO()
}
@@ -127,7 +127,7 @@ interface ReceiveChannel<out E : Any?> {
}
@OptIn(markerClass = [ExperimentalTypeInference::class])
fun <E : Any?> CoroutineScope.produce(@BuilderInference block: @ExtensionFunctionType SuspendFunction1<ProducerScope<E>, Unit>): ReceiveChannel<E> {
fun <E : Any?> CoroutineScope.produce(block: @ExtensionFunctionType SuspendFunction1<ProducerScope<E>, Unit>): ReceiveChannel<E> {
return TODO()
}