[FIR JS] Treat named arguments as positional for dynamics
Note: 174/1627 failing FirJsTest tests remaining - 170 are multi-module tests - 4 tests have to do with IR
This commit is contained in:
+17
-11
@@ -159,19 +159,25 @@ private class FirCallArgumentsProcessor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun processNonLambdaArgument(argument: FirExpression, isLastArgument: Boolean) {
|
private fun processNonLambdaArgument(argument: FirExpression, isLastArgument: Boolean) {
|
||||||
// process position argument
|
when {
|
||||||
if (argument !is FirNamedArgumentExpression) {
|
// process position argument
|
||||||
if (processPositionArgument(argument, isLastArgument)) {
|
argument !is FirNamedArgumentExpression -> {
|
||||||
state = State.VARARG_POSITION
|
if (processPositionArgument(argument, isLastArgument)) {
|
||||||
|
state = State.VARARG_POSITION
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
// process named argument
|
||||||
// process named argument
|
function.origin == FirDeclarationOrigin.DynamicScope -> {
|
||||||
else {
|
if (processPositionArgument(argument.expression, isLastArgument)) {
|
||||||
if (state == State.VARARG_POSITION) {
|
state = State.VARARG_POSITION
|
||||||
completeVarargPositionArguments()
|
}
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
|
if (state == State.VARARG_POSITION) {
|
||||||
|
completeVarargPositionArguments()
|
||||||
|
}
|
||||||
|
processNamedArgument(argument)
|
||||||
}
|
}
|
||||||
|
|
||||||
processNamedArgument(argument)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user