summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2017-10-19 09:28:16 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2017-10-19 09:28:16 (GMT)
commitdf974e71f99feff44f12a02e66281948465d32ec (patch)
tree601005aef774738196718ed0b12294c2a0fd4620 /generic
parent7393032d5e4ff50a7bb1b1aeba5da3616577f7a0 (diff)
downloadtcl-df974e71f99feff44f12a02e66281948465d32ec.zip
tcl-df974e71f99feff44f12a02e66281948465d32ec.tar.gz
tcl-df974e71f99feff44f12a02e66281948465d32ec.tar.bz2
Oops; put the code in the wrong place. Mixins have priority when deciding method visibility.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclOOCall.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index e449893..3e4f561 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.c
@@ -637,6 +637,18 @@ AddClassMethodNames(
break;
}
+ if (clsPtr->mixins.num != 0) {
+ Class *mixinPtr;
+ int i;
+
+ FOREACH(mixinPtr, clsPtr->mixins) {
+ if (mixinPtr != clsPtr) {
+ AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN,
+ namesPtr, examinedClassesPtr);
+ }
+ }
+ }
+
FOREACH_HASH(namePtr, mPtr, &clsPtr->classMethods) {
hPtr = Tcl_CreateHashEntry(namesPtr, (char *) namePtr, &isNew);
if (isNew) {
@@ -654,18 +666,6 @@ AddClassMethodNames(
}
}
- if (clsPtr->mixins.num != 0) {
- Class *mixinPtr;
- int i;
-
- FOREACH(mixinPtr, clsPtr->mixins) {
- if (mixinPtr != clsPtr) {
- AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN,
- namesPtr, examinedClassesPtr);
- }
- }
- }
-
if (clsPtr->superclasses.num != 1) {
break;
}