[dmd-internals] dmd commit, revision 687
Walter Bright
walter at digitalmars.com
Sun Sep 26 02:50:12 PDT 2010
Don Clugston wrote:
>
> Great stuff!
> In this part of FuncDeclaration::isPure() in func.c, I think that
> should be: purity >= PUREconst.
> Otherwise a member function like this one becomes PUREweak:
> void foo(const X x) const pure;
>
>
> 2544 if (purity > PUREweak && needThis())
> 2545 { // The attribute of the 'this' reference affects purity strength
> 2546 if (type->mod & (MODimmutable | MODwild))
> 2547 ;
> 2548 else if (type->mod & MODconst && purity > PUREconst)
> 2549 purity = PUREconst;
> 2550 else
> 2551 purity = PUREweak;
> 2552 }
>
I think you're right. Fixed.
More information about the dmd-internals
mailing list