diff --git a/core/classes/mixin/mixin.factor b/core/classes/mixin/mixin.factor index 56e995899b..d569103d97 100755 --- a/core/classes/mixin/mixin.factor +++ b/core/classes/mixin/mixin.factor @@ -62,10 +62,13 @@ TUPLE: check-mixin-class mixin ; ] if-mixin-member? ; : remove-mixin-instance ( class mixin -- ) + #! The order of the three clauses is important here. The last + #! one must come after the other two so that the entries it + #! adds to changed-generics are not overwritten. [ - [ class-usages update-methods ] [ [ swap remove ] change-mixin-class ] [ nip update-classes ] + [ class-usages update-methods ] 2tri ] [ 2drop ] if-mixin-member? ; diff --git a/core/compiler/units/units.factor b/core/compiler/units/units.factor index fa29a5a519..cb361ec9e6 100755 --- a/core/compiler/units/units.factor +++ b/core/compiler/units/units.factor @@ -110,8 +110,7 @@ SYMBOL: update-tuples-hook : (compiled-generic-usages) ( generic class -- assoc ) dup class? [ [ compiled-generic-usage ] dip - [ [ classes-intersect? ] [ null class<= ] bi or nip ] - curry assoc-filter + [ classes-intersect? nip ] curry assoc-filter ] [ 2drop f ] if ; : compiled-generic-usages ( assoc -- assocs )