Let's assume we have a file /tmp/foo.scm containing:
(module-export foo)
(module-static #t)
(module-compile-options
warn-invoke-unknown-method: #t
warn-undefined-variable: #t)
(define (foo) (bar))
(define (bar) (format #t "version 1\n"))
Then start the interpreter with kawa --no-inline
and do this:
#|kawa:1|# (require "/tmp/foo.scm")
/tmp/foo.scm:9:15: warning - no declaration seen for format
#|kawa:2|# (define baz foo)
#|kawa:3|# (foo)
version 1
#|kawa:4|# (baz)
version 1
So far so good. Now let's change the function bar in the file to:
(define (bar) (format #t "version 2\n"))
and continue with this
#|kawa:5|# (require "/tmp/foo.scm")
/tmp/foo.scm:9:15: warning - no declaration seen for format
#|kawa:6|# (foo)
version 2
#|kawa:7|# (baz)
version 1
#|kawa:8|#
Isn't baz supposed to call version 2?