DMD 1.033 and 2.017 releases

Bill Baxter dnewsgroup at billbaxter.com
Fri Jul 11 21:27:57 PDT 2008


Jarrett Billingsley wrote:
> "Walter Bright" <newshound1 at digitalmars.com> wrote in message 
> news:g591bf$j5j$2 at digitalmars.com...
>> For Tango.
>>
>> http://www.digitalmars.com/d/1.0/changelog.html
>> http://ftp.digitalmars.com/dmd.1.033.zip
>>
>> http://www.digitalmars.com/d/2.0/changelog.html
>> http://ftp.digitalmars.com/dmd.2.017.zip
> 
> Regression fixes _for the win_.  Let's see more of this ;) 

Maybe sooner than you were thinking:

Is there any incantation I can use to make the code below work now?

I saw that typeof(Type.member) is no longer considered valid, but it 
seems neither are any of the replacements I can think of.


--------------
struct Thing(Scalar)
{
     Scalar x,y,z;
}

alias typeof(Thing!(float).x) SC; /* This version used to work */
/+
bug.d(30): Error: this is not in a struct or class scope
bug.d(30): Error: 'this' is only allowed in non-static member functions, 
not main
bug.d(30): Error: this for x needs to be type Thing not type int
+/

alias typeof(Thing!(float).init.x) SC2;
/+
bug.d(32): Error: undefined identifier struct Thing.init
bug.d(32): Error: no property 'x' for type 'void'
+/

alias typeof((Thing!(float).init).x) SC2;
/+
bug.d(37): Error: Thing!(float).init is used as a type
bug.d(37): Error: no property 'x' for type 'void'
+/

void main()
{
}

--bb


More information about the Digitalmars-d-announce mailing list