An Act of the Scottish Parliament is not law so far as any provision of the Act is outside the legislative competence of the Parliament.
A provision is outside that competence so far as any of the following paragraphs apply—
For the purposes of this section, the question whether a provision of an Act of the Scottish Parliament relates to a reserved matter is to be determined, subject to subsection (4), by reference to the purpose of the provision, having regard (among other things) to its effect in all the circumstances.
A provision which—
is to be treated as relating to reserved matters unless the purpose of the provision is to make the law in question apply consistently to reserved matters and otherwise.
Subsection (1) is subject to section 30(6).