Skip to content

Highlighted syntax error when assigning to arrays #8

Description

@clockworkgeek

To begin with, array-assignment appears Ok.

a = []
a[i] = x

But if an array is a property of some other object then it is red-underlined with the tooltip "no viable alternative at input '='".

@a[i] = x
this.a[i] = x
any.nested.array[i] = x
this[i] = x

The last of those also causes an error even though it is valid, it is probably the same rule which legitimately highlights these bad statements.

null[i] = x
undefined[i] = x

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions