diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-11-08 23:33:15 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-11-08 23:33:15 +0800 |
commit | 4d73939b6ec2320f72b35e1e193b8bf1fb18f64c (patch) | |
tree | ccd6e90f7ed456b80ea32cfbac562aee475897ba /script/vm/type.lua | |
parent | e7f8bc78843c03c677668a676f124902b2b889a2 (diff) | |
download | lua-language-server-4d73939b6ec2320f72b35e1e193b8bf1fb18f64c.zip |
fix incorrect type check for generic with nil
Diffstat (limited to 'script/vm/type.lua')
-rw-r--r-- | script/vm/type.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/script/vm/type.lua b/script/vm/type.lua index 57a6444f..32b8e50b 100644 --- a/script/vm/type.lua +++ b/script/vm/type.lua @@ -355,6 +355,9 @@ function vm.isSubType(uri, child, parent, mark, errs) return true end end + if n.type == 'doc.generic.name' then + return true + end end if parent:isOptional() then if vm.isSubType(uri, child, 'nil', mark, errs) == true then |