From 07206b7f1706c044c4d7d4a2d7a41e0a9ae72d78 Mon Sep 17 00:00:00 2001 From: Asumu Takikawa Date: Thu, 23 May 2013 19:29:58 -0400 Subject: [PATCH] Don't make mandatory super inits mandatory for super-new original commit: ba70851ba0dd7f812dd5f10dee36b2008e74f103 --- .../typed-racket/typecheck/check-class-unit.rkt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-class-unit.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-class-unit.rkt index ce512923..0508d97a 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-class-unit.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-class-unit.rkt @@ -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 ...)))]))