diff options
-rw-r--r-- | meta/template/basic.lua | 2 | ||||
-rw-r--r-- | script/core/diagnostics/assign-type-mismatch.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/meta/template/basic.lua b/meta/template/basic.lua index 0dad91ba..62ab999e 100644 --- a/meta/template/basic.lua +++ b/meta/template/basic.lua @@ -248,7 +248,7 @@ function setfenv(f, table) end ---#DES 'setmetatable' ---@param table table ----@param metatable? metatable +---@param metatable? metatable|table ---@return table function setmetatable(table, metatable) end diff --git a/script/core/diagnostics/assign-type-mismatch.lua b/script/core/diagnostics/assign-type-mismatch.lua index 32d6d7f7..8472e87c 100644 --- a/script/core/diagnostics/assign-type-mismatch.lua +++ b/script/core/diagnostics/assign-type-mismatch.lua @@ -103,7 +103,7 @@ return function (uri, callback) -- local Cat = setmetatable({}, {__index = Animal}) 允许逆变 if hasMarkClass(source) then - if vm.canCastType(uri, valueNode:copy():remove 'metatable', varNode) then + if vm.canCastType(uri, valueNode:copy():remove 'table', varNode) then return end end |