[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

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jun 22 17:46:27 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=5941

Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #6 from Kenji Hara <k.hara.pg at gmail.com> ---
(In reply to Maksim Zholudev from comment #5)
> Is this behavior correct?

Currently it's correct. A nested struct is not constructible outside of the
defined function, because it needs valid enclosing context.

I think the original attribute-dependent issue is fixed.

--


More information about the Digitalmars-d-bugs mailing list