summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-28 20:58:20 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-28 20:58:20 +0800
commit9ad317f2a1eb8dc5715103c8c62e0fcff88a482b (patch)
tree613cb88cdca02cd046872201841d8ce3e25c7783 /script
parent08638eedb6cf74bd815e933f4a90e989a1516948 (diff)
downloadlua-language-server-9ad317f2a1eb8dc5715103c8c62e0fcff88a482b.zip
faster `integer` -> `number`
Diffstat (limited to 'script')
-rw-r--r--script/vm/type.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/script/vm/type.lua b/script/vm/type.lua
index 7eb1b06f..be411899 100644
--- a/script/vm/type.lua
+++ b/script/vm/type.lua
@@ -125,6 +125,10 @@ function vm.isSubType(uri, child, parent, mark)
return true
end
+ if parentName == 'number' and childName == 'integer' then
+ return true
+ end
+
if parentName == 'integer' and childName == 'number' then
if config.get(uri, 'Lua.type.castNumberToInteger') then
return true