lua-users home
lua-l archive

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

On Mon, Dec 21, 2009 at 7:39 PM, Sam Roberts <> wrote:
> Depends on how you implemented inheritance, doesn't it?

Indeed, metamethods like __tostring must belong to the direct MT of a
table, and not via inheritance.   I've always done 'fat metatable'
inheritance so the problem never appears since metatables are never
shared between classes.