Objects are poor mans closures, or was it the other way arround? Anyways, I would like to inspect upvalues in closures.
I made a semi functional version, which proofs the concept viable. However I am not familiar enough with the project to quickly add everything to make it work. It looks nice and dandy, until inspecting the upvalue:
The issue is, the debugger expects the value to be a table and tries to index by upvalue. I am not doing any magic, just reusing your getUpValues function, so the solution would be to detect whenever it is a function, and ask for the upvalues in a different way. Maybe if I get enough time on my hand, I will open a pull request. In the meantime you can view the changes I made here.
Objects are poor mans closures, or was it the other way arround? Anyways, I would like to inspect upvalues in closures. I made a semi functional version, which proofs the concept viable. However I am not familiar enough with the project to quickly add everything to make it work. It looks nice and dandy, until inspecting the upvalue: The issue is, the debugger expects the value to be a table and tries to index by
upvalue
. I am not doing any magic, just reusing yourgetUpValues
function, so the solution would be to detect whenever it is a function, and ask for the upvalues in a different way. Maybe if I get enough time on my hand, I will open a pull request. In the meantime you can view the changes I made here.