[Issue 8982] Assertion failure: '0' on line 353 in file 'ctfeexpr.c'

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 12 00:58:44 PST 2012


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



--- Comment #1 from Don <clugdbug at yahoo.com.au> 2012-11-12 00:58:43 PST ---
Somewhat reduced test case:

template Bug8982(func...)
{
    static if (is(typeof(func[0]) PT == __parameters))
    {
        enum Bug8982 = ((PT[0..1] args) => args[0])();
    }
}

struct V8982 {
    float x;
}

int func(ref const V8982 v = V8982(1) ){
    return 1;
}

pragma(msg, Bug8982!func);
----
The error occurs while evaluating the default argument. The resulting ErrorExp
should not be passed to CTFE, though the question is, at which stage should it
it be rejected? When instantiating the template? At is(__parameters)? Or when
creating the delegate?

-- 
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