Better error message when definition is missing. Fixes PR 10751.
svn: r18042
This commit is contained in:
parent
c224d2ebfc
commit
39a8c288ec
8
collects/typed-scheme/env/type-env.ss
vendored
8
collects/typed-scheme/env/type-env.ss
vendored
|
@ -63,7 +63,13 @@
|
||||||
(module-identifier-mapping-for-each
|
(module-identifier-mapping-for-each
|
||||||
the-mapping
|
the-mapping
|
||||||
(lambda (id e)
|
(lambda (id e)
|
||||||
(when (box? e) (tc-error/stx id "Declaration for ~a provided, but with no definition" (syntax-e id))))))
|
(when (box? e)
|
||||||
|
(let ([bnd (identifier-binding id)])
|
||||||
|
(tc-error/stx id "Declaration for ~a provided, but ~a ~a"
|
||||||
|
(syntax-e id) (syntax-e id)
|
||||||
|
(cond [(eq? bnd 'lexical) "is a lexical binding"] ;; should never happen
|
||||||
|
[(not bnd) "has no definition"]
|
||||||
|
[else "is defined in another module"])))))))
|
||||||
|
|
||||||
;; map over the-mapping, producing a list
|
;; map over the-mapping, producing a list
|
||||||
;; (id type -> T) -> listof[T]
|
;; (id type -> T) -> listof[T]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user