Why does D require that in-contracts on a class method must have a
method body? Based on my understanding of TDPL, in-contracts are
supposed to be inherited by derived classes, aren't they? Currently I
can't seem to convince DMD to accept an in-contract on an abstract base
class method:

        abstract class Base {
                abstract int method(int j)
                in { assert(j < 10); }; // <-- compile error
        }

What's the rationale for this? Doesn't it defeat the purpose of DbC (I
want the abstract base class to "set the rules" as to what are
acceptable parameters to methods)?


T

-- 
Кто везде - тот нигде.

Reply via email to