@@ -227,7 +227,7 @@ function mt:remove(name)
227
227
or (c .type == ' doc.type.boolean' and name == ' false' and c [1 ] == false )
228
228
or (c .type == ' doc.type.table' and name == ' table' )
229
229
or (c .type == ' doc.type.array' and name == ' table' )
230
- or (c .type == ' doc.type.sign' and name == ' table ' )
230
+ or (c .type == ' doc.type.sign' and name == c . node [ 1 ] )
231
231
or (c .type == ' doc.type.function' and name == ' function' ) then
232
232
table.remove (self , index )
233
233
self [c ] = nil
@@ -248,7 +248,7 @@ function mt:narrow(name)
248
248
or (c .type == ' doc.type.boolean' and name == ' boolean' )
249
249
or (c .type == ' doc.type.table' and name == ' table' )
250
250
or (c .type == ' doc.type.array' and name == ' table' )
251
- or (c .type == ' doc.type.sign' and name == ' table ' )
251
+ or (c .type == ' doc.type.sign' and name == c . node [ 1 ] )
252
252
or (c .type == ' doc.type.function' and name == ' function' ) then
253
253
goto CONTINUE
254
254
end
@@ -337,10 +337,15 @@ function mt:asTable()
337
337
local c = self [index ]
338
338
if c .type == ' table'
339
339
or c .type == ' doc.type.table'
340
- or c .type == ' doc.type.array'
341
- or c .type == ' doc.type.sign' then
340
+ or c .type == ' doc.type.array' then
342
341
goto CONTINUE
343
342
end
343
+ if c .type == ' doc.type.sign' then
344
+ if c .node [1 ] == ' table'
345
+ or not guide .isBasicType (c .node [1 ]) then
346
+ goto CONTINUE
347
+ end
348
+ end
344
349
if c .type == ' global' and c .cate == ' type' then
345
350
--- @cast c vm.global
346
351
if c .name == ' table'
0 commit comments