File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -1341,8 +1341,8 @@ local compilerSwitch = util.switch()
13411341 hasMarkDoc = vm .bindDocs (source )
13421342 end
13431343
1344+ local key = guide .getKeyName (source )
13441345 if not hasMarkDoc then
1345- local key = guide .getKeyName (source )
13461346 if key then
13471347 vm .compileByParentNode (source .node , key , function (src )
13481348 if src .type == ' doc.field'
@@ -1368,7 +1368,8 @@ local compilerSwitch = util.switch()
13681368 end
13691369
13701370 if source .value then
1371- if not hasMarkDoc or source .value .type == ' table' then
1371+ if not hasMarkDoc
1372+ or (type (key ) == ' string' and util .stringStartWith (key , ' __' )) then
13721373 vm .setNode (source , vm .compileNode (source .value ))
13731374 end
13741375 end
Original file line number Diff line number Diff line change @@ -4293,6 +4293,21 @@ local m = setmetatable({},{ __index = { a = 1 } })
42934293m.<?a?>
42944294]]
42954295
4296+ TEST ' integer' [[
4297+ ---@class metatable : table
4298+ ---@field __index table
4299+
4300+ ---@param table table
4301+ ---@param metatable? metatable
4302+ ---@return table
4303+ function setmetatable(table, metatable) end
4304+
4305+ local mt = {a = 1 }
4306+ local m = setmetatable({},{ __index = mt })
4307+
4308+ m.<?a?>
4309+ ]]
4310+
42964311TEST ' integer' [[
42974312local x = 1
42984313repeat
You can’t perform that action at this time.
0 commit comments