[Issue 9541] CTFE: wrong code with delegates, recursion

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 27 00:45:22 PST 2013


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



--- Comment #2 from Don <clugdbug at yahoo.com.au> 2013-02-27 00:45:20 PST ---
A slight reduction, which removes the delegate literal with a nested function.
==================
bool into(void delegate() sink, int set) {
    void xxx() {
        assert(set != 13);
    }
    if(set == 42)
        into(&xxx, 13);
    else
        sink();
    return true;
}
static assert(into(null, 42));
==================
This may be quite difficult to fix, since it has exposed a design flaw in the
current CTFE implementation.

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


More information about the Digitalmars-d-bugs mailing list