[Issue 15185] [REG2.069.0-b1] Not possible to create instance of TypeInfo
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Oct 13 10:11:53 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=15185
--- Comment #7 from Steven Schveighoffer <schveiguy at yahoo.com> ---
(In reply to Jacob Carlborg from comment #6)
>
> The existing code will evaluate to "const(TypeInfo)". Your suggestion
> evaluates to "TypeInfo_Const". I guess I could hard code "const(TypeInfo)",
> but then I need put the whole alias declaration in a string mixin.
OK, I see now.
Honestly, I don't see this as a regression. TypeInfo was not meant to be
instantiated by user code. The fact that it worked I don't think was intended,
just an accident (The runtime obviously never instantiates a direct TypeInfo,
it's always a subclass).
I recommend employing a workaround and closing this bug.
--
More information about the Digitalmars-d-bugs
mailing list