July 09, 2004 std.format internal bug - typeinfos | ||||
---|---|---|---|---|
| ||||
This code prints: TypeInfoClass [9] == l while [9] should be == C. this kills the format function, since the name should be TypeInfo_Class as it's TypeInfo_i for int, etc. void main() { class Foo { } writefln(typeid(Foo).classinfo.name); writefln("[9] == ", typeid(Foo).classinfo.name[9]); } regards, Tom |
Copyright © 1999-2021 by the D Language Foundation