add a constructor arity test

Closes #2390
This commit is contained in:
Matthew Flatt 2018-11-19 20:06:50 -07:00
parent daed85e1dc
commit 42bde1c9cf

View File

@ -1253,6 +1253,20 @@
(test 'nope g 5 (lambda () 'nope))
(test 'nope g struct:arity-at-least (lambda () 'nope)))
;; ----------------------------------------
;; Make sure an indirect struct constructor reports
;; the right arity when there are more than 6 fields
(let ()
(struct b (case-sensitive
printing-style
fraction-style
show-sharing
insert-newlines
annotations))
(struct a (x y) #:super struct:b)
(test 8 procedure-arity a))
;; ----------------------------------------
(report-errs)