Fixed bug in Inliner + test
This commit is contained in:
@@ -2326,6 +2326,11 @@ task inline_statementAsLastExprInBlock(type: RunKonanTest) {
|
||||
source = "codegen/inline/statementAsLastExprInBlock.kt"
|
||||
}
|
||||
|
||||
task inline_returnLocalClassFromBlock(type: RunKonanTest) {
|
||||
goldValue = "Zzz\n"
|
||||
source = "codegen/inline/returnLocalClassFromBlock.kt"
|
||||
}
|
||||
|
||||
task deserialized_inline0(type: RunKonanTest) {
|
||||
source = "serialization/deserialized_inline0.kt"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package codegen.inline.returnLocalClassFromBlock
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
inline fun <R> call(block: ()->R): R {
|
||||
try {
|
||||
return block()
|
||||
} finally {
|
||||
println("Zzz")
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
call { class Z(); Z() }
|
||||
}
|
||||
Reference in New Issue
Block a user