[Issue 7270] Wrong writeln(typeid(T)) with const
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 11 06:42:11 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7270
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Wrong writeln(T.stringof) |Wrong writeln(typeid(T))
|with const |with const
--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2012-01-11 06:42:09 PST ---
This is TypeInfo.toString problem.
import std.stdio;
void main() {
alias const(const(int)[]) T;
pragma(msg, "1: ", T.stringof);
writeln("2: ", typeid(T));
writeln("3: ", T.stringof);
}
Output:
----
1: const(int[]) // pragma + T.stringof
2: const(const(int)[]) // writeln + typeid(T) (== TypeInfo.toString())
3: const(int[]) // writeln + T.stringof
Changed the title.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list