[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is this metamethod __isdef bug?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 14 Mar 2018 11:33:03 -0300
> This is the test code.
>
> > local mt = {}
> > function mt:__isdef()
> > return true
> > end
> > local t = setmetatable({}, mt)
> > print(t.a == undef)
>
> And the output is:
> > >>lua test.lua
> > lua: test.lua:6: attempt to call a boolean value (global 'print')
> > stack traceback:
> > test.lua:6: in main chunk
> > [C]: in ?
Yes, this is a bug. Thanks for the report.
-- Roberto