Implement ForeachStatement for (static) Arrays

I am currently stuck at the semantic analysis.
because depending on the type of the expression that is itterated foreach does diffrent things
how I check If the itterated type has thoose methods ?
-  `popFront()`/`front()`
-  `opApply`

Why don't you extract the common part between this and the DeclarationStatement visit function and make it return the declaration ? Duplicating code is something that should generally be avoided, and it seems counter productive to do a scope lookup to find the declaration back.