-
one mistake i always trend to make is calling a method by dot like currently lua-language-server does not report this as an error, but it does is an error. so can we make this misuse as a diagnostic error?
(i dont know what this calling manner is called generally in lua |
Beta Was this translation helpful? Give feedback.
Answered by
sumneko
Oct 12, 2022
Replies: 1 comment 2 replies
-
You can catch it by annotation local foo = {
---@param self table
bar = function(self)
return "bar"
end
}
foo.bar() --> raise warning here |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
haolian9
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can catch it by annotation