digitalmars.D.learn - traits allMembers and imported modules
- cal (20/20) Mar 11 2013 DMD 2.062:
- Andrej Mitrovic (2/5) Mar 11 2013 I can't reproduce this. How are you compiling the modules?
- cal (4/10) Mar 11 2013 Both rdmd and separate compilation give the error:
- cal (5/16) Mar 11 2013 Actually it prints out:
- cal (7/11) Mar 11 2013 Specifically:
- Andrej Mitrovic (2/3) Mar 11 2013 Ah yes, I can recreate it now. Can you file this as a bug?
- cal (2/5) Mar 11 2013 Sure thanks for checking it
- Andrej Mitrovic (2/5) Mar 11 2013 Ok I filed it: http://d.puremagic.com/issues/show_bug.cgi?id=9692
DMD 2.062: //-- module other.d, same dir as main -- module other; int j; //-- //-- module dir/other.d, subdir of main -- module dir.other; int j; //-- //-- module main.d -- module main; import other; pragma(msg, [__traits(allMembers, (other))]); import dir.other; pragma(msg, [__traits(allMembers, dir.other)]); void main(){} //-- When the module name I use inside __traits is in the same dir as the main module, I need the extra parenthesis to satisfy the compiler. Is this a bug, or unavoidable?
Mar 11 2013
On 3/11/13, cal <callumenator gmail.com> wrote:When the module name I use inside __traits is in the same dir as the main module, I need the extra parenthesis to satisfy the compiler. Is this a bug, or unavoidable?I can't reproduce this. How are you compiling the modules?
Mar 11 2013
On Monday, 11 March 2013 at 23:10:58 UTC, Andrej Mitrovic wrote:On 3/11/13, cal <callumenator gmail.com> wrote:Both rdmd and separate compilation give the error: Import other has no members. if i remove the parenthesis around 'other'.When the module name I use inside __traits is in the same dir as the main module, I need the extra parenthesis to satisfy the compiler. Is this a bug, or unavoidable?I can't reproduce this. How are you compiling the modules?
Mar 11 2013
On Monday, 11 March 2013 at 23:19:18 UTC, cal wrote:On Monday, 11 March 2013 at 23:10:58 UTC, Andrej Mitrovic wrote:Actually it prints out: [false] ["object", "j"] first, and then fails with the above error message.On 3/11/13, cal <callumenator gmail.com> wrote:Both rdmd and separate compilation give the error: Import other has no members. if i remove the parenthesis around 'other'.When the module name I use inside __traits is in the same dir as the main module, I need the extra parenthesis to satisfy the compiler. Is this a bug, or unavoidable?I can't reproduce this. How are you compiling the modules?
Mar 11 2013
On Monday, 11 March 2013 at 23:22:42 UTC, cal wrote:On Monday, 11 March 2013 at 23:19:18 UTC, cal wrote:Specifically: dmd main.d other.d dir/other.d produces: Error: import other has no members [false] ["object", "j"]On Monday, 11 March 2013 at 23:10:58 UTC, Andrej MitrovicI can't reproduce this. How are you compiling the modules?
Mar 11 2013
On 3/12/13, cal <callumenator gmail.com> wrote:if i remove the parenthesis around 'other'.Ah yes, I can recreate it now. Can you file this as a bug?
Mar 11 2013
On Monday, 11 March 2013 at 23:38:20 UTC, Andrej Mitrovic wrote:On 3/12/13, cal <callumenator gmail.com> wrote:Sure thanks for checking itif i remove the parenthesis around 'other'.Ah yes, I can recreate it now. Can you file this as a bug?
Mar 11 2013
On 3/12/13, Andrej Mitrovic <andrej.mitrovich gmail.com> wrote:On 3/12/13, cal <callumenator gmail.com> wrote:Ok I filed it: http://d.puremagic.com/issues/show_bug.cgi?id=9692if i remove the parenthesis around 'other'.Ah yes, I can recreate it now. Can you file this as a bug?
Mar 11 2013