code: def declare_type(self, type_):
          
          assert isinstance(type_, symbols.TYPE)
          # Checks it's not a basic type
          if not type_.is_basic and type_.name.lower() in TYPE.TYPE_NAMES.values():
              syntax_error(type_.lineno, "'%s' is a basic type and cannot be redefined" %
                           type_.name)
              return None
  
          if not self.check_is_undeclared(type_.name, type_.lineno, scope=self.current_scope, show_error=True):
              return None
  
          entry = self.declare(type_.name, type_.lineno, type_)
          return entry
docs: Declares a type.
          Checks its name is not already used in the current scope,
          and that it's not a basic type.
  
          Returns the given type_ Symbol, or None on error.