Fixed bug in LocalDeclarationsLowering + test
Bug was in determining whether a function was locally defined
This commit is contained in:
@@ -2091,6 +2091,11 @@ task inline_type_substitution_in_fake_override(type: RunKonanTest) {
|
||||
source = "codegen/inline/typeSubstitutionInFakeOverride.kt"
|
||||
}
|
||||
|
||||
task inline_localFunctionInInitializerBlock(type: RunKonanTest) {
|
||||
goldValue = "Ok\n"
|
||||
source = "codegen/inline/localFunctionInInitializerBlock.kt"
|
||||
}
|
||||
|
||||
task deserialized_inline0(type: RunKonanTest) {
|
||||
source = "serialization/deserialized_inline0.kt"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package codegen.inline.localFunctionInInitializerBlock
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
class Foo {
|
||||
init {
|
||||
bar()
|
||||
}
|
||||
}
|
||||
|
||||
inline fun bar() {
|
||||
println({ "Ok" }())
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
Foo()
|
||||
}
|
||||
Reference in New Issue
Block a user