Wouldnt pokemon that have different types be a problem, like all the pokemon that are gaining the fairy type, there code would be different in the gen 5 games than in gen 6 so i would think transfering them would be a difficult task?
Not at all. I'd imagine the pokemon itself only retains data on what species it actually is, so its type only matters when its being read by the game.
The other thing is that Magnemite and Magneton could be transferred from RBY to GSC without any issue, and that evolution line changed types between generations. There should be no problems with anything gaining Fairy type in the generation shift.
A Pokémon doesn't need to store data on things that are always the same. So it stores information on its nickname, gender, EVs, IVs, etc, but not its type, species name or base stats. Those things can be looked up when the game needs them.
These topics make me wish the 3DS gets hacked. I know what will be great lets remove backward compatibility to temporarily stop hackers and hurt loads of legit players so when the 3DS eventually gets hacked the hackers get their Pokemon anyway and legit players are stopped from having their Pokemon. Great idea.