dynamiclua icon indicating copy to clipboard operation
dynamiclua copied to clipboard

Calling an table with a __call metamethod from C# fails

Open nrother opened this issue 11 years ago • 0 comments

This fails:

dynamic tab = lua.NewTable("tab");
dynamic mt = lua.NewTable("mt");
mt.__call = new Func<dynamic, object>((t) => "call no args");
tab.SetMetatable(mt);
lua.tab()); //fail
System.InvalidCastException: Das Objekt des Typs "NLua.LuaTable" kann nicht in Typ "NLua.LuaFunction" umgewandelt werden.

nrother avatar Mar 05 '14 14:03 nrother