Skip to content

Commit

Permalink
improve locality of exceptions thrown in check_module_uses
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Apr 11, 2024
1 parent f1a5aab commit f6d1c81
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions vyper/semantics/analysis/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,13 +557,13 @@ def visit_ExportsDecl(self, node):
with tag_exceptions(item): # tag with specific item
self._self_t.typ.add_member(func_t.name, func_t)

funcs.append(func_t)
funcs.append(func_t)

# check module uses
if func_t.uses_state():
module_info = check_module_uses(item)
assert module_info is not None # guaranteed by above checks
used_modules.add(module_info)
# check module uses
if func_t.uses_state():
module_info = check_module_uses(item)
assert module_info is not None # guaranteed by above checks
used_modules.add(module_info)

node._metadata["exports_info"] = ExportsInfo(funcs, used_modules)

Expand Down

0 comments on commit f6d1c81

Please sign in to comment.