Don't make mandatory super inits mandatory for super-new
This commit is contained in:
parent
f82a49be7d
commit
ba70851ba0
|
@ -664,10 +664,9 @@
|
||||||
(#%plain-app cons (quote init-id) arg:expr)
|
(#%plain-app cons (quote init-id) arg:expr)
|
||||||
...))
|
...))
|
||||||
(define provided-inits (syntax->datum #'(init-id ...)))
|
(define provided-inits (syntax->datum #'(init-id ...)))
|
||||||
(for ([(name val) (in-dict super-inits)]
|
(for ([name provided-inits])
|
||||||
#:when (not (cadr val)))
|
(unless (dict-ref super-inits name #f)
|
||||||
(unless (member name provided-inits)
|
(tc-error/expr "super-new: init argument ~a not accepted by superclass"
|
||||||
(tc-error/expr "mandatory superclass init ~a not provided"
|
|
||||||
name)))
|
name)))
|
||||||
(map cons provided-inits (syntax->list #'(arg ...)))]))
|
(map cons provided-inits (syntax->list #'(arg ...)))]))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user