digitalmars.D.bugs - [Issue 3915] New: typeid not getting type of offsetof standard property
- d-bugmail puremagic.com (41/41) Mar 09 2010 http://d.puremagic.com/issues/show_bug.cgi?id=3915
- d-bugmail puremagic.com (12/12) Feb 04 2013 http://d.puremagic.com/issues/show_bug.cgi?id=3915
http://d.puremagic.com/issues/show_bug.cgi?id=3915 Summary: typeid not getting type of offsetof standard property Product: D Version: 2.041 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: crimson.magus gmail.com PST --- The expressions typeid( SS.b.offsetof ) and typeid( ss3.b.offsetof ) fail with the error "no property 'offsetof' for type 'char'". Using typeof in between makes them work, as in typeid( typeof( SS.b.offsetof ) ). Changing "offsetof" to "sizeof" also works. Here's the sample program: import std.stdio; struct SS { char a; char b; } void main() { SS ss3; ss3.a = 'A'; ss3.b = 'L'; writeln( SS.b.offsetof ); //writeln( typeid( SS.b.offsetof ) ); // error writeln( ss3.b.offsetof ); //writeln( typeid( ss3.b.offsetof ) ); // error writeln( typeid( typeof( SS.b.offsetof ) ) ); writeln( typeid( typeof( ss3.b.offsetof ) ) ); } But this one is about not getting the type of the "offsetof" standard property. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 09 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3915 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich gmail.com Resolution| |WORKSFORME 18:48:05 PST --- Works in 2.061. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 04 2013