Summary: Disallow inoperant "in" contracts
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from Andrei Alexandrescu <> 2011-07-02 
21:21:52 PDT ---

class A { void fun(int) {} }

class B : A { void fun(int x) in { assert(x > 0); } body {} }

In this case B's in contract is never called. The compiler should disallow the
code. To make the code work, an empty "in" contract on should suffice.
The error message should mention that.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to