lua-users home
lua-l archive

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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Roberto Ierusalimschy a écrit :
>> 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
> 

	Another question
$> print(C)
	Why is C referred as a 'thread' instead of a coroutine in the error
message? :)

	Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktLcMMACgkQBV7eXqefhqj1lACeJy5U14yfwqZj0nSjfgTyInFG
QGkAoJ1lWuQBeGBKHfAPTxfqc5zNl8wS
=ha0E
-----END PGP SIGNATURE-----