[dmd-beta] dmd 1.065 and 2.050 beta

Stephan Dilly Dilly at funatics.de
Wed Oct 27 06:29:38 PDT 2010


On 27.10.2010 14:51, Stephan Dilly wrote:
>> http://ftp.digitalmars.com/dmd1beta.zip
>> http://ftp.digitalmars.com/dmd2beta.zip
>
> 1) the client still says it is version 2.049
>
> 2) there seems to be a regression with pure opCall methods introduced. 
> The following code used to build with dmd2049 but now does not:
>
>
> struct Foo
> {
>     static Foo opCall(in Foo _f) pure
>     {
>         return Foo;
>     }
> }
>
> instead the compiler issues the following error:
> "Error: struct bug.Foo no size yet for forward reference"
>
> the workaround would be to remove the pure but that is no option for 
> my codebase full of pure opCalls.
>
>
> regards,
>     Stephan

Ok to be fair, this is the correct code that works in dmd2049 and does 
not in the beta:

struct Foo
{
     static Foo opCall(in Foo _f) pure
     {
         return _f;
     }
}



More information about the dmd-beta mailing list