[Issue 7450] New: AA: Cannot uniquely infer foreach argument types
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Feb 6 01:45:45 PST 2012
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: nobody at puremagic.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at 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: -------
More information about the Digitalmars-d-bugs
mailing list