www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 213] New: template X is not a member of Y

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=213

           Summary: template X is not a member of Y
           Product: D
           Version: 0.161
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: h3r3tic mat.uni.torun.pl


tmp8.d:
-------

template Foo() {
        template blah() {
                alias x blah;
        }
        static int x;
}

struct Bar {
        mixin Foo mix;
}

void main() {
        typeof(Bar.blah!())     a;              // error
        typeof(Bar.x)           b;              // ok
}



compile error:
--------------

tmp8.d(13): template blah!() is not a member of Bar


-- 
Jun 20 2006
next sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail puremagic.com schrieb am 2006-06-20:
 http://d.puremagic.com/issues/show_bug.cgi?id=213

 template Foo() {
         template blah() {
                 alias x blah;
         }
         static int x;
 }

 struct Bar {
         mixin Foo mix;
 }

 void main() {
         typeof(Bar.blah!())     a;              // error
         typeof(Bar.x)           b;              // ok
 }



 compile error:
 --------------

 tmp8.d(13): template blah!() is not a member of Bar

Added to DStress as http://dstress.kuehne.cn/run/t/template_40_A.d http://dstress.kuehne.cn/run/t/template_40_B.d http://dstress.kuehne.cn/run/t/template_40_C.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFErlIaLK5blCcjpWoRAsAlAKCCQNsslVr02PmTq+qrVok4cBUq6gCcCKOe pTW1OmVMUVIyR6etOh8zqUc= =hzHA -----END PGP SIGNATURE-----
Jul 07 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=213


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME




------- Comment #1 from bugzilla digitalmars.com  2008-06-24 20:46 -------
Works in dmd 1.031 and 2.015


-- 
Jun 24 2008