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

--- Comment #0 from Andrej Mitrovic <> 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:
------- You are receiving this mail because: -------

Reply via email to