module M { f1 () : void { foreach (_ in null) { } // E: collection in foreach must be an array or type implementing enumerator pattern, the compiler has no idea what the type might be } f2 () : void { foreach (_ in 3) { } // E: expected System.Collections.IEnumerable, got int in type-enforced expression } f3 () : void { def f (x) { foreach (_ in x) { } // E: collection in foreach must be an array or type implementing enumerator pattern, the compiler has no idea what the type might be } } }