I feel kinda stupid for asking such a silly question, but it doesn't really make sense to me. In my adventures in the Commonwealth I've found a few legendary weapons, with the trait of having unlimited ammo capacity. Though when I equip them and fire them, they ultimately run out of ammo like any other gun. Does the unlimited part refer to the amount of bullets in your current clip or does my game have some sort of bug?
What I did notice was the fact they occasionally 'regenerate' some ammo. e.g. I got 100 bullets for a 10mm pistol, I shoot some things and end up at 80 bullet in my current clip. A few minutes later I get 10 extra bullets, I reload and have 90 bullets again. At least I think it happens like that. Now that I type it out, I might also have just picked those bullets up. Can't be sure.