And here's a working example:
<div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><font class="Apple-style-span" face="'courier new', monospace">import std.stdio;</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace">import variant;</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace">import std.string;</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace">import std.conv;</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div></div>
<div><div><font class="Apple-style-span" face="'courier new', monospace">//----</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace">class Base</font></div></div><div>
<div><font class="Apple-style-span" face="'courier new', monospace"> {</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> private int y; //check if a variable causes any problems</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"> </font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> //run all member functions that start with "in"</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"> public void RunAllIn(alias T) ()</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> {</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"> writeln("RunAllIn: ", typeid(T));</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> Variant.__register!T;</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"> Variant var = this;</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> foreach (i, m; __traits(derivedMembers, T))</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"> {</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> if (!startsWith(m, "in"))</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"> {</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> continue;</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"> }</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> </font></div></div>
<div><div><font class="Apple-style-span" face="'courier new', monospace"> writeln("== i=", i, " m=", m);</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> var.__reflect(m);</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"> }</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> }</font></div></div><div>
<div><font class="Apple-style-span" face="'courier new', monospace"> }</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace">//----</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace">class Bob : Base</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> {</font></div></div>
<div><div><font class="Apple-style-span" face="'courier new', monospace"> private int x; //check if a variable causes any problems</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> //private int inx; //causes an exception</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"> </font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> this()</font></div></div><div>
<div><font class="Apple-style-span" face="'courier new', monospace"> {</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> RunAllIn!Bob;</font></div></div>
<div><div><font class="Apple-style-span" face="'courier new', monospace"> }</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div></div><div><div>
<font class="Apple-style-span" face="'courier new', monospace"> public void inBob1()</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> {</font></div></div>
<div><div><font class="Apple-style-span" face="'courier new', monospace"> writeln(" in bob : inBob1()");</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> }</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> public void inBob2()</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"> {</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> writeln(" in bob : inBob2()");</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"> }</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> }</font></div></div><div>
<div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace">//----</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace">class Jane: Base</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"> {</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> this()</font></div></div><div>
<div><font class="Apple-style-span" face="'courier new', monospace"> {</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> RunAllIn!Jane;</font></div></div>
<div><div><font class="Apple-style-span" face="'courier new', monospace"> }</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> </font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> public void inJane1()</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"> {</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> writeln(" in jane : inJane1()");</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"> }</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> </font></div></div><div><div>
<font class="Apple-style-span" face="'courier new', monospace"> public void inJane2()</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> {</font></div></div>
<div><div><font class="Apple-style-span" face="'courier new', monospace"> writeln(" in jane : inJane2()");</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> }</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"> }</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div></div><div><div>
<font class="Apple-style-span" face="'courier new', monospace">void main(string[] args)</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> {</font></div></div><div>
<div><font class="Apple-style-span" face="'courier new', monospace"> new Bob();</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> new Jane();</font></div></div>
<div><div><font class="Apple-style-span" face="'courier new', monospace"> }</font></div></div></blockquote><div><br></div><div>The output is:</div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div><div><font class="Apple-style-span" face="'courier new', monospace">$ rm -f dtest; dmd dtest.d variant.d -ofdtest; ./dtest</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace">RunAllIn: dtest.Bob</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace">== i=2 m=inBob1</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> in bob : inBob1()</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace">== i=3 m=inBob2</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> in bob : inBob2()</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace">RunAllIn: dtest.Jane</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace">== i=1 m=inJane1</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"> in jane : inJane1()</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace">== i=2 m=inJane2</font></div>
</div><div><div><font class="Apple-style-span" face="'courier new', monospace"> in jane : inJane2()</font></div></div></blockquote><div><br></div><div>Perfect, thanks Robert! Works like a charm.</div><div><br></div>