[Issue 3452] Can't alias member functions such that the object name is implicitly stored in the alias

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 6 09:46:58 PDT 2013


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


Dicebot <public at dicebot.lv> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |public at dicebot.lv


--- Comment #2 from Dicebot <public at dicebot.lv> 2013-08-06 09:46:54 PDT ---
Another application is template alias parameter:

string boo(alias T)()
{
    return T.stringof;
}

struct A
{
    int field;
}

pragma(msg, boo!(A.field)());

currently this fails with "Error: need 'this' for 'boo' of type 'nothrow @safe
string()'" which does not make sense because compile-time usage of symbol
"A.field" does not require "this" pointer.

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