File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,13 @@ function mt:_eraseAlias(uri)
220220 if set .type == ' doc.alias' then
221221 if expandAlias then
222222 drop [n .name ] = true
223+ local newInfer = {}
224+ for _ , ext in ipairs (set .extends .types ) do
225+ viewNodeSwitch (ext .type , ext , newInfer )
226+ end
227+ if newInfer ._hasTable then
228+ self .views [' table' ] = true
229+ end
223230 else
224231 for _ , ext in ipairs (set .extends .types ) do
225232 local view = viewNodeSwitch (ext .type , ext , {})
Original file line number Diff line number Diff line change @@ -2349,3 +2349,24 @@ TEST 'number' [[
23492349for <?x?> in _ do
23502350end
23512351]]
2352+
2353+ TEST ' table' [[
2354+ ---@alias tp table
2355+
2356+ ---@type tp
2357+ local <?x?>
2358+ ]]
2359+
2360+ TEST ' table' [[
2361+ ---@alias tp {name: boolean}
2362+
2363+ ---@type tp
2364+ local <?x?>
2365+ ]]
2366+
2367+ TEST ' boolean|table' [[
2368+ ---@alias tp boolean | {name: boolean}
2369+
2370+ ---@type tp
2371+ local <?x?>
2372+ ]]
You can’t perform that action at this time.
0 commit comments