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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 21 00:25:07 PST 2014


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


Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at digitalmars.com


--- Comment #5 from Walter Bright <bugzilla at digitalmars.com> 2014-01-21 00:25:04 PST ---
(In reply to comment #0)
> ////////////////////////////////////////
> 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".

This should never have compiled. static should never have affected a template
in global scope.

-- 
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