[Nickle] Bug: reference addition bounds check on arrays
Keith Packard
keithp at keithp.com
Sat Jan 15 13:36:28 PST 2005
Around 11 o'clock on Jan 15, "Bart Massey" wrote:
> I *think* this was supposed to work.
>
> > int[3] a;
> > *(int[*]) ar = &a;
> > *(int[*]) ar = &a + 1;
> Unhandled exception invalid_array_bounds ("Element out of range in reference addition", &(int [3]) {<uninit>,<uninit>, <uninit>}, 1)
> <stdin>:3: *int[*] ar = &a + 1;
> >
Nope, this isn't supposed to work -- you're referencing the array, not an
element of the array and the array is in a box with a single element.
What are you trying to get?
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : /pipermail/nickle/attachments/20050115/2fc1f82b/attachment.pgp
More information about the Nickle
mailing list