lua-users home
lua-l archive

a bug in Lua4a table constructor

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


Hi,
I think it is probably a bug in Lua 4 alpha.
Following code from one of Lua docuemnt does work in Lua 3.2.
But in Lua4, I got error on 2nd button() call.
 function button() return {} end -- dummy func
 function hbox() return {} end -- dummy func
 d=hbox{
 button{ label="ok"},
 button{ label="cancel"} --> error: attempt to call a table value.
 }
Single call of function button() in one table is ok. 
Next code also does work in Lua4. (in Linux, IRIX)
 d=hbox{
 [1]=button{ label="ok"},
 [2]=button{ label="cancel"}
 }
I am really looking foward to a release version.
Thank you,
---ueno

AltStyle によって変換されたページ (->オリジナル) /