tree-il: Pass the environment to warning passes.
[bpt/guile.git] / module / language / tree-il / compile-glil.scm
index d13cf7c..a78eaa6 100644 (file)
     (or (and=> (memq #:warnings opts) cadr)
         '()))
 
-  ;; Go throught the warning passes.
+  ;; Go through the warning passes.
   (for-each (lambda (kind)
                 (let ((warn (assoc-ref %warning-passes kind)))
                   (and (procedure? warn)
-                       (warn x))))
+                       (warn x e))))
             warnings)
 
   (let* ((x (make-lambda (tree-il-src x) '() '() '() x))