From a72046285d2dc8455b92e0ba92e9bdf40a30fad3 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 6 Apr 2013 17:40:13 -0500 Subject: [PATCH] fix bad call to raise-argument-error and use ->i instead of ->d for the mixin contracts --- collects/racket/contract/private/object.rkt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/collects/racket/contract/private/object.rkt b/collects/racket/contract/private/object.rkt index d13e707b62..7856d050d6 100644 --- a/collects/racket/contract/private/object.rkt +++ b/collects/racket/contract/private/object.rkt @@ -1,5 +1,6 @@ #lang racket/base (require "arrow.rkt" + "arr-i.rkt" "guts.rkt" "prop.rkt" "misc.rkt" @@ -80,15 +81,14 @@ (define (make-mixin-contract . %/<%>s) - (->d ([c% (and/c (flat-contract class?) + (->i ([c% (and/c (flat-contract class?) (apply and/c (map sub/impl?/c %/<%>s)))]) - () - [res (subclass?/c c%)])) + [res (c%) (subclass?/c c%)])) (define (subclass?/c %) (unless (class? %) (raise-argument-error 'subclass?/c - 'class? + "class?" %)) (define name (object-name %)) (flat-named-contract @@ -98,7 +98,7 @@ (define (implementation?/c <%>) (unless (interface? <%>) (raise-argument-error 'implementation?/c - 'interface? + "interface?" <%>)) (define name (object-name <%>)) (flat-named-contract @@ -131,4 +131,4 @@ [else `(is-a?/c unknown<%>)]) (lambda (x) (is-a? x <%>)))) -(define mixin-contract (->d ([c% class?]) () [res (subclass?/c c%)])) +(define mixin-contract (->i ([c% class?]) [res (c%) (subclass?/c c%)]))