Bug 2844 – Result of getMembers cannot be used because of const
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2009-04-16T19:43:00Z
Last change time
2014-02-21T21:43:39Z
Assigned to
nobody
Creator
daniel.keep+d.puremagic.com
Comments
Comment #0 by daniel.keep+d.puremagic.com — 2009-04-16T19:43:05Z
(Note: report is for DMD 2.028.)
The getMembers and xgetMembers functions in ClassInfo and TypeInfo_Struct are more or less useless because they return const(MemberInfo[]). None of the methods of MemberInfo are const, and so cannot be called unless you explicitly cast away const-ness.
Comment #1 by dlang-bugzilla — 2014-02-21T21:43:39Z
This looks like it is resolved now: TypeInfo methods are properly const-annotated, although there are no longer any getMembers and xgetMembers methods.