Added backend tests with closure local function in local class
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
fun box(): String {
|
||||||
|
val o = "O"
|
||||||
|
fun ok() = o + "K"
|
||||||
|
class OK {
|
||||||
|
val ok = ok()
|
||||||
|
}
|
||||||
|
return OK().ok
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fun box(): String {
|
||||||
|
val o = "O"
|
||||||
|
val ok_L = {o + "K"}
|
||||||
|
class OK {
|
||||||
|
val ok = ok_L()
|
||||||
|
}
|
||||||
|
return OK().ok
|
||||||
|
}
|
||||||
+12
@@ -1674,6 +1674,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("localClassFunClosure.kt")
|
||||||
|
public void testLocalClassFunClosure() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localClassFunClosure.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("localClassLambdaClosure.kt")
|
||||||
|
public void testLocalClassLambdaClosure() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localClassLambdaClosure.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("localFunctionInFunction.kt")
|
@TestMetadata("localFunctionInFunction.kt")
|
||||||
public void testLocalFunctionInFunction() throws Exception {
|
public void testLocalFunctionInFunction() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localFunctionInFunction.kt");
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localFunctionInFunction.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user