[Issue 13833] New: .classinfo.name (and typeid(obj)) does not print proper dynamic type when using a templated interface
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Dec 8 03:37:17 PST 2014
https://issues.dlang.org/show_bug.cgi?id=13833
Issue ID: 13833
Summary: .classinfo.name (and typeid(obj)) does not print
proper dynamic type when using a templated interface
Product: D
Version: D1 & D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: andrej.mitrovich at gmail.com
-----
module test;
import std.stdio;
interface I(T) { }
class D : I!(int) { }
void main()
{
I!(int) i = new D;
writeln(i.classinfo.name);
writeln(typeid(i)); // ditto
}
-----
Prints:
test.I!(int).I
It should print:
test.D
--
More information about the Digitalmars-d-bugs
mailing list