Write enclosing method info for transformed objects

This commit is contained in:
Michael Bogdanov
2016-01-08 12:51:42 +03:00
parent 8ab1190082
commit 657b9ff808
20 changed files with 348 additions and 51 deletions
@@ -0,0 +1,15 @@
import test.*
fun box(): String {
val res = test {
"OK"
}
val enclosingMethod = res.javaClass.enclosingMethod
if (enclosingMethod?.name != "box") return "fail 1: ${enclosingMethod?.name}"
val enclosingClass = res.javaClass.enclosingClass
if (enclosingClass?.name != "ObjectInInlineFun_1Kt") return "fail 2: ${enclosingClass?.name}"
return "OK"
}