contracts scope

Serg Kovrov kovrov at no.spam
Wed Jan 17 13:51:18 PST 2007


It would be nice to have some sort of 'contracts scope' shared between 
`in` and `out`.
I'm looking a way to implement something like this:

ubyte[] foo(ubyte[] src, inout ubyte[] dst)
in
{
     auto ptr = dst.ptr;
}
out
{
     if (ptr != dst.ptr) wtitefln("dst reallocated");
}
body
{
     ....

-- 
serg.



More information about the Digitalmars-d mailing list