From 2385d8bd9318c1f25e1cc34642853aa8f5123180 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 13 Jun 2007 22:47:17 +0000 Subject: [PATCH] fix trait bug found by Ryan svn: r6653 --- collects/mzlib/trait.ss | 3 ++- collects/tests/mzscheme/trait.ss | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/collects/mzlib/trait.ss b/collects/mzlib/trait.ss index f6fb267e17..f689277faf 100644 --- a/collects/mzlib/trait.ss +++ b/collects/mzlib/trait.ss @@ -12,6 +12,7 @@ generate-class-expand-context)) (provide (rename :trait trait) + trait? trait->mixin trait-sum trait-exclude trait-exclude-field @@ -65,7 +66,7 @@ (augride) (overment) (inherit) (inherit/super) (inherit/inner) - (inherit-fields)))))] + (inherit-field)))))] [(fields) (extract-fields expanded-clauses)]) ;; Every declaration implies direct use for other declarations: diff --git a/collects/tests/mzscheme/trait.ss b/collects/tests/mzscheme/trait.ss index 0241fa46ac..7f50300069 100644 --- a/collects/tests/mzscheme/trait.ss +++ b/collects/tests/mzscheme/trait.ss @@ -31,6 +31,9 @@ (trait (field [x 'x])) (trait (field [x 'y])))) +(test #t trait? (trait + (inherit-field f))) + ;; ---------------------------------------- ;; internal and external names