IsItBullshit: "People who ate the same # of calories with starch and bread had more weight gain than people who ate the same # of calories but less starch and grains"

This is something I saw on a random Internet comment. It's gotta be bullshit, right? Seems to absolutely contradict the definition of 'calories'.

I understand same number of calories being less healthy for your body if it's 1000cal sweetbread VS 1000 cal vegetables. But no way that that would ultimately affect the amount of weight you'd gain, right?