Firstly, diet coke cannot directly make you gain weight as it contains no calories which could be converted to adipose tissue.
Just to play the Devils advocate, corticosteroid medications (cortisone, hydrocortisone, prednisone, etc) don't have calories either, yet weight gain from fluid retention is a very common side effect.