[Mlir-commits] [mlir] [MLIR][Python] Fix typeid support for DynamicType and DynamicAttr (PR #183076)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Feb 25 04:28:48 PST 2026


================
@@ -1436,6 +1443,15 @@ void PyDynamicAttribute::bindDerived(ClassTy &c) {
     return std::string(dialectNamespace.data, dialectNamespace.length) + "." +
            std::string(name.data, name.length);
   });
+  c.def_static(
+      "get_typeid",
----------------
PragmaTwice wrote:

`MyDynamicType.typeid` requires an instance, i.e. `MyDynamicType(..).typeid`.

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


More information about the Mlir-commits mailing list