I've done it, in a G20. Bought the wrong ammo by accident a number of years ago and didn't realize it til I got to the desert. Disappointed in my lack of attention, and also not wanting to waste the time I had set aside, I decided to proceed anyway.
My idea was that I could carefully chamber a single round at a time and simply do some draw and fire drills. No need to fire strings of multiple rounds. I'd just make it a day of doing some simple fundamentals.
However, I noticed over the years that the G20 was sprung somewhat lightly, to enable using both low and mid-range loads, as well as the hot stuff. The elasticity under recoil of the polymer frame allowed for the slide velocity of the hot ammo to not beat the gun apart, as had been the case in the early Colt Delta Elites. And so, the Glock tended to eject rather reliably the lower power 10mm ammo that some guns would choke on. Feed reliability was the typical impressive Glockness. My curiosity to investigate sparked in my imagination.
I noticed the single .40 rounds were ejecting, although barely, and depositing at my feet. So I experimented to see if the short stubby rounds would feed from the magazine. I would stick only a single round in the mag, insert it, rack the slide,...and to my surprise, it would feed and chamber 95% of the time. Upon firing, the slide would lock back, indicating that the pistol might in fact both feed AND fire. So on a whim, I loaded a 10mm mag full of Winchester white box 180grn. FMJ .40 ammo to see if the stuff would actually work as I thought it might. I was amazed at the reliability with which it did so successfully! I burned through 3 boxes of .40 that day with only 2 feed hiccups, both of which just required a small retraction of the slide to the rear by a millimeter or so, then letting the slide go home to finish chambering the .40 ammo.
I carefully inspected spent casings and the gun itself for any signs of odd or out of the ordinary things. For whatever reason, the G20 was reliably piercing the primers. But other than that,...no signs of anything to be concerned. Accuracy was acceptable. And not having to chase brass was a nice touch.
I haven't bothered to do it since then. But it is nice to know that in a pinch, without a conversion barrel or anything, I could use .40 if nothing else was available.