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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 26 12:51:47 PST 2014


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



--- Comment #25 from Walter Bright <bugzilla at digitalmars.com> 2014-01-26 12:51:42 PST ---
I suspect this should work:

  int f(alias A)() { return 0; }
  struct S { int x; enum y = f!x(); }

whereas this should not:

  int f(alias A)() { return A; }
  struct S { int x; enum y = f!x(); }

i.e. this check:

  foo3.d(1): Error: function foo3.S.f!(x).f need 'this' to access member f

should not be done for arguments to template alias parameters.

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