today i’ve been messing around with the save/load feature, and found out a few things:
- any function object nested inside a global (e.g.
T_GLOBAL_TABLE = { f = function() return 72 end}) does not survive save-reload - closures don’t seem to survive node transition, unless they’re stored in a global
- storing a closure nested inside a global like in the example above works for the duration of the node,
jump()ing to a different node does not immediately set the closure tonil, but makes it silently returnnilinstead
- storing a closure nested inside a global like in the example above works for the duration of the node,
- closures never survive save-reload
these seem like LOVE/LuaJIT quirks, so it’s not really a complaint, i just found it worth documenting. the short way to document it is “function objects don’t get saved”.
