fix(ivy): generate correct interpolations (#21946)

Ivy compile would generate the an incorrect interpolation if there
were more than 8 interpolations in a text block.

Fixes: #21927

PR Close #21946
This commit is contained in:
Chuck Jazdzewski
2018-01-31 13:11:07 -08:00
committed by Alex Rickabaugh
parent 124283982b
commit 3cc1d76ee7
2 changed files with 32 additions and 3 deletions

View File

@ -174,9 +174,9 @@ function interpolate(args: o.Expression[]): o.Expression {
case 17:
return o.importExpr(R3.bind8).callFn(args);
}
(args.length > 19 && args.length % 2 == 1) ||
(args.length >= 19 && args.length % 2 == 1) ||
error(`Invalid interpolation argument length ${args.length}`);
return o.importExpr(R3.bindV).callFn(args);
return o.importExpr(R3.bindV).callFn([o.literalArr(args)]);
}
class BindingScope {