在元表本身内部调用元表方法

use*_*810 -2 lua metatable

有没有办法在元表本身内部调用元表方法?例如

local t = {}
local mt = {
    __index = {
        dog = function() print("bark") end,
        sound = function() t:dog() end
 }
}

setmetatable(t,mt)

t:Sound()
Run Code Online (Sandbox Code Playgroud)

引发此错误:

尝试调用方法“声音”(零值)

小智 5

因为你Sound没有 sound