moonsharp-devs / moonsharp

An interpreter for the Lua language, written entirely in C# for the .NET, Mono, Xamarin and Unity3D platforms, including handy remote debugger facilities.
http://www.moonsharp.org
Other
1.41k stars 213 forks source link

table.insert mishandles nil #299

Closed Benjamin-Dobell closed 3 years ago

Benjamin-Dobell commented 3 years ago

Lua REPL

> t = {}
> table.insert(t, 1, nil)
> print(#t)
0

MoonSharp REPL

> t = {}
> table.insert(t, 1, nil)
> print(#t)
1