CNBC's Jim Cramer said Tuesday that the European Union was retroactive when it ordered Ireland to recoup millions in taxes from Apple.

The European Commission on Tuesday told the Irish government to retrieve about 13 billion euros ($14.5 billion) in taxes from Apple, after regulators said Ireland granted Apple undue tax benefits.