Fix default parameter remapping on inlining: support store instruction

#KT-7963 Fixed
This commit is contained in:
Michael Bogdanov
2015-06-08 14:33:28 +03:00
parent 7a1625fc9e
commit baa44e3d01
6 changed files with 35 additions and 1 deletions
@@ -0,0 +1,9 @@
import test.*
fun box(): String {
val z = "OK".b { a, b ->
a + b
}
return if (z == "s1OK") "OK" else "fail $z"
}
@@ -0,0 +1,5 @@
package test
inline fun a(s1: String = "s1", s2: String = "s2", body: (a1: String, a2: String) -> String) = body(s1, s2)
inline fun String.b(body: (a1: String, a2: String) -> String) = a(s2 = this, body = body)