[Issue 3052] Passing alias to member function does not work (2/2)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 14 01:07:30 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=3052


Trass3r <mrmocool at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mrmocool at gmx.de


--- Comment #1 from Trass3r <mrmocool at gmx.de> 2011-07-14 01:02:14 PDT ---
This is because dmd checks in TemplateInstance::hasNestedArgs that the template
declaration is in module scope:
if (tempdecl->toParent()->isModule())


And with a little hack:

// if module level template or a static member of an aggregate
// NOTE not sure if there is a better way to determine the storage class of a
templated class method
if (tempdecl->toParent()->isModule() || (tempdecl->isMember() &&
tempdecl->scope->stc & STCstatic))

we get

Error: need 'this' to access member next

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


More information about the Digitalmars-d-bugs mailing list