Fix internal error for untyped kw functions.

Closes PR12932.
Closes PR12922.
This commit is contained in:
Eric Dobson 2012-08-12 16:53:15 -07:00 committed by Sam Tobin-Hochstadt
parent fdd2966cf4
commit 9ef80edfef
2 changed files with 8 additions and 2 deletions

View File

@ -53,11 +53,17 @@
[(syntax-procedure-converted-arguments-property i)
=> (λ (prop)
(define orig (car (flatten prop)))
(define t (kw-convert (lookup-type/lexical orig env)))
(define pre-t
(lookup-type/lexical orig env
#:fail (lambda (i) (lookup-fail i) #f)))
(define t (if pre-t
(kw-convert pre-t)
Err))
(register-type i t)
t)]
[else ((or fail lookup-fail) i)]))))))
;; refine the type of i in the lexical env
;; (identifier type -> type) identifier -> environment
;; a macro for inlining :(

View File

@ -111,6 +111,6 @@
[(arr: mand rng rest drest kws)
(convert kws mand v rng rest drest split?)])))
(make-Poly names (apply cl->* fns))]
[_ (int-err 'kw-convert "non-function type" ft)]))
[_ (int-err "kw-convert: non-function type ~a" ft)]))
(provide kw-convert)