According to EU Regulation 1178/2011 Annex IV Part MED.A.030 (f), you cannot hold a CPL with a Class 2 medical.
Saying that, MED.A.030 (h) states you can only hold 1 x medical certificate and the UK CAA are issuing persons with 2 x medicals to permit them to conduct certain activities on restricted Class 1 medicals, even issuing limitations not recognised by EASA.
Mmmmmm, really worked, this EASA lark, didn't it?
SECTION 2
Requirements for medical certificates
MED.A.030 Medical certificates
(a) A student pilot shall not fly solo unless that student pilot holds a medical certificate, as required for the relevant licence.
(b) Applicants for and holders of a light aircraft pilot licence (LAPL) shall hold at least an LAPL medical certificate.
(c) Applicants for and holders of a private pilot licence (PPL), a sailplane pilot licence (SPL), or a balloon pilot licence (BPL) shall hold at least a Class 2 medical certificate.
(d) Applicants for and holders of an SPL or a BPL involved in commercial sailplane or balloon flights shall hold at least a Class 2 medical certificate.
(e) If a night rating is added to a PPL or LAPL, the licence holder shall be colour safe.
(f) Applicants for and holders of a commercial pilot licence (CPL), a multi-crew pilot licence (MPL), or an airline transport pilot licence (ATPL) shall hold a Class 1 medical certificate.
(g) If an instrument rating is added to a PPL, the licence holder shall undertake pure tone audiometry examinations in accordance with the periodicity and the standard required for Class 1 medical certificate holders.
(h) A licence holder shall not at any time hold more than one medical certificate issued in accordance with this Part.