sasagawa888 / eisl

ISLisp interpreter/compiler
Other
267 stars 22 forks source link

Compiler error for flet #274

Closed gtnoble closed 1 year ago

gtnoble commented 1 year ago
(defun flet-bug ()
  (flet ((test-func () T))
    (let* ((result "flet test"))
      result)))

(defun flet-bug-1 ()
  (flet ((test-func () T))
      "flet test")) 

in the interpreter this code runs as expected:

Easy-ISLisp Ver2.96
> (load "bug.lsp")
T
> (flet-bug)
"flet test"
> (flet-bug-1)
"flet test"

When compiling, I get an error:

Easy-ISLisp Ver2.98
> (compile-file "bug.lsp")
type inference
Not a list at REVERSE "flet test"
debug mode ?(help)
sasagawa888 commented 1 year ago

I fixed it, Thank you.