diff --git a/vyper/compiler/phases.py b/vyper/compiler/phases.py index fbb57c08d7..45cab440b8 100644 --- a/vyper/compiler/phases.py +++ b/vyper/compiler/phases.py @@ -2,6 +2,7 @@ from functools import cached_property from pathlib import Path, PurePath from typing import Optional +import copy from vyper import ast as vy_ast from vyper.codegen import module @@ -259,6 +260,7 @@ def generate_annotated_ast( StorageLayout Layout of variables in storage """ + vyper_module = copy.deepcopy(vyper_module) with input_bundle.search_path(Path(vyper_module.resolved_path).parent): # note: validate_semantics does type inference on the AST validate_semantics(vyper_module, input_bundle)