Skip to content

Commit

Permalink
[FIR2IR] Migrate Fir2IrDeclarationStorage to new parameter API
Browse files Browse the repository at this point in the history
#KT-73359
  • Loading branch information
cypressious authored and Space Team committed Feb 10, 2025
1 parent 105bc56 commit d4dd8b8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -438,13 +438,13 @@ class Fir2IrDeclarationStorage(
fun <T : IrFunction> T.putParametersInScope(function: FirFunction): T {
val contextParameters = function.contextParametersForFunctionOrContainingProperty()

for ((firParameter, irParameter) in contextParameters.zip(this.valueParameters.take(contextParameters.size))) {
for ((firParameter, irParameter) in contextParameters.zip(this.parameters.filter { it.kind == IrParameterKind.Context })) {
if (!firParameter.isLegacyContextReceiver()) {
localStorage.putParameter(firParameter, irParameter.symbol)
}
}

for ((firParameter, irParameter) in function.valueParameters.zip(valueParameters.drop(contextParameters.size))) {
for ((firParameter, irParameter) in function.valueParameters.zip(parameters.filter { it.kind == IrParameterKind.Regular })) {
localStorage.putParameter(firParameter, irParameter.symbol)
}
return this
Expand Down

0 comments on commit d4dd8b8

Please sign in to comment.