On Thursday, August 23, 2012 19:15:16 nocide wrote: > struct has no default constructor and instances are initialized with the > init property. > Can I declare or override the init property for a custom defined struct?
The init property is defined by what you directly initialize the struct's member variables to. struct S { int i = 7; string s = "hello"; } S.init has a value of 7 for i and "hello" for s. Unfortunately, I don't believe that declaring an init function or property is currently disallowed, but if it affects S.init, it's a bug. - Jonathan M Davis