Mercerenies / gdlisp

Lisp on the Godot platform
GNU General Public License v3.0
141 stars 1 forks source link

Interaction between macros and `labels` keyword #21

Closed Mercerenies closed 3 years ago

Mercerenies commented 3 years ago

Macro expansion currently understands (and respects) the bindings of flet, but not those of labels. Specifically, in the following code

(defmacro foo () ...)
(labels ((foo () (foo)))
  (foo))

The mention of foo in the labels body correctly calls the locally-defined function. However, the one inside of the foo definition should call the local function foo but inside performs macro expansion using the global macro.

Mercerenies commented 3 years ago

41f6eb4 closes this issue. labels blocks now behave correctly in the presence of similarly named macros.