forked from alex-eg/sex
test what record, ops, sum and match refuse
The diagnostics are what these forms are for -- a match that leaves a variant out is the thing C cannot say -- and until now every one of them was checked by hand and none by the suite. The two registries refuse a second declaration of one name, which is per translation unit and not per process, so semen-process clears them on the way in. sexc compiles one file per process and never noticed; a suite that compiles forty in one did.
This commit is contained in:
@@ -109,6 +109,13 @@
|
||||
(let ((entry (assq name variants)))
|
||||
(and entry (cdr entry))))
|
||||
|
||||
;;; Both of these refuse a second declaration of the same name, which
|
||||
;;; is per translation unit rather than per process -- so a process
|
||||
;;; that compiles two units has to start the second one clean.
|
||||
(define (reset-declarations!)
|
||||
(set! +sum-db+ (make-hash-table))
|
||||
(set! +ops-db+ (make-hash-table)))
|
||||
|
||||
;;; Methods of an `ops' block: (type . method) -> the qualified name
|
||||
;;; the call is rewritten to.
|
||||
;;;
|
||||
|
||||
Reference in New Issue
Block a user