[Issue 1532] Template instance cannot use class locals as template parameters

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 14 15:31:51 PDT 2011


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug at yahoo.com.au
         Resolution|                            |FIXED


--- Comment #2 from Don <clugdbug at yahoo.com.au> 2011-04-14 15:28:21 PDT ---
This was actually a diagnostic error, it is fixed by 2.020. The error message
now explains that the template must be global; there's actually no difference
in behaviour between function locals and class locals.
Marking this as FIXED because of the error message (nobody will be confused
again in the same way). The code still doesn't compile, but the code below has
always worked:

template Bar(alias local)
{
}

class Foo
{

    int x;

    alias Bar!(x) bar;
}

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