When you combine two same items (e. g. two diamond swords) in your inventory crafting grid and at least one of them have cursed enchantment, you will get sword without any enchantment, and without cursed enchantment.
Steps to reproduce:
- take two same items
- put any cursed enchantment(curse of binding or vanishing) on one or both items
- open your inventory and put that items in 2x2 crafting grid
- you should get one item with removed curse