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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 18 15:25:47 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=11946

           Summary: "need 'this' to access member" when passing field to
                    template parameter
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: thecybershadow at gmail.com


--- Comment #0 from Vladimir Panteleev <thecybershadow at gmail.com> 2014-01-19 01:25:45 EET ---
////////////////////////////////////////
static // http://d.puremagic.com/issues/show_bug.cgi?id=7805
int f(A...)() { return 0; }

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

This used to compile, but it was broken by
https://github.com/D-Programming-Language/dmd/pull/2794

Also, issue 7805 was not fixed. It was marked as a duplicate of issue 11533,
which the above pull request claims to fix. Whereas before, the "static" was
required to avoid a compiler error, now it makes no difference as a compiler
error occurs with and without "static".

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list