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

How can ArrayExpression have null elements? #206

Closed
tjenkinson opened this issue Nov 30, 2019 · 2 comments
Closed

How can ArrayExpression have null elements? #206

tjenkinson opened this issue Nov 30, 2019 · 2 comments

Comments

@tjenkinson
Copy link
Contributor

It looks like that an element can be null in ArrayExpression

interface ArrayExpression <: Expression {
    type: "ArrayExpression";
    elements: [ Expression | null ];
}

How is this possible? What does null mean here?

Thanks

@tjenkinson tjenkinson changed the title How can ArrayExpression have null elements How can ArrayExpression have null elements? Nov 30, 2019
@mysticatea
Copy link
Contributor

It's a sparse array. For example:

let array = [,,,]

@tjenkinson
Copy link
Contributor Author

Thanks!

I opened a PR to add this: #207

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants