Skip to content

Destructuring pattern assignments don't use special assignment behaviour #599

@hazzard993

Description

@hazzard993

Two ways to assign an array's length:

array.length = 0;
[array.length] = [0];

The first results in the ArraySetLength LuaLib being used to correctly shorten the array. The second becomes #array = 0 which doesn't run.

Thinking a prior transformation may need to convert a destructuring pattern to TypeScript assignment statements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions