JVM_IR: Fix Inline CallableReferences with Varargs
- Added tests to demonstrate broken behaviour: the interaction of inline functions and callable references with varargs and defaults in various combinations. - Refactored InlineCallableReferencesToLambdaPhase to look like and use some of the infrastructure from CallableReferenceLowering. - Lifted some of this infrastructure out to be broadly reusable.
This commit is contained in:
committed by
Mikhael Bogdanov
parent
5360a7a3fe
commit
1074a0ef69
+18
-3
@@ -2632,9 +2632,24 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/emptyVarargAndDefault.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inline.kt")
|
||||
public void testInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inline.kt");
|
||||
@TestMetadata("inlineDefault.kt")
|
||||
public void testInlineDefault() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineDefault.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineVararg.kt")
|
||||
public void testInlineVararg() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVararg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineVarargAndDefault.kt")
|
||||
public void testInlineVarargAndDefault() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVarargAndDefault.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineVarargInts.kt")
|
||||
public void testInlineVarargInts() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVarargInts.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("innerConstructorWithVararg.kt")
|
||||
|
||||
Reference in New Issue
Block a user