diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-28 20:58:20 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-28 20:58:20 +0800 |
commit | 9ad317f2a1eb8dc5715103c8c62e0fcff88a482b (patch) | |
tree | 613cb88cdca02cd046872201841d8ce3e25c7783 | |
parent | 08638eedb6cf74bd815e933f4a90e989a1516948 (diff) | |
download | lua-language-server-9ad317f2a1eb8dc5715103c8c62e0fcff88a482b.zip |
faster `integer` -> `number`
-rw-r--r-- | script/vm/type.lua | 4 |
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 |