diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2008-06-19 20:57:22 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2008-06-19 20:57:22 (GMT) |
commit | 013ca8a95da3cc8a9bcdf37f9627d9676527fc76 (patch) | |
tree | bba88a920aa2f5811ba58b084362cc6db0fbe7e3 /generic/tclOOCall.c | |
parent | eb2dd5ab54c55e83b8ef85ecdc4c1cfc04a3b9c7 (diff) | |
download | tcl-013ca8a95da3cc8a9bcdf37f9627d9676527fc76.zip tcl-013ca8a95da3cc8a9bcdf37f9627d9676527fc76.tar.gz tcl-013ca8a95da3cc8a9bcdf37f9627d9676527fc76.tar.bz2 |
Fix [Bug 1998221]
Diffstat (limited to 'generic/tclOOCall.c')
-rw-r--r-- | generic/tclOOCall.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c index c5c9418..bc90d09 100644 --- a/generic/tclOOCall.c +++ b/generic/tclOOCall.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOCall.c,v 1.6 2008/06/08 23:13:09 dkf Exp $ + * RCS: @(#) $Id: tclOOCall.c,v 1.7 2008/06/19 20:57:23 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -1163,9 +1163,17 @@ AddSimpleClassChainToCallContext( /* * We hard-code the tail-recursive form. It's by far the most common case * *and* it is much more gentle on the stack. + * + * Note that mixins must be processed before the main class hierarchy. + * [Bug 1998221] */ tailRecurse: + FOREACH(superPtr, classPtr->mixins) { + AddSimpleClassChainToCallContext(superPtr, methodNameObj, cbPtr, + doneFilters, flags, filterDecl); + } + if (flags & CONSTRUCTOR) { AddMethodToCallChain(classPtr->constructorPtr, cbPtr, doneFilters, filterDecl); @@ -1195,11 +1203,6 @@ AddSimpleClassChainToCallContext( } } - FOREACH(superPtr, classPtr->mixins) { - AddSimpleClassChainToCallContext(superPtr, methodNameObj, cbPtr, - doneFilters, flags, filterDecl); - } - switch (classPtr->superclasses.num) { case 1: classPtr = classPtr->superclasses.list[0]; |