diff --git a/artiq/compiler/validators/escape.py b/artiq/compiler/validators/escape.py index 2b596cdd7..2e8438f88 100644 --- a/artiq/compiler/validators/escape.py +++ b/artiq/compiler/validators/escape.py @@ -268,8 +268,12 @@ class EscapeValidator(algorithm.Visitor): if region is not None: region.contract(value_region) + # If we assign to an attribute of a quoted value, there will be no names + # in the assignment lhs. + target_names = self._names_of(target) or [] + # The assigned value should outlive the assignee - target_regions = [self._region_of(name) for name in self._names_of(target)] + target_regions = [self._region_of(name) for name in target_names] for target_region in target_regions: if not Region.outlives(value_region, target_region): if is_aug_assign: