[Mlir-commits] [mlir] [MLIR][Python] Make init parameters follow the field definition order (PR #186574)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Mar 19 09:51:32 PDT 2026


================
@@ -23,12 +23,12 @@ class MyInt(Dialect, name="myint"):
 
     class ConstantOp(MyInt.Operation, name="constant"):
         value: IntegerAttr
-        cst: Result[i32]
+        cst: Result[i32] = infer_type()
 
     class AddOp(Operation, dialect=MyInt, name="add"):
         lhs: Operand[i32]
         rhs: Operand[i32]
-        res: Result[i32]
+        res: Result[i32] = infer_type()
----------------
PragmaTwice wrote:

Replaced `infer_type()` with `result(..)` : )

https://github.com/llvm/llvm-project/pull/186574


More information about the Mlir-commits mailing list