[Mlir-commits] [mlir] [MLIR][Python] Make init parameters follow the field definition order (PR #186574)
Rolf Morel
llvmlistbot at llvm.org
Tue Mar 17 14:57:11 PDT 2026
================
@@ -23,12 +23,12 @@ class MyInt(Dialect, name="myint"):
class ConstantOp(MyInt.Operation, name="constant"):
value: IntegerAttr
----------------
rolfmorel wrote:
```suggestion
cst: Result[i32] = infer_type()
value: IntegerAttr
```
What happens if we were to move the inferred type field first? Would that be an error as it corresponds to a kwarg which is now followed by a positional arg? Might be worth having a test checking that an an (appropriate) exception is raised.
Note: not a real suggestion; just to illustrate the question.
https://github.com/llvm/llvm-project/pull/186574
More information about the Mlir-commits
mailing list