You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the lua specs it should be possible to extract dynamic arguments from a special variable called arg.
The following code is not working:
publicclassObjWrapper{publicstring?Function{get;set;}publicobject[]?Arguments{get;set;}publicvoidyield(stringfunction,paramsobject[]args){Function=function;Arguments=args;}}publicclassTests{[Fact]publicvoidNeoLua_Params(){varcondition=""" function select(...) return obj.yield('select', arg) end select('something', 'something2') """;usingvarlua=newNeo.IronLua.Lua();varenv=lua.CreateEnvironment();varwrapper=newObjWrapper();env["obj"]=wrapper;env.DoChunk(condition,"code.lua");wrapper.Function.Should().BeEquivalentTo("select");wrapper.Arguments.Should().HaveCount(2);wrapper.Arguments![0].Should().BeEquivalentTo("something");wrapper.Arguments[1].Should().BeEquivalentTo("something2");}}
wrapper.Arguments is [null] but should be ["something", "something2"] probably because arg is not set dynamically
The text was updated successfully, but these errors were encountered:
According to the lua specs it should be possible to extract dynamic arguments from a special variable called
arg
.The following code is not working:
wrapper.Arguments
is[null]
but should be["something", "something2"]
probably becausearg
is not set dynamicallyThe text was updated successfully, but these errors were encountered: