T Rogers ??? - Federal judges do so all the time and in fact they even enforce their own orders if you have any knowledge of the US civil rights movement.

In Canada judges are much more constrained in what they can do when they find the government has acted unconstitutionally.

Under our Constitution a court may declare "any law that is inconsistent with the provisions of the Constitution is, to the extent of the inconsistency, of no force or effect."