Prompt error if enum type is written with errors.