Merge boxWithStdlib testData into box, delete BoxWithStdlib test
This commit is contained in:
committed by
Alexander Udalov
parent
22bfc9786a
commit
06a67e6602
+22
@@ -0,0 +1,22 @@
|
||||
// WITH_REFLECT
|
||||
|
||||
interface A {
|
||||
fun f(): String
|
||||
}
|
||||
|
||||
inline fun foo(): A {
|
||||
return object : A {
|
||||
override fun f(): String {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val y = foo()
|
||||
|
||||
val enclosing = y.javaClass.getEnclosingMethod()
|
||||
if (enclosing?.getName() != "foo") return "method: $enclosing"
|
||||
|
||||
return y.f()
|
||||
}
|
||||
Reference in New Issue
Block a user