diff --git a/compiler/testData/codegen/regressions/kt1611.kt b/compiler/testData/codegen/regressions/kt1611.kt new file mode 100644 index 00000000000..3868730d889 --- /dev/null +++ b/compiler/testData/codegen/regressions/kt1611.kt @@ -0,0 +1,11 @@ +fun box(): String { + return Foo().doBar("OK") +} + +class Foo() { + val bar : (str : String) -> String = { it } + + fun doBar(str : String): String { + return bar(str); + } +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java index e5cd6a61c1f..91a3e6b9d96 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java @@ -416,4 +416,9 @@ public class ClassGenTest extends CodegenTestCase { createEnvironmentWithMockJdkAndIdeaAnnotations(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1976.kt"); } + + public void testKt1611() throws Exception { + createEnvironmentWithMockJdkAndIdeaAnnotations(CompilerSpecialMode.JDK_HEADERS); + blackBoxFile("regressions/kt1611.kt"); + } }