lua-users home
lua-l archive

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


Hi,

I just noticed that indexing a table with nil as in the following session actually returns nil when the manual is explicit about the fact that nil and NaN are not allowed as keys.  It doesn't bother me really and I imagine it can be useful at times, but is this deliberate?  If so shouldn't it be documented or did I just miss it in the manual?

Lua 5.2.0  Copyright (C) 1994-2011 Lua.org, PUC-Rio
> a = {};return a[nil]
nil

Dimitris