tsuki 0.4.8

Lua 5.4 ported to Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-- nil key
local t = {}
local ok, msg, src, ln = pcall(function ()
  t[nil] = 'this should fails'
end)

assert(not ok)
assert(msg == 'key is nil')
assert(src:sub(-10) == 'badkey.lua')
assert(ln == 4)

-- NaN key
local ok, msg = pcall(function ()
  t[0/0] = 'this should fails'
end)

assert(not ok)
assert(msg == 'key is NaN')