Skip to content

'local'-keyword has unexpected behavior #194

@SkyyySi

Description

@SkyyySi

Currently, local behaves in an unexpected way. For example, this YueScript code ...

local x = "y"

... compiles to the following Lua code:

local x
x = "y"

I would appreciate it if this was changed to behave the same as it does in Lua. If someone is going out of their way to explicitly declare the variable in the same statement, then there's likely a reason for it. If someone really wanted to pre-declare the variable, they could just do that instead.

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