mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-13 07:57:35 +02:00
Adding an explicit error for record rtd and constructor conflicts.
This commit is contained in:
parent
07c6e3765b
commit
242ab2c8e6
1 changed files with 3 additions and 0 deletions
|
@ -17,6 +17,9 @@
|
||||||
(_register (rename 'register-simple-type))
|
(_register (rename 'register-simple-type))
|
||||||
(_slot-set! (rename 'slot-set!))
|
(_slot-set! (rename 'slot-set!))
|
||||||
(_type_slot_offset (rename 'type-slot-offset)))
|
(_type_slot_offset (rename 'type-slot-offset)))
|
||||||
|
;; catch a common mistake
|
||||||
|
(if (eq? name make)
|
||||||
|
(error "same binding for record rtd and constructor" name))
|
||||||
`(,(rename 'begin)
|
`(,(rename 'begin)
|
||||||
;; type
|
;; type
|
||||||
(,_define ,name (,_register ,name-str ,parent ',(map car fields)))
|
(,_define ,name (,_register ,name-str ,parent ',(map car fields)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue