diff --git a/compiler/gtn.lisp b/compiler/gtn.lisp index 5c52966c2ff5a2ba24dbb924e6b5600a97714493..1223e1bd4317ef212eafc31cb1a1c915b7379808 100644 --- a/compiler/gtn.lisp +++ b/compiler/gtn.lisp @@ -87,7 +87,10 @@ (dolist (thing (environment-closure env)) (let ((ptype (etypecase thing - (lambda-var (primitive-type (leaf-type thing))) + (lambda-var + (if (lambda-var-indirect thing) + *any-primitive-type* + (primitive-type (leaf-type thing)))) (nlx-info *any-primitive-type*)))) (unless xep-p (args (make-normal-tn ptype)))