[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [PATCH] setmetatable({}) causes error
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 13 Jul 2017 12:28:22 -0300
> What's confusing is beating your head against a wall for half an hour trying
> to figure out why on Earth a function call is raising an error before finally
> finding the answer in Lua's _source code_.
The authoritative answer is given by the manual which says
setmetatable (table, metatable)
http://www.lua.org/manual/5.3/manual.html#pdf-setmetatable
Note that the second argument must be present. It is not marked as optional.