[Issue 11150] Allow aliasing of an aggregate template instance

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 1 00:34:01 PDT 2013


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


monarchdodra at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monarchdodra at gmail.com


--- Comment #1 from monarchdodra at gmail.com 2013-10-01 00:33:59 PDT ---
(In reply to comment #0)
> Currently it's not possible to easily create an alias of an aggregate template,

I'm not sure this has anything to do with templates?

//----
struct S
{
   int getData() { return int.init; }
}

alias getInt = S.getData;

void main()
{
   auto s = S();
   int x = getInt();    // error: need 'this' (expected error)
   int y = s.getInt();  // error: not callable with S (hmm...)
}
//----

Same result.

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