[K/N][tests] Added a reproducer for #KT-64508
This commit is contained in:
@@ -2338,6 +2338,12 @@ dynamicTest("kt42830") {
|
|||||||
useGoldenData = true
|
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") {
|
dynamicTest("produce_dynamic_unhandledException") {
|
||||||
disabled = (cacheTesting != null) // Disabled due to KT-47828.
|
disabled = (cacheTesting != null) // Disabled due to KT-47828.
|
||||||
source = "produce_dynamic/unhandledException/unhandled.kt"
|
source = "produce_dynamic/unhandledException/unhandled.kt"
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Ok
|
||||||
@@ -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");
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user