[Issue 11946] "need 'this' to access member" when passing field to template parameter

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jun 28 02:54:02 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=11946

Jacob Carlborg <doob at me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doob at me.com

--- Comment #39 from Jacob Carlborg <doob at me.com> ---
I'm not sure if this is related but I have a similar case as Vladimir's first
post:



module foo;

static int f(A...)() { pragma(msg, typeof(A)); return 0; }



module bar;

import foo;

struct S { private int x; enum y = f!x(); }



Here "x" is private and I'm accessing the tuple in "f". The error I get is "
Error: struct bar.S member x is not accessible". This worked fine in DMD
2.064.2.

--


More information about the Digitalmars-d-bugs mailing list