lua-users home
lua-l archive
Is this metamethod __isdef bug?
[
Date Prev
][
Date Next
][Thread Prev][
Thread Next
] [
Date Index
] [
Thread Index
]
Subject
:
Is this metamethod __isdef bug?
From
: "actboy168" <actboy168@
...
>
Date
: 2018年3月14日 22:13:59 +0800
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 ?
-- actboy168
Follow-Ups
:
Is this metamethod __isdef bug?
,
actboy168
Re: Is this metamethod __isdef bug?
,
Roberto Ierusalimschy
References
:
Is this metamethod __isdef bug?
,
actboy168
Prev by Date:
Re: [ANN] Lua 5.4.0 (work1) now available
Next by Date:
Re: [ANN] Lua 5.4.0 (work1) now available
Next by thread:
Re: Installing Lua on macOS in order to update Lua.
Index(es):
Date
Thread
AltStyle
によって変換されたページ
(->オリジナル)
/
アドレス:
モード:
デフォルト
音声ブラウザ
ルビ付き
配色反転
文字拡大
モバイル