Replace deprecated lambda syntax in testData
It's done with similar constructions where possible trying to preserve intended behavior. Some usages are removed because they test exactly the feature that we are going to drop soon.
This commit is contained in:
@@ -6,8 +6,8 @@ inline fun inlineFunWithInvoke(s: (p: Int) -> Unit, ext: Int.(p: Int) -> Unit) {
|
||||
}
|
||||
|
||||
inline fun inlineFunWithInvokeClosure(s: (p: Int) -> Unit, ext: Int.(p: Int) -> Unit) {
|
||||
subInline({p: Int -> s(p)}, {<!DEPRECATED_LAMBDA_SYNTAX!>Int.(p:Int)<!> -> this.ext(p)})
|
||||
subNoInline({p: Int -> s(p)}, {<!DEPRECATED_LAMBDA_SYNTAX!>Int.(p:Int)<!> -> this.ext(p)})
|
||||
subInline({p: Int -> s(p)}, { p -> this.ext(p)})
|
||||
subNoInline({p: Int -> s(p)}, { p -> this.ext(p)})
|
||||
}
|
||||
|
||||
//No inline
|
||||
@@ -17,8 +17,8 @@ inline fun inlineFunWithInvokeNonInline(noinline s: (p: Int) -> Unit, noinline e
|
||||
}
|
||||
|
||||
inline fun inlineFunWithInvokeClosureNoinline(noinline s: (p: Int) -> Unit, noinline ext: Int.(p: Int) -> Unit) {
|
||||
subInline({p: Int -> s(p)}, {<!DEPRECATED_LAMBDA_SYNTAX!>Int.(p:Int)<!> -> this.ext(p)})
|
||||
subNoInline({p: Int -> s(p)}, {<!DEPRECATED_LAMBDA_SYNTAX!>Int.(p:Int)<!> -> this.ext(p)})
|
||||
subInline({p: Int -> s(p)}, { p -> this.ext(p)})
|
||||
subNoInline({p: Int -> s(p)}, { p -> this.ext(p)})
|
||||
}
|
||||
|
||||
//ext function
|
||||
@@ -28,8 +28,8 @@ inline fun Function1<Int, Unit>.inlineExt(ext: Int.(p: Int) -> Unit) {
|
||||
}
|
||||
|
||||
inline fun Function1<Int, Unit>.inlineExtWithClosure(ext: Int.(p: Int) -> Unit) {
|
||||
subInline({p: Int -> this(p)}, {<!DEPRECATED_LAMBDA_SYNTAX!>Int.(p:Int)<!> -> this.ext(p)})
|
||||
subNoInline({p: Int -> this(p)}, {<!DEPRECATED_LAMBDA_SYNTAX!>Int.(p:Int)<!> -> this.ext(p)})
|
||||
subInline({p: Int -> this(p)}, { p -> this.ext(p)})
|
||||
subNoInline({p: Int -> this(p)}, { p -> this.ext(p)})
|
||||
}
|
||||
|
||||
inline fun subInline(s: (p: Int) -> Unit, ext: Int.(p: Int) -> Unit) {}
|
||||
|
||||
Reference in New Issue
Block a user