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:
Denis Zharkov
2015-09-23 20:07:06 +03:00
parent 5f69789636
commit 73799e2c3c
73 changed files with 325 additions and 340 deletions
+6 -6
View File
@@ -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) {}