define-generic and define-method creates global bindings in scope

Create issue
Issue #193 resolved
Takashi Kato repo owner created an issue

This should be &undefined

(import (clos user))

(let ()
  (define-generic foo))
foo

Comments (2)

  1. Takashi Kato reporter

    The culprit is %ensure-generic-function procedure. The procedure creates a generic function in passed library. This is needed to make generic function implicitly (and unfortunately, there's a library depending on this behviour).

    What we can do without removing implicit generation is that adding macro environment check. If the environment is not toplevel, then we don't have to make implicitly.

  2. Log in to comment