The UK doesn't have a written constitution, but the one fundamental principle of British government is "Parliamentary sovereignty." Parliament can do, literally, anything, and one Parliament can overrule a prior one. The referendum was technically non-biding, although most politicians said they would abide by it, because it was a vote of the people, not of Parliament.
I guess I learn something everyday. How on earth did Great Britain survive as long as it has with such a chaotic system?