Highly enantioselective syntheses of heterocycles via intramolecular Ir-catalyzed allylic amination and etherification.