From d483be21afcba5798d87ff1fe0687fd59aa475e6 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Mon, 10 May 2010 15:42:23 -0400 Subject: [PATCH] avoid trying to reconstruct bogus arrow type, use dummy instead original commit: 8461045e8cfaf2dbd4fffb88eed046c44276796a --- collects/typed-scheme/typecheck/tc-subst.rkt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/collects/typed-scheme/typecheck/tc-subst.rkt b/collects/typed-scheme/typecheck/tc-subst.rkt index 1620eb9a..765536ec 100644 --- a/collects/typed-scheme/typecheck/tc-subst.rkt +++ b/collects/typed-scheme/typecheck/tc-subst.rkt @@ -126,12 +126,14 @@ [#:arr dom rng rest drest kws ;; here we have to increment the count for the domain, where the new bindings are in scope (let* ([arg-count (+ (length dom) (if rest 1 0) (if drest 1 0) (length kws))] - [st* (lambda (t) (for-type (+ arg-count k) t))]) - (make-arr (map for-type dom) - (st* rng) - (and rest (for-type rest)) - (and drest (cons (for-type (car drest)) (cdr drest))) - (map for-type kws)))])) + [st* (lambda (t) (index-free-in? (+ arg-count k) t))]) + (for-each for-type dom) + (st* rng) + (and rest (for-type rest)) + (and drest (for-type (car drest))) + (for-each for-type kws) + ;; dummy return value + (make-arr* null Univ))])) (for-type type) #f))