Dota 1: Invulnerable units will not get damaged but you can cleave from them

Dota 2: Invulnerable units are not attacked.