[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: settable
- From: Edgar Toernig <froese@...>
- Date: Fri, 13 Sep 2002 04:08:58 +0200
Milano Carvalho wrote:
>
> x = {v = 0}
> setmetatable(x, {__settable = function() print("settable") end})
> x.v = 10
>
> It doesn't print nothing.
>
> I'm doing something wrong or is it a bug?
It seems you are right and 5.0-alpha does not use settable and
gettable on real tables any more (it's even documented).
I consider it a bug.
Ciao, ET.
PS: Looking at luaV_[sg]ettable, the interpretation of the different
types of table metamethods (table/function/...) is IMHO a little
bit strange anyway...