Thanks, that works.<br><br><div class="gmail_quote">On Mon, Aug 9, 2010 at 12:21 AM, Adam Ruppe <span dir="ltr"><<a href="mailto:destructionator@gmail.com">destructionator@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On 8/8/10, Andrej Mitrovic <<a href="mailto:andrej.mitrovich@gmail.com">andrej.mitrovich@gmail.com</a>> wrote:<br>
> I wonder if there's a way to get the static type, is there an equivalent<br>
> function like typeid() for such a case?<br>
<br>
</div>Try this:<br>
<br>
typeid(typeof( X ));<br>
<br>
typeof() returns the static type of the variable. Then, you can get<br>
the typeid of that returned static type.<br>
<br>
Here's a sample program:<br>
====<br>
import std.stdio;<br>
class Something { }<br>
class SomethingElse : Something {}<br>
<br>
void main() {<br>
Something o = new SomethingElse;<br>
writeln(typeid(typeof(o)));<br>
}<br>
====<br>
Prints: test6.Something<br>
</blockquote></div><br>