diff --git a/compiler/testData/codegen/regressions/kt1739.kt b/compiler/testData/codegen/regressions/kt1739.kt new file mode 100644 index 00000000000..832bb197224 --- /dev/null +++ b/compiler/testData/codegen/regressions/kt1739.kt @@ -0,0 +1,11 @@ +public class RunnableFunctionWrapper(val f : () -> Unit) : Runnable { + public override fun run() { + f() + } +} + +fun box() : String { + var res = "" + RunnableFunctionWrapper({ res = "OK" }).run() + return res +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java index d912113456b..8316a2a9eea 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java @@ -129,6 +129,10 @@ public class FunctionGenTest extends CodegenTestCase { blackBoxFile("regressions/kt2280.kt"); } + public void testKt1739() { + blackBoxFile("regressions/kt1739.kt"); + } + public static class WithJavaFunctionGenTest extends CodegenTestCase { private void blackBoxFileWithJava(@NotNull String ktFile) throws Exception { File javaClassesTempDirectory = new File(FileUtil.getTempDirectory(), "java-classes");