diff options
author | Lei Zhu <uhziel@gmail.com> | 2020-12-29 19:37:21 +0800 |
---|---|---|
committer | Lei Zhu <uhziel@gmail.com> | 2020-12-29 19:37:21 +0800 |
commit | 42f9c7d02d6062ce7216abc1489f7a48761cd574 (patch) | |
tree | 8ff0a4ed5bd557f9804628fbb8ccc277a6982475 /test/example | |
parent | 248ca2a2ba50f2c059d8ab2d3d5688584e98bf62 (diff) | |
download | lua-language-server-42f9c7d02d6062ce7216abc1489f7a48761cd574.zip |
提交对 doc.type.map 支持的初版,可以处理推导 v1[1].bar1 的情况
Diffstat (limited to 'test/example')
-rw-r--r-- | test/example/guide.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/example/guide.txt b/test/example/guide.txt index 437e37b0..da8d5c32 100644 --- a/test/example/guide.txt +++ b/test/example/guide.txt @@ -2702,7 +2702,7 @@ function m.viewInferType(infers) 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 + or src.type == 'doc.type.table' then if infer.type ~= 'any' then hasDoc = true break @@ -2717,7 +2717,7 @@ function m.viewInferType(infers) 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.table' or src.type == 'doc.type.enum' or src.type == 'doc.resume' then local tp = infer.type or 'any' @@ -2946,7 +2946,7 @@ local function getDocTypeUnitName(status, unit) typeName = 'function' elseif unit.type == 'doc.type.array' then typeName = getDocTypeUnitName(status, unit.node) .. '[]' - elseif unit.type == 'doc.type.generic' then + elseif unit.type == 'doc.type.table' then typeName = ('%s<%s, %s>'):format( getDocTypeUnitName(status, unit.node), m.viewInferType(m.getDocTypeNames(status, unit.key)), |