Reusable and degradable thermoset polymers are prepared by dynamic covalent chemistry, but the dynamic bonds rarely provide additional functions to the materials. Here, the authors show a reversible aza-Michael addition reaction between functional heterocycle dihydropyrimidin-2(1H)-thione and electron-deficient olefins providing polymer structures with different functions.