Skip to content

Commit

Permalink
more strict zipping.
Browse files Browse the repository at this point in the history
  • Loading branch information
PapyChacal committed Jan 25, 2024
1 parent 2fdf64d commit c739a33
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions xdsl/irdl/declarative_assembly_format_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,12 @@ def verify_operands(self, seen_variables: set[str]):
seen_operand,
seen_operand_type,
(operand_name, operand_def),
) in zip(self.seen_operands, self.seen_operand_types, self.op_def.operands):
) in zip(
self.seen_operands,
self.seen_operand_types,
self.op_def.operands,
strict=True,
):
if not seen_operand:
self.raise_error(
f"operand '{operand_name}' "
Expand All @@ -162,7 +167,7 @@ def verify_results(self, seen_variables: set[str]):
from another construct."""

for result_type, (result_name, result_def) in zip(
self.seen_result_types, self.op_def.results
self.seen_result_types, self.op_def.results, strict=True
):
if not result_type:
if not result_def.constr.can_infer(seen_variables):
Expand Down

0 comments on commit c739a33

Please sign in to comment.