NI: Allow to resolve to functions with SAM conversion and passing array without spread as vararg (with warning)

^KT-35224 Fixed
This commit is contained in:
Victor Petukhov
2019-12-04 20:29:03 +03:00
parent fe875d628d
commit 07269661b4
33 changed files with 573 additions and 27 deletions
@@ -25784,6 +25784,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("arrayAsVarargAfterSamArgument.kt")
public void testArrayAsVarargAfterSamArgument() throws Exception {
runTest("compiler/testData/codegen/box/sam/arrayAsVarargAfterSamArgument.kt");
}
@TestMetadata("arrayAsVarargAfterSamArgumentWithoutSamConversionsPerArgument.kt")
public void testArrayAsVarargAfterSamArgumentWithoutSamConversionsPerArgument() throws Exception {
runTest("compiler/testData/codegen/box/sam/arrayAsVarargAfterSamArgumentWithoutSamConversionsPerArgument.kt");
}
@TestMetadata("castFromAny.kt")
public void testCastFromAny() throws Exception {
runTest("compiler/testData/codegen/box/sam/castFromAny.kt");