Direct taxation is poorly harmonized within the Union law, however the discretion enjoyed by the member states in this field can not be used to create obstacles against the free movement. Santander (Joined cases C-338/11 to C-347/11) concerns the free movement of capital and a rule that exonerated undertakings for collective investments in transferable securities resident in France from paying dividend tax, while non-residents had to pay be means of withholding. This infringement will cost the France circa 4.2 billion (10^9) euros. The previous government has not reserved funds for this type of unexpected pecuniary obligations.
At the hearings France has asked for a temporal limitation of the effects of the ruling but the Court found no reason to grant such a limitation (see paras 62-63)
http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CELEX:62011CJ0338:EN:HTML