lua-users home
lua-l archive

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


Let's assume I've given nil and metatable and in the examples below made nil's metatable accessible via nilmt.

It seems that setting a __len metamethod for nil also affects other types (eg, functions):

> nilmt.__len = function()return 7 end
> return #nil
7
> return #function()end
7

Now, I don't really have an excuse for poking around in this dark corner, but...
is this intended?

drj