IR: keep capture sets the same when copying objects for tailrec funs
tailrec f(x: () -> T = { y }, y: T = ...) = f()
-- at the call we know that in `x` the observed value of `y` is `null`,
but the constructor should still have a single parameter.
This commit is contained in:
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+5
@@ -9362,6 +9362,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/useNextParamInLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("useNextParamInLambdaTailrec.kt")
|
||||
public void testUseNextParamInLambdaTailrec() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/useNextParamInLambdaTailrec.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("useThisInLambda.kt")
|
||||
public void testUseThisInLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/useThisInLambda.kt");
|
||||
|
||||
Generated
+5
@@ -8768,6 +8768,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/useNextParamInLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("useNextParamInLambdaTailrec.kt")
|
||||
public void testUseNextParamInLambdaTailrec() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/useNextParamInLambdaTailrec.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("useThisInLambda.kt")
|
||||
public void testUseThisInLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/useThisInLambda.kt");
|
||||
|
||||
Generated
+5
@@ -8733,6 +8733,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/useNextParamInLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("useNextParamInLambdaTailrec.kt")
|
||||
public void testUseNextParamInLambdaTailrec() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/useNextParamInLambdaTailrec.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("useThisInLambda.kt")
|
||||
public void testUseThisInLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/useThisInLambda.kt");
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
+5
@@ -4914,6 +4914,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/useNextParamInLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("useNextParamInLambdaTailrec.kt")
|
||||
public void testUseNextParamInLambdaTailrec() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/useNextParamInLambdaTailrec.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("useThisInLambda.kt")
|
||||
public void testUseThisInLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/useThisInLambda.kt");
|
||||
|
||||
Reference in New Issue
Block a user