diff options
Diffstat (limited to 'script-beta')
-rw-r--r-- | script-beta/parser/guide.lua | 25 | ||||
-rw-r--r-- | script-beta/vm/getClass.lua | 2 |
2 files changed, 15 insertions, 12 deletions
diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua index 9939dce6..8324cfd0 100644 --- a/script-beta/parser/guide.lua +++ b/script-beta/parser/guide.lua @@ -2575,11 +2575,12 @@ function m.viewInferType(infers) local hasDoc for i = 1, #infers do local infer = infers[i] - if infer.source.type == 'doc.class' - or infer.source.type == 'doc.class.name' - or infer.source.type == 'doc.type.name' - or infer.source.type == 'doc.type.array' - or infer.source.type == 'doc.type.generic' then + local src = infer.source + if src.type == 'doc.class' + or src.type == 'doc.class.name' + or src.type == 'doc.type.name' + or src.type == 'doc.type.array' + or src.type == 'doc.type.generic' then if infer.type ~= 'any' then hasDoc = true break @@ -2589,12 +2590,14 @@ function m.viewInferType(infers) if hasDoc then for i = 1, #infers do local infer = infers[i] - if infer.source.type == 'doc.class' - or infer.source.type == 'doc.class.name' - or infer.source.type == 'doc.type.name' - or infer.source.type == 'doc.type.array' - or infer.source.type == 'doc.type.generic' - or infer.source.type == 'doc.type.enum' then + local src = infer.source + if src.type == 'doc.class' + or src.type == 'doc.class.name' + or src.type == 'doc.type.name' + or src.type == 'doc.type.array' + or src.type == 'doc.type.generic' + or src.type == 'doc.type.enum' + or src.type == 'doc.resume' then local tp = infer.type or 'any' if not mark[tp] then types[#types+1] = tp diff --git a/script-beta/vm/getClass.lua b/script-beta/vm/getClass.lua index bd7f6f7c..1623090c 100644 --- a/script-beta/vm/getClass.lua +++ b/script-beta/vm/getClass.lua @@ -2,7 +2,7 @@ local vm = require 'vm.vm' local guide = require 'parser.guide' local function lookUpDocClass(source) - local infers = vm.getInfers(source) + local infers = vm.getInfers(source, 'deep') for _, infer in ipairs(infers) do if infer.source.type == 'doc.class' or infer.source.type == 'doc.type' then |