Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use := to change type in arrays #18

Closed
bvssvni opened this issue Jan 30, 2016 · 0 comments
Closed

Use := to change type in arrays #18

bvssvni opened this issue Jan 30, 2016 · 0 comments
Assignees
Labels

Comments

@bvssvni
Copy link
Member

bvssvni commented Jan 30, 2016

Similar to #5, but designed for arrays.

When using := in arrays, it should not allocate a new slot if the index is outside the range, since this might lead to confusing bugs. However, it can be used to overwrite the type, for example replacing a number with a string.

a = [5]

a[0] = "hello" // ERROR: Expected assigning to text

a[0] := "hello" // OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant