katsaii / catspeak-lang

A cross-platform modding language for GameMaker games.
https://www.katsaii.com/catspeak-lang/
MIT License
94 stars 6 forks source link

Passing `undefined` to `catspeak_method` and then calling the result, causes a mess with scopes! #133

Open tabularelf opened 4 months ago

tabularelf commented 4 months ago

What version of Catspeak are you using?

3.1.0

What happened?

Passing undefined to catspeak_method with a Catspeak function, causes the self to be undefined and other to be the previous self upon calling. It should at the very least not change self/other in this matter. Though as it's unlikely someone will use undefined as the scope, I'd find this to be a low priority.

katsaii commented 4 months ago

I've looked into this and it might be a more involved change than I'm thinking. It might have to wait until I can make more destructive changes in a potential v4 of Catspeak.