Skip to content

Commit f65493f

Browse files
committed
ub: Improve constructor of MatchOp
1 parent 8b51312 commit f65493f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xdsl_smt/dialects/ub.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class MatchOp(IRDLOperation):
110110

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

113-
def __init__(self, values: Sequence[SSAValue]):
113+
def __init__(self, values: Sequence[SSAValue], result_types: Sequence[Attribute]):
114114
value_types = list[UBOrType[Attribute]]()
115115
for value in values:
116116
if not isattr(value.type, UBOrType[Attribute]):
@@ -120,7 +120,7 @@ def __init__(self, values: Sequence[SSAValue]):
120120
ub_region = Region(Block((), arg_types=[]))
121121
super().__init__(
122122
operands=[values],
123-
result_types=[],
123+
result_types=[result_types],
124124
regions=[value_region, ub_region],
125125
)
126126

0 commit comments

Comments
 (0)