If I were designing a game, I wouldn't restrict usage of spells while wielding specific weapons. I would however make certain spells more potent, depending on what you have in your hands.
So player would be able to cast every spell, regardless of what he has in his hands, but, for example, resurrection spell would be more potent while holding a 2 handed hammer compared to dual wielding swords (resurrected player would come back with more stamina and endurance). Some spells would be more potent while holding a staff, and so on.
No restrictions on casting, but having spell potency depend on what you are currently holding in your hands (as one of the factors which determine spell potency, alongside stats, other gear,...).