Not member Error in MLIR Dialect Type definition and usage in Dialect operations

Hello, I want to design my own dialect, and refer to the standalone example. The example defines a new type as well as a new operation using I32 typeattr argument, and standalone-opt can correctly parse and print them.

My problem is that, when I want to use the new type as argument in new dialect operation, it will show the error that the new type is not a member in my dialect.

The error message is
/cute/build/include/CuTe/ error: ‘CustomType’ is not a member of ‘mlir::cute’
40 | if (!((::llvm::isa<::mlir::cute::CustomType>(type)))) {
| ^~~~~~~~~~
/cute/build/include/CuTe/ error: no matching function for call to ‘isa< >(mlir::Type&)’
40 | if (!((::llvm::isa<::mlir::cute::CustomType>(type)))) {

But Actually my file has the line MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::cute::CustomType)

So I am wondering what may lead to this error. Thanks for your help!

My code is like this
def CuTe_CustomType : CuTe_Type<“Custom”, “custom”> {
let summary = “CuTe custom type”;
let description = “Custom type in cute dialect”;
let parameters = (ins StringRefParameter<“the custom value”>:$value);
let assemblyFormat = “< $value >”;

def IsCustomTypePred : CPred<“::llvm::isa<::mlir::cute::CustomType>($_self)”>;
def cute_CustomType : Type<IsCustomTypePred, “cute.custom type”>;


let arguments = (ins cute_CustomType:$input);
let results = (outs cute_CustomType:$output);

The problem is that your dialect .h likely does not include correctly the file which defines the type, like here

Thank you so much, I fixed it by adding include "CuTe/CuTeTypes.h" in CuTeOps.cpp, also the include issues.