keep track of original class in resolveField so we can throw an exception with a useful message

This commit is contained in:
Joel Dice 2010-10-24 11:49:59 -06:00
parent 6f839323a7
commit 25ca40931d

View File

@ -3391,8 +3391,11 @@ resolveField(Thread* t, object class_, const char* fieldName,
object field = findInInterfaces(t, class_, name, spec, findFieldInClass);
for (; class_ != 0 and field == 0; class_ = classSuper(t, class_)) {
field = findFieldInClass(t, class_, name, spec);
object c = class_;
PROTECT(t, c);
for (; c != 0 and field == 0; c = classSuper(t, c)) {
field = findFieldInClass(t, c, name, spec);
}
if (t->exception == 0 and field == 0) {