Feature request: Optional, simplified syntax for simple contracts

TommiT tommitissari at hotmail.com
Mon Jun 17 23:01:57 PDT 2013


One small issue is that 'in' and 'if' look quite similar, so the 
compiler should probably issue a warning if you test for a 
compile time constant inside a pre-condition.

void foo(T)(T v)
in (isIntegral!T) // Warning: did you mean 'if'
{ }


More information about the Digitalmars-d mailing list