[K/N][tests] Added a reproducer for #KT-64508

This commit is contained in:
Igor Chevdar
2024-01-03 15:16:40 +02:00
committed by Space Team
parent 7fb5cbd1f8
commit 54328a1db4
4 changed files with 51 additions and 0 deletions
@@ -2338,6 +2338,12 @@ dynamicTest("kt42830") {
useGoldenData = true
}
dynamicTest("kt64508") {
source = "produce_dynamic/kt-64508/hello.kt"
cSource = "$projectDir/produce_dynamic/kt-64508/main.c"
useGoldenData = true
}
dynamicTest("produce_dynamic_unhandledException") {
disabled = (cacheTesting != null) // Disabled due to KT-47828.
source = "produce_dynamic/unhandledException/unhandled.kt"
@@ -0,0 +1,31 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
private inline fun <T> inlineFun(block: () -> T): T {
val zalue = block()
return zalue
}
interface Bar {
fun bar()
}
interface Foo {
fun getBar(): Bar
}
val foo = inlineFun {
object : Foo {
override fun getBar(): Bar {
return inlineFun {
object : Bar {
override fun bar() { }
}
}
}
}
}
fun callbar(bar: Bar) = bar.bar()
@@ -0,0 +1,13 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
#include "testlib_api.h"
#define __ testlib_symbols()->
#define T_(x) testlib_kref_ ## x
#include <stdio.h>
int main(int argc, char** argv) {
printf("Ok\n");
}