supporting DMD-1.016 and DMD-2.000 with the same source code

Sean Kelly sean at f4.ca
Mon Jun 18 07:57:05 PDT 2007


Daniel Keep wrote:
> 
> Sean Kelly wrote:
>> Thomas Kuehne wrote:
>>> 4) class invariants
>>> ===================
>>>
>>> This is the only real trouble spot so far. DMD-1 uses
>>>     invariant{ ... assert(...); ... }
>>> however DMD-2 uses
>>>     invariant(){ ... assert(...); ... }
>> Well that's unfortunate.  I don't suppose unittest has gotten
>> parenthesis as well?
>>
> 
> I suspect this is because invariant is now a declaration, a storage
> class *and* a type constructor.

Well sure.  But adding parens breaks consistency with other similar blocks.


Sean



More information about the Digitalmars-d mailing list