Thread overview
[Issue 14404] ClassInfo.create should forbid creating nested classes
[Issue 14404] Class nested within function cannot be created
Apr 04, 2015
Kenji Hara
Jun 26, 2017
Vladimir Panteleev
Jun 26, 2017
Vladimir Panteleev
April 04, 2015
https://issues.dlang.org/show_bug.cgi?id=14404

--- Comment #1 from Kenji Hara <k.hara.pg@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?

--
June 26, 2017
https://issues.dlang.org/show_bug.cgi?id=14404

Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3
                 CC|                            |dlang-bugzilla@thecybershad
                   |                            |ow.net
           Hardware|x86_64                      |All
            Summary|Class nested within         |ClassInfo.create should
                   |function cannot be created  |forbid creating nested
                   |                            |classes
                 OS|Linux                       |All
           Severity|critical                    |minor

--
June 26, 2017
https://issues.dlang.org/show_bug.cgi?id=14404

--- Comment #2 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
(In reply to Kenji Hara from comment #1)
> Are you requiring the create() call should throw a runtime exception for the impossible nested class construction?

Updated issue title accordingly.

--