We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3104086 commit ff832f1Copy full SHA for ff832f1
script/parser/compile.lua
@@ -2207,7 +2207,7 @@ local function resolveName(node)
2207
return nil
2208
end
2209
local var = getVariable(node[1], node.start)
2210
- if var and var.type == 'local' then
+ if var and (var.type == 'local' or var.type == 'self') then
2211
node.type = 'getlocal'
2212
node.node = var
2213
if not var.ref then
test/parser_test/syntax_check.lua
@@ -898,12 +898,14 @@ x = 2
898
899
TEST [[
900
global x
901
-function f()
+function <!f!>()
902
local x
903
x = 1
904
905
]]
906
-(nil)
+{
907
+ type = 'VARIABLE_NOT_DECLARED',
908
+}
909
910
-- Still error when assigning to truly undefined name under strict global scope
911
0 commit comments