jroesch commented on a change in pull request #6274:
URL: https://github.com/apache/incubator-tvm/pull/6274#discussion_r493098975



##########
File path: src/parser/parser.cc
##########
@@ -699,15 +798,15 @@ class Parser {
     // Parse the type's identifier.
     auto type_tok = Match(TokenType::kIdentifier);
     auto type_id = type_tok.ToString();
-    auto type_global = tvm::GlobalTypeVar(type_id, TypeKind::kAdtHandle);
+    auto type_global = AddOrGet(&type_names, type_id, TypeKind::kAdtHandle);
 
-    try {
-      type_names.Add(type_id, type_global);
-    } catch (const DuplicateKeyError& e) {
-      this->diag_ctx->Emit(Diagnostic::Error(type_tok->span) << "a type 
definition with the name "
-                                                             << "`" << type_id 
<< "` "
-                                                             << "was 
previously defined");
-    }
+    // try {

Review comment:
       This is now lazily resolved, I think I should just purge this error 
handling. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to