Skip to content

Commit

Permalink
ACP needs to know about spreadable + arity of 1
Browse files Browse the repository at this point in the history
  • Loading branch information
enebo committed Apr 30, 2024
1 parent d815fe1 commit 92b1d86
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public Object execute(FullInterpreterContext fic, Object... data) {
Signature sig = ((IRClosure)fic.getScope()).getSignature();
if (sig.isNoArguments()) {
prologueBB.addInstr(PrepareNoBlockArgsInstr.INSTANCE);
} else if (sig.isOneArgument() && !sig.hasKwargs()) { // no kwargs and just a single required argument
} else if (sig.isOneArgument() && !sig.isSpreadable() && !sig.hasKwargs()) { // no kwargs and just a single required argument
prologueBB.addInstr(PrepareSingleBlockArgInstr.INSTANCE);
} else {
prologueBB.addInstr(PrepareBlockArgsInstr.INSTANCE);
Expand Down

0 comments on commit 92b1d86

Please sign in to comment.