Don't make mandatory super inits mandatory for super-new

original commit: ba70851ba0dd7f812dd5f10dee36b2008e74f103
This commit is contained in:
Asumu Takikawa 2013-05-23 19:29:58 -04:00
parent d7f6d81607
commit 07206b7f17

View File

@ -664,10 +664,9 @@
(#%plain-app cons (quote init-id) arg:expr)
...))
(define provided-inits (syntax->datum #'(init-id ...)))
(for ([(name val) (in-dict super-inits)]
#:when (not (cadr val)))
(unless (member name provided-inits)
(tc-error/expr "mandatory superclass init ~a not provided"
(for ([name provided-inits])
(unless (dict-ref super-inits name #f)
(tc-error/expr "super-new: init argument ~a not accepted by superclass"
name)))
(map cons provided-inits (syntax->list #'(arg ...)))]))