N-Heterocyclic carbene-catalysed intramolecular hydroacylation to form basic nitrogen-containing heterocycles.