Skip to content

Commit

Permalink
Fix empty block evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
virgil-serbanuta committed Nov 4, 2024
1 parent 043f9dc commit d76b184
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rust-semantics/execution/block.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module RUST-BLOCK
// https://doc.rust-lang.org/stable/reference/expressions/block-expr.html
// https://doc.rust-lang.org/stable/reference/names/scopes.html
rule {.InnerAttributes}:BlockExpression => .K
rule {.InnerAttributes}:BlockExpression => ptrValue(null, tuple(.ValueList))
// Pushin and popping the local state (without cleaing) should help with
// variable shadowing
rule {.InnerAttributes S:Statements}:BlockExpression
Expand Down
4 changes: 3 additions & 1 deletion tests/execution/empty_function.1.run
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
new :: empty_function :: Empty;
call :: empty_function :: Empty.empty
call :: empty_function :: Empty.empty;
return_value;
check_eq ()
4 changes: 3 additions & 1 deletion tests/execution/function_call.1.run
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
new :: function_call :: FunctionCalls;
call :: function_call :: FunctionCalls.call_empty
call :: function_call :: FunctionCalls.call_empty;
return_value;
check_eq ()

0 comments on commit d76b184

Please sign in to comment.