Skip to content

Conversation

@karliss
Copy link
Contributor

@karliss karliss commented Aug 4, 2016

Array indexes were sometimes integers, sometimes floats causing Append to fail on simple code.

array a = [1]
Append(a, 2)

More ways of causing problems can be found in tests.

Changes:

  • Add float casts when creating array indexes to eleminitate most sources of integers
  • Handle integers in Append, just in case some integers remain
  • Throw an Error from Append in case of index conflict, the old code threw an unhandled exception in such case
@eriksvedang
Copy link
Owner

Very nice! I'll look through and merge this on Monday.

@eriksvedang eriksvedang merged commit 6e0340b into eriksvedang:master Aug 8, 2016
@karliss karliss deleted the integer-indexes branch August 8, 2016 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants