From 8e6936251238b33fe84f76c404fe053d64781bef Mon Sep 17 00:00:00 2001 From: Slava Pestov <slava@slava-pestovs-macbook-pro.local> Date: Wed, 3 Dec 2008 09:33:32 -0600 Subject: [PATCH] Better error message for INSTANCE: if second arg is not a mixin --- basis/debugger/debugger.factor | 16 +++++++++------- core/classes/mixin/mixin.factor | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/basis/debugger/debugger.factor b/basis/debugger/debugger.factor index 0e7a56ee5f..94ceff8a23 100644 --- a/basis/debugger/debugger.factor +++ b/basis/debugger/debugger.factor @@ -3,13 +3,13 @@ USING: slots arrays definitions generic hashtables summary io kernel math namespaces make prettyprint prettyprint.config sequences assocs sequences.private strings io.styles io.files -vectors words system splitting math.parser classes.tuple -continuations continuations.private combinators generic.math -classes.builtin classes compiler.units generic.standard vocabs -init kernel.private io.encodings accessors math.order -destructors source-files parser classes.tuple.parser -effects.parser lexer compiler.errors generic.parser -strings.parser ; +vectors words system splitting math.parser classes.mixin +classes.tuple continuations continuations.private combinators +generic.math classes.builtin classes compiler.units +generic.standard vocabs init kernel.private io.encodings +accessors math.order destructors source-files parser +classes.tuple.parser effects.parser lexer compiler.errors +generic.parser strings.parser ; IN: debugger GENERIC: error. ( error -- ) @@ -327,3 +327,5 @@ M: bad-effect summary M: bad-escape summary drop "Bad escape code" ; M: bad-literal-tuple summary drop "Bad literal tuple" ; + +M: check-mixin-class summary drop "Not a mixin class" ; diff --git a/core/classes/mixin/mixin.factor b/core/classes/mixin/mixin.factor index 65726cf6e8..2470c00875 100644 --- a/core/classes/mixin/mixin.factor +++ b/core/classes/mixin/mixin.factor @@ -25,7 +25,7 @@ M: mixin-class rank-class drop 3 ; bi ] if ; -TUPLE: check-mixin-class mixin ; +TUPLE: check-mixin-class class ; : check-mixin-class ( mixin -- mixin ) dup mixin-class? [