WINSTON-SALEM, N.C. (AP) — A trial over the legality of a North Carolina law canceling primary elections this year for state appellate court judgeships is scheduled for late spring.

During a hearing Thursday, U.S. Magistrate Judge Joi Peake set a June 7 trial date and other filing and evidence deadlines.

Federal judges have allowed the General Assembly's law approved last fall to be enforced for now. A federal appeals court already scheduled arguments for March on whether that was appropriate.

The state Democratic Party and several county parties sued Republican legislative leaders, arguing the cancellation violated their freedom to associate by being unable to pick a candidate for the November election.

Lawyers for the GOP legislators and the state say the cancellation avoided confusion as lawmakers debate potentially new election districts for local judges.