test for KT-1578 (duplicate of KT-1980)

This commit is contained in:
Dmitry Jemerov
2012-06-02 23:08:05 +02:00
parent e1cecd10b2
commit d55af2a948
2 changed files with 14 additions and 0 deletions
@@ -0,0 +1,9 @@
fun box() : String {
var i = 0
{
i++
}()
i++ //the problem is here
// i = i + 1 //this way it works
return if (i == 2) "OK" else "fail"
}
@@ -396,4 +396,9 @@ public class ClassGenTest extends CodegenTestCase {
createEnvironmentWithMockJdkAndIdeaAnnotations(CompilerSpecialMode.JDK_HEADERS);
blackBoxFile("regressions/kt1980.kt");
}
public void testKt1578() throws Exception {
createEnvironmentWithMockJdkAndIdeaAnnotations(CompilerSpecialMode.JDK_HEADERS);
blackBoxFile("regressions/kt1578.kt");
}
}