You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
local record Object
end
local type Fn = function(self: Object)
local type Alt = {string:Fn}
local obj: Object = {}
(obj as Alt).foo(obj) -- OK
(obj as Alt):foo() -- error: cannot index key 'foo' in type Alt
On plain Lua, obj:foo() is equivalent to obj.foo(obj)
The text was updated successfully, but these errors were encountered:
On plain Lua,
obj:foo()
is equivalent toobj.foo(obj)
The text was updated successfully, but these errors were encountered: