diff --git a/vyper/semantics/analysis/local.py b/vyper/semantics/analysis/local.py index 948c3905ce..3d1e9b8ef1 100644 --- a/vyper/semantics/analysis/local.py +++ b/vyper/semantics/analysis/local.py @@ -559,10 +559,14 @@ def __init__(self, fn_node: ContractFunctionT): self.func = fn_node def visit(self, node, typ): - # recurse and typecheck in case we are being fed the wrong type for some reason. - # note that `validate_expected_type` is unnecessary for nodes that already - # call `get_exact_type_from_node` and `get_possible_types_from_node` because - # `validate_expected_type` would be calling the same function again. + # recurse and typecheck in case we are being fed the wrong type for + # some reason. note that `validate_expected_type` is unnecessary + # for nodes that already call `get_exact_type_from_node` and + # `get_possible_types_from_node` because `validate_expected_type` + # would be calling the same function again. + # CMC 2023-06-27 would be cleanest to call validate_expected_type() + # before recursing but maybe needs some refactoring before that + # can happen. super().visit(node, typ) # annotate