Skip to content

constructor should set node to scope like function #1673

@pilaoda

Description

@pilaoda

const scope = context.pushScope(ScopeType.Function);
const body = transformFunctionBodyContent(context, statement.body);

const scope = context.pushScope(ScopeType.Function);
scope.node = node;
let bodyStatements = transformFunctionBodyContent(context, body);

this break optimized varArg spread:
https://typescripttolua.github.io/play/#code/5.4/GYVwdgxgLglg9mABAFQKYGcoDEAUA6AgQwCcBzdALkULAE8BtAXQEoBvAKES8QAdiYwUfETLpm7AL7t2EADaF06FBigBhRB26IICTMRDQ4xYXhLkqNBiw2ct3PgKEFTo8VqkSgA

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