JVM_IR: move ArrayConstructor below function reference phases

This allows taking function references to inline array constructors.

Also, redundant classes are no longer generated when function references
are passed as arguments to the array constructors.

 #KT-46426 Fixed
This commit is contained in:
pyos
2021-05-04 16:13:39 +02:00
committed by TeamCityServer
parent 776920f77d
commit 9f53d70109
15 changed files with 168 additions and 45 deletions
@@ -2165,6 +2165,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/callableReference/genericLocalClassConstructorReference.kt");
}
@TestMetadata("inlineArrayConstructors.kt")
public void testInlineArrayConstructors() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/inlineArrayConstructors.kt");
}
@TestMetadata("javaField.kt")
public void testJavaField() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/javaField.kt");
@@ -2493,6 +2498,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/callableReference/bound/array.kt");
}
@TestMetadata("arrayConstructorArgument.kt")
public void testArrayConstructorArgument() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/bound/arrayConstructorArgument.kt");
}
@TestMetadata("arrayGetIntrinsic.kt")
public void testArrayGetIntrinsic() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/bound/arrayGetIntrinsic.kt");