Skip to content

Modifying local reference of a table does not update the table in other files #3025

@Poltergeist-ix

Description

@Poltergeist-ix

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Other

Expected Behaviour

See the changes to table in all files.

Actual Behaviour

The changes do not appear in other files when modifying the local reference.

Reproduction steps

File 1:

MyTable = {zx = 1}

File 2:

require "Ready"
local MyTable = MyTable
MyTable.test = {a = "abc"}

File 3:

require "Set"
local MyTable = MyTable

image

However if file 2 does not use a local reference then it works as expected.

image

Additional Notes

No response

Log File

No response

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