[IR] Deal with forward references in default argument lambdas.

Rely on the frontend weeding out cases that are not supported.

In psi2ir, introduce all the parameters before processing default
values.

Change the DefaultArgumentStubGenerator to generate code that
matches the behavior of the current backend.
This commit is contained in:
Mads Ager
2019-10-08 15:41:01 +02:00
committed by max-kammerer
parent 834eeb567b
commit 92cf521e11
13 changed files with 181 additions and 14 deletions
@@ -8992,6 +8992,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/defaultArguments/superCallCheck.kt");
}
@TestMetadata("useNextParamInLambda.kt")
public void testUseNextParamInLambda() throws Exception {
runTest("compiler/testData/codegen/box/defaultArguments/useNextParamInLambda.kt");
}
@TestMetadata("useThisInLambda.kt")
public void testUseThisInLambda() throws Exception {
runTest("compiler/testData/codegen/box/defaultArguments/useThisInLambda.kt");