http://d.puremagic.com/issues/show_bug.cgi?id=7450
Summary: AA: Cannot uniquely infer foreach argument types Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: druntime AssignedTo: nob...@puremagic.com ReportedBy: andrej.mitrov...@gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2012-02-06 01:45:43 PST --- void main() { string[string] hash; hash["foo"] = ""; foreach (name; hash.byKey()) { assert(typeid(string) == typeid(name)); // ok } // Error: cannot uniquely infer foreach argument types foreach (string name; hash.byKey()) { } } I'm confused, why can't I specify the type? It ends up being a string if I don't set it.. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------