kiss-lang / kiss

A type-safe, compiled Lisp for Haxe programs
GNU Lesser General Public License v2.1
3 stars 0 forks source link

common error: (when object.function arg then) #4

Closed NQNStudios closed 9 months ago

NQNStudios commented 9 months ago
                    (unless uiKeyMappings.exists button
                        (dictSet uiKeyMappings button otherThing))

Is it possible to detect at compile-time that the first argument to if is a function, which is probably a mistake where you meant to be CALLING the function?

NQNStudios commented 9 months ago

Detecting that button is just a symbol doing nothing would catch this, and doesn't require knowing that it comes after a function