For example, if a Zoroark was illusioned into Pikachu, and an Impostor Ditto came out, what would happen; 1: Ditto would transform into Zoroark 2: Ditto would transform into Pikachu 3: Ditto would transform into Zoroark disguised as Pikachu
The move transform would just fail if used on a illusion. For imposter, it will just stay as a ditto when sent out.
Thanks, Halcyonic Falcon!