made error message for overriding type definitions