diff options
author | V1K1NGbg <victor@ilchev.com> | 2024-08-04 16:53:33 +0300 |
---|---|---|
committer | V1K1NGbg <victor@ilchev.com> | 2024-08-05 20:51:31 +0300 |
commit | 31a2cb52b0b4dbaa3f5bd17de18aabe40fa37e93 (patch) | |
tree | dd187f1d2f7f586c11ada0fbf193343bdfc1689d | |
parent | d1dc2b9f15eaae12610deee26c8eb8fd91d998fa (diff) | |
download | luarocks-31a2cb52b0b4dbaa3f5bd17de18aabe40fa37e93.tar.gz luarocks-31a2cb52b0b4dbaa3f5bd17de18aabe40fa37e93.tar.bz2 luarocks-31a2cb52b0b4dbaa3f5bd17de18aabe40fa37e93.zip |
type_check
-rw-r--r-- | src/luarocks/type_check.lua | 12 | ||||
-rw-r--r-- | src/luarocks/type_check.tl | 14 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/luarocks/type_check.lua b/src/luarocks/type_check.lua index 50eceddf..77f9ef24 100644 --- a/src/luarocks/type_check.lua +++ b/src/luarocks/type_check.lua | |||
@@ -31,9 +31,9 @@ type_check.MAGIC_PLATFORMS = {} | |||
31 | do | 31 | do |
32 | local function fill_in_version(tbl, version) | 32 | local function fill_in_version(tbl, version) |
33 | 33 | ||
34 | 34 | if not tbl.fields then | |
35 | 35 | return | |
36 | 36 | end | |
37 | 37 | ||
38 | for _, v in pairs(tbl.fields) do | 38 | for _, v in pairs(tbl.fields) do |
39 | if type(v) == "table" then | 39 | if type(v) == "table" then |
@@ -191,10 +191,10 @@ function type_check.type_check_table(version, tbl, typetbl, context) | |||
191 | return nil, errcheck | 191 | return nil, errcheck |
192 | end | 192 | end |
193 | 193 | ||
194 | if not typetbl.fields then | ||
194 | 195 | ||
195 | 196 | return true | |
196 | 197 | end | |
197 | |||
198 | 198 | ||
199 | for k, v in pairs(tbl) do | 199 | for k, v in pairs(tbl) do |
200 | local t = typetbl.fields[tostring(k)] or typetbl._any | 200 | local t = typetbl.fields[tostring(k)] or typetbl._any |
diff --git a/src/luarocks/type_check.tl b/src/luarocks/type_check.tl index 6b5dbb16..7c3c4064 100644 --- a/src/luarocks/type_check.tl +++ b/src/luarocks/type_check.tl | |||
@@ -31,9 +31,9 @@ type_check.MAGIC_PLATFORMS = {} | |||
31 | do | 31 | do |
32 | local function fill_in_version(tbl: TableSchema, version?: string) | 32 | local function fill_in_version(tbl: TableSchema, version?: string) |
33 | 33 | ||
34 | -- if not tbl.fields then --! validation | 34 | if not tbl.fields then --! validation |
35 | -- return | 35 | return |
36 | -- end | 36 | end |
37 | 37 | ||
38 | for _, v in pairs(tbl.fields) do | 38 | for _, v in pairs(tbl.fields) do |
39 | if v is TableSchema then | 39 | if v is TableSchema then |
@@ -191,10 +191,10 @@ function type_check.type_check_table(version: string, tbl: {any: any}, typetbl: | |||
191 | return nil, errcheck | 191 | return nil, errcheck |
192 | end | 192 | end |
193 | 193 | ||
194 | -- if not typetbl.fields then --! validation | 194 | if not typetbl.fields then --! validation |
195 | -- -- if there are no fields, exit the checker | 195 | -- if there are no fields, exit the checker |
196 | -- return true | 196 | return true |
197 | -- end | 197 | end |
198 | 198 | ||
199 | for k, v in pairs(tbl) do | 199 | for k, v in pairs(tbl) do |
200 | local t = typetbl.fields[tostring(k)] or typetbl._any --! tostring | 200 | local t = typetbl.fields[tostring(k)] or typetbl._any --! tostring |