From c73063be28d6bb64d2027c949d5a2da06342e6db Mon Sep 17 00:00:00 2001 From: Charles Cooper Date: Sat, 17 Dec 2022 12:07:32 -0800 Subject: [PATCH] fix: missing pc map for empty functions 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. --- vyper/codegen/function_definitions/external_function.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vyper/codegen/function_definitions/external_function.py b/vyper/codegen/function_definitions/external_function.py index 3f0d89c4d6..06d2946558 100644 --- a/vyper/codegen/function_definitions/external_function.py +++ b/vyper/codegen/function_definitions/external_function.py @@ -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))