$_self will be the base type of the entity that attaches to a predicate

Yes, it is. But it depends on the codegen of DRR. We have the code like

auto tblgen_attr = op0->getAttrOfType<::mlir::BoolAttr>("attr1");(void)tblgen_attr;
if (!(tblgen_attr)){
   ....
}
if (!tblgen_attr.getValue()) {
    ...
}

If tblgen_attr is an Attribute type or if we verify the additional constraint first, then they may not be able to assume it’s a BoolAttr in this case.

I think we don’t say it’ll be the derived type in OpBase.td and so far, I see most cases are supposing it’s the base type. Thus I guess the impact of switching from static check to runtime check may not have a big impact, what do you think?