lua-users home
lua-l archive

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


> An unrelated minor bug in 5.2 (actually 5.1 has it too):
> 
>     S=[[]]
>     T={}
>     C=coroutine.create(function() end)
>     print(type(S),type(T),type(C))
>     print(S<T)
>     print(T<T)
>     print(S<C) -- error message is wrong

This bug is caused by a really dirty trick. Lua are using the third
letter of the type name to distinguish between type names.
"number" and "nil" crash on the first letter, "number" and "function"
crash on the second; but "string" and "thread" crash on the third.

(Yes, I know, this was a really dirty trick...)

-- Roberto