[IR] update testdata: support annotations on parameters

This commit is contained in:
Zalim Bashorov
2020-11-11 14:18:51 +03:00
committed by teamcityserver
parent 182cb52bdb
commit a34a311e86
6 changed files with 19 additions and 19 deletions
@@ -9,12 +9,12 @@ class Test : J {
field = j
private get
@NotNull()
@NotNull
override fun returnNotNull(): @EnhancedNullability String {
return <this>.#j.returnNotNull()
}
@Nullable()
@Nullable
override fun returnNullable(): @EnhancedNullability String? {
return <this>.#j.returnNullable()
}
@@ -27,11 +27,11 @@ class Test : J {
<this>.#j.takeFlexible(x = x)
}
override fun takeNotNull(x: @EnhancedNullability String) {
override fun takeNotNull(@NotNull x: @EnhancedNullability String) {
<this>.#j.takeNotNull(x = x)
}
override fun takeNullable(x: @EnhancedNullability String?) {
override fun takeNullable(@Nullable x: @EnhancedNullability String?) {
<this>.#j.takeNullable(x = x)
}
@@ -42,7 +42,7 @@ var test2: Int /* by */
return #test2$delegate.getValue(thisRef = null, kProp = ::test2)
}
@A(x = "test2.set")
set(<set-?>: Int) {
set(@A(x = "test2.set.param") <set-?>: Int) {
return #test2$delegate.setValue(thisRef = null, kProp = ::test2, newValue = <set-?>)
}
@@ -4,7 +4,7 @@ annotation class Ann : Annotation {
}
class Test {
constructor(x: Int) /* primary */ {
constructor(@Ann x: Int) /* primary */ {
super/*Any*/()
/* <init>() */
@@ -6,11 +6,11 @@ annotation class TestAnn : Annotation {
}
fun testFun(x: Int) {
fun testFun(@TestAnn(x = "testFun.x") x: Int) {
}
class TestClassConstructor1 {
constructor(x: Int) /* primary */ {
constructor(@TestAnn(x = "TestClassConstructor1.x") x: Int) /* primary */ {
super/*Any*/()
/* <init>() */
@@ -28,22 +28,22 @@ const val UINT_CONST: UInt
field = 42
get
fun takeUByte(u: UByte) {
fun takeUByte(@ImplicitIntegerCoercion u: UByte) {
}
fun takeUShort(u: UShort) {
fun takeUShort(@ImplicitIntegerCoercion u: UShort) {
}
fun takeUInt(u: UInt) {
fun takeUInt(@ImplicitIntegerCoercion u: UInt) {
}
fun takeULong(u: ULong) {
fun takeULong(@ImplicitIntegerCoercion u: ULong) {
}
fun takeUBytes(vararg u: UByte) {
fun takeUBytes(@ImplicitIntegerCoercion vararg u: UByte) {
}
fun takeLong(l: Long) {
fun takeLong(@ImplicitIntegerCoercion l: Long) {
}
fun test() {
@@ -1,5 +1,5 @@
@OptIn(markerClass = [ExperimentalTypeInference::class])
fun <R : Any?> scopedFlow(block: @ExtensionFunctionType SuspendFunction2<CoroutineScope, FlowCollector<R>, Unit>): Flow<R> {
fun <R : Any?> scopedFlow(@BuilderInference block: @ExtensionFunctionType SuspendFunction2<CoroutineScope, FlowCollector<R>, Unit>): Flow<R> {
return flow<R>(block = local suspend fun FlowCollector<R>.<anonymous>() {
val collector: FlowCollector<R> = <this>
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(crossinline block: @ExtensionFunctionType SuspendFunction1<FlowCollector<T>, Unit>): Flow<T> {
inline fun <T : Any?> unsafeFlow(@BuilderInference crossinline block: @ExtensionFunctionType SuspendFunction1<FlowCollector<T>, Unit>): Flow<T> {
TODO()
}
@@ -84,12 +84,12 @@ class SafeCollector<T : Any?> : FlowCollector<T> {
}
@OptIn(markerClass = [ExperimentalTypeInference::class])
fun <T : Any?> flow(block: @ExtensionFunctionType SuspendFunction1<FlowCollector<T>, Unit>): Flow<T> {
fun <T : Any?> flow(@BuilderInference block: @ExtensionFunctionType SuspendFunction1<FlowCollector<T>, Unit>): Flow<T> {
TODO()
}
@OptIn(markerClass = [ExperimentalTypeInference::class])
suspend fun <R : Any?> flowScope(block: @ExtensionFunctionType SuspendFunction1<CoroutineScope, R>): R {
suspend fun <R : Any?> flowScope(@BuilderInference block: @ExtensionFunctionType SuspendFunction1<CoroutineScope, R>): R {
TODO()
}
@@ -127,7 +127,7 @@ interface ReceiveChannel<out E : Any?> {
}
@OptIn(markerClass = [ExperimentalTypeInference::class])
fun <E : Any?> CoroutineScope.produce(block: @ExtensionFunctionType SuspendFunction1<ProducerScope<E>, Unit>): ReceiveChannel<E> {
fun <E : Any?> CoroutineScope.produce(@BuilderInference block: @ExtensionFunctionType SuspendFunction1<ProducerScope<E>, Unit>): ReceiveChannel<E> {
TODO()
}