diff --git a/mlir/lib/Parser/TypeParser.cpp b/mlir/lib/Parser/TypeParser.cpp --- a/mlir/lib/Parser/TypeParser.cpp +++ b/mlir/lib/Parser/TypeParser.cpp @@ -312,6 +312,12 @@ switch (getToken().getKind()) { default: return (emitError("expected non-function type"), nullptr); + case Token::bare_identifier: + return (emitError("expected non-function type," + " but found start of custom operation." + " Did you mean to prefix the identifier with '!'" + " to refer to a dialect type?"), + nullptr); case Token::kw_memref: return parseMemRefType(); case Token::kw_tensor: