www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13833] New: .classinfo.name (and typeid(obj)) does not print

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 puremagic.com
          Reporter: andrej.mitrovich 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

--
Dec 08 2014