Skip to content

Commit 70894a2

Browse files
committed
refactor: added assert statement
1 parent 6de7893 commit 70894a2

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
@@ -4281,6 +4281,7 @@ class SymbolTableVisitor : public CommonVisitor<SymbolTableVisitor> {
42814281
} else {
42824282
bool is_pure = false, is_module = false;
42834283

4284+
// This checks for internal function defintions as well.
42844285
for (size_t i = 0; i < x.n_body; i++) {
42854286
visit_stmt(*x.m_body[i]);
42864287
}

0 commit comments

Comments
 (0)