Hi! I recently came across strict.lua
which is included with the SDK libraries, and found out that the Object and Animator libs are not compatible with it (version 1.12.3).
It looks like animator.lua
is simply missing a local
on line 227:
time = checkTime(self, intime)
And object.lua
tries this on line 80:
_G[__NewClass.className] = Child
which throws a assign to undeclared variable
error.
I'm not really sure if there is a nice way of resolving the latter issue, I tried 2 ideas so far:
- Adding a global
ignore_strict
flag to temporarily allow the assignment (which feels a bit hacky) - Removing the assignment altogether and simply
return Child
(which feels more natural but does break the API ofclass().extends()
)
Admittedly this is probably a rather niche issue but it felt a little unexpected that these included libraries are not (fully) compatible with each other.