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


kenn...@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|OS X: wrong value is passed |OS X: wrong value is passed
                   |to simple argument with a   |to simple argument along
                   |lazy parameter with         |with a delegate with -O
                   |-unittest -release -O       |


--- Comment #1 from kenn...@gmail.com 2011-08-16 11:50:31 PDT ---
Correction:

1. Only -O is needed.
2. It's not 'lazy' causing the bug, but passing a nested delegate.

-------------------------------
void enforce6506b(bool condition, void delegate() m) {
    assert(!condition);
}
void toImpl6506b(int value) {
    void f(){}
    enforce6506b(value >= 0, &f);
}
void bug6506b() {
    toImpl6506b(-112345);
}

void main() { bug6506b(); }
-------------------------------
$ dmd -O z.d
$ ./z
core.exception.AssertError@z(2): Assertion failure
...
-------------------------------

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

Reply via email to