DMD 1.035 and 2.019 releases

davidl davidl at 126.com
Wed Sep 3 20:05:59 PDT 2008


在 Thu, 04 Sep 2008 09:23:08 +0800,のしいか (noshiika)  
<noshiika at gmail.com> 写道:

> Walter Bright wrote:
>> Struct constructors!
>
> Thanks for the nice release!
>
> I have a question. The "dynamic initialization of struct" syntax seems
> still using opCall. Is it going to replaced by constructors?
>
>      struct S {
>          this(int x) {
>              writeln("ctor");
>          }
>          static S opCall(int x) {
>              writeln("opCall");
>              return S.init;
>          }
>      }
>
>      void main(){
>          S s = 1; // prints "opCall"
>      }

umm, another bug ?

-- 
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/


More information about the Digitalmars-d-announce mailing list