[Issue 9971] eponymous function is not an lvalue

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 20 23:10:57 PDT 2013


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



--- Comment #6 from Kenji Hara <k.hara.pg at gmail.com> 2013-04-20 23:10:56 PDT ---
I think this is a bug.
Inside template function, the name 'goo' should be resolved to the instantiated
function 1st, then rewritten to template 'goo' if needed.

For example, this code should work.

void main() {
    goo(1);                // 1. instantiate goo!int
}
void goo(T...)(T args) {
    auto g = &goo;         // 2. &goo!int == void function(int)
                           // 4. &goo!() == void function()
    pragma(msg, typeof(g));
    static if (T.length)
        goo(args[1..$]);   // 3. instantiate goo!()
}

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