Ignore duplicate signature declarations.
This commit is contained in:
parent
87da2f35b9
commit
91590040dc
|
@ -48,11 +48,16 @@
|
|||
(raise-syntax-error #f
|
||||
"Nach dem : sollte ein Bezeichner stehen; da steht was anderes."
|
||||
#'?id))
|
||||
(when (bound-identifier-mapping-get table #'?id (lambda () #f))
|
||||
(raise-syntax-error #f
|
||||
"Zweite Signaturdeklaration für denselben Namen."
|
||||
maybe))
|
||||
(bound-identifier-mapping-put! table #'?id #'?cnt)
|
||||
(cond
|
||||
((bound-identifier-mapping-get table #'?id (lambda () #f))
|
||||
=> (lambda (old-cnt-stx)
|
||||
(unless (equal? (syntax->datum old-cnt-stx)
|
||||
(syntax->datum #'?cnt))
|
||||
(raise-syntax-error #f
|
||||
"Zweite Signaturdeklaration für denselben Namen."
|
||||
maybe))))
|
||||
(else
|
||||
(bound-identifier-mapping-put! table #'?id #'?cnt)))
|
||||
#f))
|
||||
((: ?id)
|
||||
(raise-syntax-error #f "Bei dieser Signaturdeklaration fehlt die Signatur" maybe))
|
||||
|
|
|
@ -55,11 +55,16 @@
|
|||
#'?id))
|
||||
|
||||
(let ((real-id (first-order->higher-order #'?id)))
|
||||
(when (bound-identifier-mapping-get table real-id (lambda () #f))
|
||||
(raise-syntax-error #f
|
||||
"Second signature declaration for the same name."
|
||||
maybe))
|
||||
(bound-identifier-mapping-put! table real-id #'?cnt)
|
||||
(cond
|
||||
((bound-identifier-mapping-get table real-id (lambda () #f))
|
||||
=> (lambda (old-cnt-stx)
|
||||
(unless (equal? (syntax->datum old-cnt-stx)
|
||||
(syntax->datum #'?cnt))
|
||||
(raise-syntax-error #f
|
||||
"Second signature declaration for the same name."
|
||||
maybe))))
|
||||
(else
|
||||
(bound-identifier-mapping-put! table real-id #'?cnt)))
|
||||
#f)))
|
||||
((: ?id)
|
||||
(raise-syntax-error #f "Signature declaration is missing a signature." maybe))
|
||||
|
|
Loading…
Reference in New Issue
Block a user