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


kenn...@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kenn...@gmail.com
           Platform|x86                         |All
            Summary|Problem with count inside   |Wrong context point for
                   |out{} of class method       |delegates inside contracts
                   |                            |of class member functions
         OS/Version|Windows                     |All


--- Comment #1 from kenn...@gmail.com 2011-07-31 15:32:23 PDT ---
Reduced test case:

-------------------------------
//import core.stdc.stdio;
class Bug6417 {
    void bar()
    in {
        int i = 14;
        assert(i == 14);
        auto d = (){ 
            assert(i == 14, "in contract failure"); // <-- fail
        };
        //printf("%p %p\n", d.ptr, &this);
        d();
    }
    out {
        int i = 10;
        assert(i == 10);
        (){ 
            assert(i == 10, "out contract failure"); // <-- also fail
        }();
    }
    body {}
}
void main() {
    (new Bug6417).bar();
}
-------------------------------

When running, the "in contract failure" assertion will be thrown.

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

Reply via email to