Skip to content

Commit

Permalink
fix: missing pc map for empty functions (#3202)
Browse files Browse the repository at this point in the history
the IR generated inside of a function (that is not generated in stmt.py
or expr.py) was not annotated with the source pos. this annotates the
root node of the function with the source pos as the fallback.
  • Loading branch information
charles-cooper authored Dec 31, 2022
1 parent 61deca9 commit 7ea1f88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vyper/codegen/function_definitions/external_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,4 @@ def generate_ir_for_external_function(code, sig, context, skip_nonpayable_check)
# TODO rethink this / make it clearer
ret[-1][-1].append(func_common_ir)

return IRnode.from_list(ret)
return IRnode.from_list(ret, source_pos=getpos(sig.func_ast_code))

0 comments on commit 7ea1f88

Please sign in to comment.