private template members

Mike Wey mike-wey at example.com
Sun May 1 09:36:52 PDT 2011


On 05/01/2011 03:15 PM, Dmitry Olshansky wrote:
> On 01.05.2011 16:38, hunt0r wrote:
>> I was calling it from another module:
>> in file Test.d:
>> class Test
>> {
>> private:
>> int x;
>> void testNonTemplate()
>> {
>> }
>> template test()
>> {
>> void test() {x= 100;}
>> }
>> public:
>> int getX() {return x;}
>> }
>> In file main.d:
>> import Test;
>> Test t = new Test;
>> t.test(); /*ok*/
>> t.testNonTemplate(); /*error*/
>> writeln(t.getX()); /* prints 100 */
>>
>> I am using dmd 2.052
> Then it's definitely a bug, it might be a duplicate report but it I
> suggest to file it anyway.
> It sill fails on my almost newest DMD from github.
>

Probably this one: http://d.puremagic.com/issues/show_bug.cgi?id=2775

-- 
Mike Wey


More information about the Digitalmars-d-learn mailing list