http://d.puremagic.com/issues/show_bug.cgi?id=6549

           Summary: Implement contracts without implementation.
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: timon.g...@gmx.ch


--- Comment #0 from timon.g...@gmx.ch 2011-08-24 11:23:34 PDT ---
currently, code like the following is rejected:

abstract class C{
    int foo(int x)
      in{assert(x<0);}
      out(result){assert(result>0);}
}

tt.d(10): Error: function tt.C.foo in and out contracts require function body.

Which does not make sense, because contracts logically belong to the method
declaration.

Such code should be accepted and the contracts should be subject to contract
inheritance. This will require a tiny grammar change.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to