Training makes you stronger because you stress the muscles, and they "supercompensate" to become a little stronger after a workout. But there has to be a balance: if you stress them too much, they can't recover and improve before you hit it again. So if you do a hard weight workout, swimming, as excellent as it is, will simply further tear down and stress the muscles.
Moreover, if you are lifting weight hard, you'll be taking enough out of the muscles that you won't be able to do an effective swim workout.
If either workout is serious, alternate days. Swimming is great exercise - so get the most out of it! (And ask yourself: are you a swimmer who does weights to improve swimming - or a weight lifter who swims to enhance strength work?)
On the other hand, a light swim could be a great warm-up, or a good warm-down. (Warm-up dilates the blood vessels and gets them ready for work, and brings the muscles up to optimum working temp; warm-down allows the blood to pump out lactates and other accumulated by-products of hard exercise).
Nat Brown taught and coached cross-country running and skiing for 16 years before joining the US Biathlon Team as wax technician. In 1989 he switched to the US Cross-Country team. He was the first American to take over technical services for a foreign team (Slovenia) and worked also for Germany and Sweden. He has coached at 3 Olympics and 14 World Championships, edited Nordic Update for 9 years and Cross-Country Skier for 2. He has written three books on skiing and training; the latest was The Complete Guide to Cross-Country Ski Preparation (Mountaineers Books) which has gone through two editions and a Russian translation. He spends as much time as he can at his ranch in British Columbia where he most recently hosted a pre-Olympic training camp for Slovenia.