Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Gusarich committed Jun 11, 2024
1 parent 7012e13 commit 07cdc25
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/grammar/grammar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ semantics.addOperation<ASTNode>("astOfStatement", {
return createNode({
kind: "statement_let_no_type",
name: arg1.sourceString,
expression: arg3.resolve_expression(),
expression: arg3.astOfExpression(),
ref: createRef(this),
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ exports[`feature-local-type-inference should automatically set types for let sta
"message": "Masterchain support is not enabled for this contract",
},
"2": {
"message": "Stack undeflow",
"message": "Stack underflow",
},
"3": {
"message": "Stack overflow",
Expand Down
2 changes: 1 addition & 1 deletion src/types/resolveStatements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ function processStatements(
const expressionType = getExpType(ctx, s.expression);

// Add variable to statement context
if (sctx.vars[s.name]) {
if (sctx.vars.has(s.name)) {
throwError(`Variable already exists: ${s.name}`, s.ref);
}
sctx = addVariable(s.name, expressionType, sctx);
Expand Down

0 comments on commit 07cdc25

Please sign in to comment.