Does this make sense?
"I forgot having shut the window"
Thieves stole someone's laptop and his friend asked how they got into his house. He said "I forgot to shut the window". I've thought he would say "I forgot having shut the window", but he didn't. I was informed that his answer is grammatically correct, but don't know why. I wonder what I'm missing.