 
 : specialize-method ( quot method -- quot' )
     [ specialize-method? get [ method-declaration prepend ] [ drop ] if ]
-    [ "method-generic" word-prop specializer ] bi
-    [ specialize-quot ] when* ;
+    [ dup "method-generic" word-prop specializer ] bi
+    [ specialize-quot ] [ nip ] if* ;
 
 : standard-method? ( method -- ? )
     dup method-body? [

        [ ] [ swap [ f ] \ if 3array append [ ] like ] map-reduce
    ] if-empty ;

: specializer-cases ( quot word -- default alist )
    dup [ array? ] all? [ 1array ] unless [
        [ make-specializer ] keep
        [ specializer-declaration ] map '[ _ declare ] pick append
    ] { } map>assoc ;

: specialize-quot ( quot specializer -- quot' )
    specializer-cases alist>quot ;

! compiler.tree.propagation.inlining sets this to f
SYMBOL: specialize-method?

    [ def>> ] keep
    dup generic? [ drop ] [
        [ dup standard-method? [ specialize-method ] [ drop ] if ]
        [ dup specializer [ specialize-quot ] [ drop ] if* ]
        bi
    ] if ;

