From ac988f7a0d2fa6cba78b40fb3de29700983d489e Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 26 Sep 2008 18:17:13 -0600 Subject: [PATCH] fix static field lookup from interfaces --- src/machine.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/machine.cpp b/src/machine.cpp index 572270e2f0..b1555cdafe 100644 --- a/src/machine.cpp +++ b/src/machine.cpp @@ -2598,12 +2598,14 @@ findInHierarchy(Thread* t, object class_, object name, object spec, PROTECT(t, class_); object o = 0; - if (classFlags(t, class_) & ACC_INTERFACE) { - if (classVirtualTable(t, class_)) { - o = findInTable - (t, classVirtualTable(t, class_), name, spec, methodName, methodSpec); - } - } else { + if ((classFlags(t, class_) & ACC_INTERFACE) + and classVirtualTable(t, class_)) + { + o = findInTable + (t, classVirtualTable(t, class_), name, spec, methodName, methodSpec); + } + + if (o == 0) { for (; o == 0 and class_; class_ = classSuper(t, class_)) { o = find(t, class_, name, spec); }