Obsolete KT-5685: VerifyError: Bad local variable type for class with inline method and optional parameters

#KT-5685 Obsolete
This commit is contained in:
Michael Bogdanov
2014-10-10 17:20:12 +04:00
parent 605c9f48b4
commit 860544d299
4 changed files with 31 additions and 0 deletions
@@ -0,0 +1,10 @@
import test.*
fun box(): String {
var s1 = ""
val s2 = Measurements().measure("K") {
s1 = "O"
}
return s1 + s2
}
@@ -0,0 +1,9 @@
package test
class Measurements
{
inline fun measure(key: String, logEvery: Long = -1, divisor: Int = 1, body: () -> Unit): String {
body()
return key
}
}