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:
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+10
@@ -1465,6 +1465,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
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("kt21014.kt")
|
||||
public void testKt21014() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21014.kt");
|
||||
@@ -1733,6 +1738,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
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");
|
||||
|
||||
Generated
+10
@@ -1465,6 +1465,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
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("kt21014.kt")
|
||||
public void testKt21014() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21014.kt");
|
||||
@@ -1733,6 +1738,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
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");
|
||||
|
||||
Generated
+10
@@ -1465,6 +1465,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
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("kt21014.kt")
|
||||
public void testKt21014() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21014.kt");
|
||||
@@ -1733,6 +1738,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
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");
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
+10
@@ -1265,6 +1265,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineArrayConstructors.kt")
|
||||
public void testInlineArrayConstructors() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/inlineArrayConstructors.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt37604.kt")
|
||||
public void testKt37604() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt37604.kt");
|
||||
@@ -1358,6 +1363,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("arrayConstructorArgument.kt")
|
||||
public void testArrayConstructorArgument() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/bound/arrayConstructorArgument.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("captureVarInInitBlock.kt")
|
||||
public void testCaptureVarInInitBlock() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/bound/captureVarInInitBlock.kt");
|
||||
|
||||
Reference in New Issue
Block a user