[Issue 14404] Class nested within function cannot be created

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Apr 4 02:32:16 PDT 2015


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

--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> ---
TypeInfo_Create.create() takes no parameter, so it cannot create nested classes
with valid context pointer. Today it's filled by null, and any accesses to the
enclosing context will cause Access Violation.

I'm not sure what's expected 'fix' for the issue. The class Foo is declared
inside main(), so constructing Foo instance by using TypeInfo_Create.create()
in main() is definitely redundant.

Are you requiring the create() call should throw a runtime exception for the
impossible nested class construction?

--


More information about the Digitalmars-d-bugs mailing list