The Court declares that, by adopting and maintaining in force Article 10(9)(a) of the Código do Imposto sobre o Rendimento das Pessoas Singulares (Code on income tax of natural persons), according to which, for a taxable person who loses his status as a resident in Portugal, for taxation purposes for the year of such loss of residence status, the amount which, under Article 10(8) of that code, was not taxed when the shares were exchanged is to be reckoned as a capital gain, the Portuguese Republic has failed to fulfil its obligations under Articles 21, 45 and 49 TFEU and Articles 28 and 31 of the Agreement on the European Economic Area of 2 May 1992. The Court declares that, by adopting and maintaining in force Article 38(1)(a) of the same code, which reserves entitlement to the tax deferral provided for by that provision to natural persons who transfer all the assets used in the exercise of a business or professional activity to a company which has its head office or effective management in Portugal, the Portuguese Republic has failed to fulfil its obligations under Article 49 TFEU and Article 31 of the Agreement on the European Economic Area.