[Refactoring] Remove dead code in ForeachStatement::semantic
fix Issue 12932 - Support @nogc for immediately iterated array literal
Merge pull request #3673 from 9rnsr/fix12932

Issue 12932 - Support @nogc for immediately iterated array literal