March 09, 2010 [Issue 3915] New: typeid not getting type of offsetof standard property | ||||
---|---|---|---|---|
| ||||
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 --- Comment #0 from Aldo Nunez <crimson.magus@gmail.com> 2010-03-09 11:43:00 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 ) ) ); } This problem looks related to bugs #3643 and 1684. 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: ------- |
February 05, 2013 [Issue 3915] typeid not getting type of offsetof standard property | ||||
---|---|---|---|---|
| ||||
Posted in reply to Aldo Nunez | 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 --- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-02-04 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: ------- |
Copyright © 1999-2021 by the D Language Foundation