TypeInfo_Class.interfaces[n].classinfo has TypeInfo_Class and not TypeInfo_Interface?

Tofu Ninja joeyemmons at yahoo.com
Sun Dec 24 05:21:44 UTC 2017


I didn't get any response in learn for this so I will ask it here.

TypeInfo_Class.interfaces[n].classinfo has TypeInfo_Class and not 
TypeInfo_Interface?

Is this correct? Or is it a bug?
Doesn't make much sense to me.

Also the following code prints false so there are some 
consequences to this.
# # ]]]]]]]]]]]]
import std.stdio;
void main(string[] args) {
	writeln(typeid(c).interfaces[0].classinfo == typeid(i)); // false
}
interface i {}
class c : i {}

What is the proper way to handle this mismatch?
Is this mismatch intended or just some implementation detail?
Peoples thoughts on this?


More information about the Digitalmars-d mailing list