Skip to content

Commit 4a93c27

Browse files
committed
refactor: added assert statement
1 parent 20e5f74 commit 4a93c27

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

integration_tests/func_internal_def_01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def main():
44
print(x)
55

66
def bar():
7-
print("bar")
7+
assert x == 25
88

99
bar()
1010

src/lpython/semantics/python_ast_to_asr.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4303,6 +4303,7 @@ class SymbolTableVisitor : public CommonVisitor<SymbolTableVisitor> {
43034303
} else {
43044304
bool is_pure = false, is_module = false;
43054305

4306+
// This checks for internal function defintions as well.
43064307
for (size_t i = 0; i < x.n_body; i++) {
43074308
visit_stmt(*x.m_body[i]);
43084309
}

0 commit comments

Comments
 (0)