lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Thu, Jan 28, 2016 at 6:06 PM, Dirk Laurie <> wrote:
Any function supplied as a metamethod must have the same argument
and return value lis as the built-in function it replaces.

Except there does not seem to be any definitive description of the built-in function, either.

Besides, there need not be a built-in function to begin with. The manual says:

"index": The indexing access table[key]. This event happens when table is not a table [...].

It is well documented what happens when the argument and return value
counts in a function call of a function differ from what is expected.

I take issue with the fact that the manual does not describe what is expected.

Wrong only in the sense that the extra return values are quietly

The behaviour I encountered was more bizarre than that, probably because there was a few C/Lua transitions in that particular case.