From 9ad317f2a1eb8dc5715103c8c62e0fcff88a482b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 28 Jun 2022 20:58:20 +0800 Subject: faster `integer` -> `number` --- script/vm/type.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'script') 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 -- cgit v1.2.3