A senior legal adviser at the European Union’s court of justice in Luxembourg today sided with Spain in a legal case launched against Britain, agreeing that electoral laws in Gibraltar allowing non-EU citizens the right to vote in European elections violated EU treaty rules.