From c02d91d17413de2e203f3978151eb4b57525f36a Mon Sep 17 00:00:00 2001 From: Ben Greenman Date: Mon, 2 Oct 2017 02:11:49 -0400 Subject: [PATCH] contract-stronger: swap order of cases Check that the input to the default `contract-stronger?` is not an impersonator before calling `equal?` on it --- racket/collects/racket/contract/private/prop.rkt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/racket/collects/racket/contract/private/prop.rkt b/racket/collects/racket/contract/private/prop.rkt index 89daa2e962..b2c522a4eb 100644 --- a/racket/collects/racket/contract/private/prop.rkt +++ b/racket/collects/racket/contract/private/prop.rkt @@ -118,9 +118,9 @@ (define trail (make-parameter #f)) (define (contract-struct-stronger? a b) (cond - [(and (equal? a b) - (or (flat-contract-struct? a) - (chaperone-contract-struct? a))) + [(and (or (flat-contract-struct? a) + (chaperone-contract-struct? a)) + (equal? a b)) #t] [else (define prop (contract-struct-property a))