[Issue 10635] Error: cannot use array to initialize S
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 21 04:07:30 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=10635
--- Comment #2 from Daniel Kozak <kozzi11 at gmail.com> 2013-11-21 04:07:28 PST ---
(In reply to comment #1)
> Now neither work.
No it is same as before, but my example was bad. I mean this:
struct S {
string str;
static S opCall(string[] v) {
S s;
s.str = v[0];
return s;
}
static S opCall(string[string] v) {
S s;
s.str = v.keys[0];
return s;
}
}
void main(string[] args) {
S s1 = ["getnonce"]; // this works
S s = ["getnonce" : "str"]; // this doesnt work
}
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list