Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't get completion from return setmetatable() #356

Closed
v6cc opened this issue Jan 20, 2021 · 2 comments
Closed

can't get completion from return setmetatable() #356

v6cc opened this issue Jan 20, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@v6cc
Copy link

v6cc commented Jan 20, 2021

Describe the bug

can't get completion from return setmetatable()

Expected behavior

because setmetatable(t,t2) will return t

hope get completion from return setmetatable(t,t2)

now I have to

t = setmetatable(t,t2)
return t
@sumneko
Copy link
Collaborator

sumneko commented Jan 25, 2021

I cannot reproduce this, please show me the demo code.

@v6cc
Copy link
Author

v6cc commented Jan 25, 2021

I cannot reproduce this, please show me the demo code.

a.lua

local abc = require("abc")

abc.lua (https://0x0.st/--mG.lua)

In abc.lua 1688 line, need change

-- return setmetatable(tag, tag.mt)
tag = setmetatable(tag, tag.mt)
return tag

@sumneko sumneko added the bug Something isn't working label Jan 26, 2021
@sumneko sumneko closed this as completed in 92562f4 Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants