Section 8. The salary or compensation of any incumbent of any office or position at the time when the General Laws take effect shall not be diminished thereby, notwithstanding the repeal therein of any act establishing such salary or compensation and notwithstanding that the General Laws establish a different salary or compensation for the office or position.