docs: def get_all_fields(self, arr):
          """
          Returns a list containing this struct's fields and all the fields of
          its ancestors.  Used during validation.
          """
          for k, v in self.fields.items():
              arr.append(v)
              
          if self.extends:
              parent = self.contract.get(self.extends)
              if parent:
                  return parent.get_all_fields(arr)
  
          return arr