-
Notifications
You must be signed in to change notification settings - Fork 47
Description
分析异常
---@diagnostic disable-next-line: missing-return
---@generic T
---@param table table
---@param metatable {__index: T}
---@return T
local function abc(table, metatable) end
---@class B
local B
--- @return B
function newB()
-- abc() 先于 __index = B 分析, 导致 self 为 Unknown
local self = abc({}, { __index = B })
self:notmethod() -- 应该报错
return self
endMetadata
Metadata
Assignees
Labels
No labels