KT-12928: decompose invocation like "a.foo(b)" to "$t = a; $s = $t.foo.bind($t); $s(b)" instead of "$t = a.foo; $t(b)", since in the latter case foo won't receive proper this. Add optimization that replaces "foo.bar.bind(baz)(args)" with "baz.bar(args)"
This commit is contained in:
+6
@@ -221,6 +221,12 @@ public class InlineEvaluationOrderTestGenerated extends AbstractInlineEvaluation
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("methodDecomposedWithBind.kt")
|
||||
public void testMethodDecomposedWithBind() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineEvaluationOrder/cases/methodDecomposedWithBind.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("methodInlineCallQualifierWithSideEffect.kt")
|
||||
public void testMethodInlineCallQualifierWithSideEffect() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineEvaluationOrder/cases/methodInlineCallQualifierWithSideEffect.kt");
|
||||
|
||||
+12
@@ -59,6 +59,18 @@ public class InlineMultiModuleTestGenerated extends AbstractInlineMultiModuleTes
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("externalInlineCallDecomposed")
|
||||
public void testExternalInlineCallDecomposed() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/externalInlineCallDecomposed/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("externalInlineNewDecomposed")
|
||||
public void testExternalInlineNewDecomposed() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/externalInlineNewDecomposed/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("lambda")
|
||||
public void testLambda() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/lambda/");
|
||||
|
||||
Reference in New Issue
Block a user