[Issue 5941] Using inner struct which references nested function in a no-attribute or auto-return member function causes "nested function cannot be accessed" error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 18 19:04:54 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5941
yebblies <yebblies at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yebblies at gmail.com
--- Comment #4 from yebblies <yebblies at gmail.com> 2012-01-19 14:04:52 EST ---
In case anyone's wondering about why adding attributes changes anything, the
compiler does a scan of all the top level members in a nested struct to
determine if it contains any functions, and makes it a static struct otherwise.
This is unfortunately done badly/too early and it finds AttributeDeclarations
containing functions but doesn't investigate further.
Given that, it sounds like the requirement for having no attributes is really
just a requirement for a non-static nested struct.
--
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