Templetazied ForeachStatement

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`

I don't think a visitor here is the right tool. The type of the thing doesn't really help to know if it is suitable for foreach, but rather it characteristics (is it an array ? a range ? something that is a range because of UFCS ? opApply ?). Generally, this won't depend on the type of expression or the type of the expression, so a visitor do not seem very useful.