Skip to content

making lua-lang-server take care of the calling manner of foo.bar(self, ...) #1624

Closed Answered by sumneko
haolian9 asked this question in Q&A
Discussion options

You must be logged in to vote

You can catch it by annotation

local foo = {
    ---@param self table
    bar = function(self)
        return "bar"
    end
}

foo.bar() --> raise warning here

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@haolian9
Comment options

@haolian9
Comment options

Answer selected by haolian9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants