diff --git a/idea/testData/codegen/classes/simplestClosure.jet b/idea/testData/codegen/classes/simplestClosure.jet new file mode 100644 index 00000000000..b8b4a9d032a --- /dev/null +++ b/idea/testData/codegen/classes/simplestClosure.jet @@ -0,0 +1,7 @@ +fun box() : String { + return if (invoker({49}) == 49) "OK" else "fail" +} + +fun invoker(gen : {() : Int}) : Int { + return gen() +} \ No newline at end of file diff --git a/idea/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java b/idea/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java new file mode 100644 index 00000000000..be84866f774 --- /dev/null +++ b/idea/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java @@ -0,0 +1,10 @@ +package org.jetbrains.jet.codegen; + +/** + * @author max + */ +public class ClosuresGenTest extends CodegenTestCase { + public void testSimplestClosure() throws Exception { + blackBoxFile("classes/simplestClosure.jet"); + } +}