Skip to content

Commit e5c8981

Browse files
authored
Fix bug in compiler
1 parent 54c183d commit e5c8981

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/prometheus/compiler/compiler.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ function Compiler:emitContainerFuncBody()
612612
Ast.LocalVariableDeclaration(self.containerFuncScope, util.shuffle(declarations), {});
613613
Ast.WhileStatement(whileBody, Ast.VariableExpression(self.containerFuncScope, self.posVar));
614614
Ast.AssignmentStatement({
615-
Ast.VariableExpression(self.containerFuncScope, self.posVar)
615+
Ast.AssignmentVariable(self.containerFuncScope, self.posVar)
616616
}, {
617617
Ast.LenExpression(Ast.VariableExpression(self.containerFuncScope, self.detectGcCollectVar))
618618
}),
@@ -2146,4 +2146,4 @@ function Compiler:compileExpression(expression, funcDepth, numReturns)
21462146
logger:error(string.format("%s is not an compileable expression!", expression.kind));
21472147
end
21482148

2149-
return Compiler;
2149+
return Compiler;

0 commit comments

Comments
 (0)