[chuck-users] Assigning to appended array locations (bug?)

Kassen signal.automatique at gmail.com
Sun Sep 28 14:29:00 EDT 2008


Fellow ChucKists,

I believe the code below demonstrates at least one bug that's keeping Mike
from enjoying his spaghetti. There are definitely more related issues here
but this is one. Appended non-primitive array locations can't be assigned
to; clearly these are somehow different from array locations created when
the array was created. Not creating a explicit "new" instance and instead
appending a different instance directly also leads to reference issues,
quite probably these are related.


=================================
class Foo
    {
    int value;
    }

Foo foo[8];

Foo bar;
bar @=> foo[7];

foo << new Foo;

<<<"all is fine so far", "">>>;

Foo baz;

<<<"everybody crash ChucK tonight", "">>>;
baz @=> foo[8];
================================

Yours,
Kas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20080928/b21b932a/attachment.html>


More information about the chuck-users mailing list