Mechanism and regioselectivity of the cycloaddition of thiones derived from Meldrum's acid, malonates, or other dicarbonyls.