Is this a bug, or is my understanding of shared/synchronized still broken:<div><br></div><div><div>module test;</div><div><br></div><div>synchronized class Bob {</div><div>private:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>int _i;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>invariant() { // <span style="background-color: transparent; ">test.d(7): Error: function test.Bob.__invariant () shared is not callable using </span><span style="background-color: transparent; ">argument types ()</span></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>assert(_i == 5);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div>
<div>public:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>this() {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>_i = 5;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>@property</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>int i() {</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>return _i;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div>}</div></div>