Skip to content

Commit

Permalink
ub: Improve constructor of MatchOp
Browse files Browse the repository at this point in the history
  • Loading branch information
math-fehr committed Feb 10, 2025
1 parent 8b51312 commit f65493f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xdsl_smt/dialects/ub.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class MatchOp(IRDLOperation):

assembly_format = "$values attr-dict-with-keyword `:` `(` type($values) `)` `->` type($res) $value_region $ub_region"

def __init__(self, values: Sequence[SSAValue]):
def __init__(self, values: Sequence[SSAValue], result_types: Sequence[Attribute]):
value_types = list[UBOrType[Attribute]]()
for value in values:
if not isattr(value.type, UBOrType[Attribute]):
Expand All @@ -120,7 +120,7 @@ def __init__(self, values: Sequence[SSAValue]):
ub_region = Region(Block((), arg_types=[]))
super().__init__(
operands=[values],
result_types=[],
result_types=[result_types],
regions=[value_region, ub_region],
)

Expand Down

0 comments on commit f65493f

Please sign in to comment.