src/class-finalize-impl.lisp (clos-tiebreaker): Search from the right end.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 7 Jul 2018 13:41:55 +0000 (14:41 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 9 Jul 2018 11:02:06 +0000 (12:02 +0100)
commitb045196ca0fcb1d72d2d6b1c4eabcc76df13e034
treebd8c064100766249aec4008be3ffa93c5d221473
parent3b92d2b13d6784a8e30babcf6def39d2ba05082f
src/class-finalize-impl.lisp (clos-tiebreaker): Search from the right end.

The docstring clearly says that we take the candidate whose direct
subclass is rightmost in the SO-FAR list, but the code searches SO-FAR
from the left and takes the first match.  As far as I can make out, this
has always been wrong: the earliest version of `merge-lists' builds the
output list in order, and the earliest version of `clos-tiebreaker'
searched from the left anyway.

Just reverse the list before scanning.
src/class-finalize-impl.lisp