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


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|delegate inside tuple;      |delegate literal inside
                   |wrong values                |tuple; wrong values


--- Comment #5 from Don <clugd...@yahoo.com.au> 2010-07-22 02:26:16 PDT ---
This is happening because the delegate literal is passed as an alias template
parameter. This parameter never gets resolved properly. In the example below,
the compiler thinks that the parent of the delegate literal is 'Goat', whereas
the true parent is 'main'. The problem might be in TupleExp::semantic(): if an
element of the tuple is a symbol, maybe it should be attempting to resolve it.

--------
void Goat(Callbacks ...)() {
    Callbacks[0](333); // fails
}

void main() {
    Goat!(
        (int i) { assert(i==333); } 
    )();
}

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

Reply via email to