<div dir="ltr">Fellow ChucKists,<br><br>Below you&#39;ll find some example code proving that extending a array of instances of a home-made class using &quot;.size()&quot;doesn&#39;t properly instantiates the new objects, leading to nullpointers and the shred being dropped. The &quot;&lt;&lt;&quot; operator, using &quot;new&quot; does lead to proper instantiation.<br>
<br>I feel this is a bug.<br><br>Yours,<br>Kas.<br><br>=====================8&lt;==============================<br><br>//instantiate a array of home made classes<br>foo bar[1];<br><br>//check that this works<br>&lt;&lt;&lt;&quot;your lucky number is &quot;, bar[0].value&gt;&gt;&gt;;<br>
<br>//grow by one.<br>bar &lt;&lt; new foo ;<br><br>//make sure it&#39;s instantiated<br>&lt;&lt;&lt;&quot;your lucky number is &quot;, bar[1].value&gt;&gt;&gt;;<br><br>//grow by a another one<br>bar.size(bar.size() + 1);<br>
<br>//make sure we did, size should now be 3<br>&lt;&lt;&lt;&quot;size is now&quot;, bar.size()&gt;&gt;&gt;;<br><br>//try to verify this is instantiated, it won&#39;t be<br>&lt;&lt;&lt;&quot;your unlucky number is &quot;, bar[2].value&gt;&gt;&gt;;<br>
<br>class foo<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; Std.rand2(0, 10) =&gt; int value;<br>&nbsp;&nbsp;&nbsp; }<br>===================================================<br></div>