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
@@ -91,6 +91,10 @@ fun IrMemberAccessExpression.getArgumentsWithIr(): List<Pair<IrValueParameter, I
|
||||
val irFunction = when (this) {
|
||||
is IrFunctionAccessExpression -> this.symbol.owner
|
||||
is IrFunctionReference -> this.symbol.owner
|
||||
is IrPropertyReference -> {
|
||||
assert(this.field == null) { "Field should be null to use `getArgumentsWithIr` on IrPropertyReference: ${this.dump()}}" }
|
||||
this.getter!!.owner
|
||||
}
|
||||
else -> error(this)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user