Skip to content

Commit

Permalink
Refactor initialization of error object
Browse files Browse the repository at this point in the history
Ref. #1120, #1134
  • Loading branch information
treiher committed Aug 16, 2022
1 parent 836462a commit 32b7009
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rflx/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -2805,15 +2805,14 @@ def _update_str(self) -> None:
self._str = intern(f"{self.identifier} with delta {field_values}")

def _check_type_subexpr(self) -> RecordFluxError:
if not isinstance(self.type_, rty.Message):
error = RecordFluxError()
error = RecordFluxError()

if not isinstance(self.type_, rty.Message):
for d in self.field_values.values():
error += d.check_type_instance(rty.Any)

return error

error = RecordFluxError()
field_combinations = set(self.type_.field_combinations)
fields: tuple[str, ...] = ()

Expand Down

0 comments on commit 32b7009

Please sign in to comment.