This would be expected. The corner cases people faced with PHP throughout the decades have been well documented on the internet for eons.
Swift, not so much. It's relatively new. Looking at AI's abilities like an engineer's career span scaled about 10-20x of time makes it make a bit more sense.
It's going to be worse at newer/niche things, intuitively - which is only going to get worse as it "learns" from garbage outputted by other LLMs moving forward.