Skip to content

Commit 7322fc2

Browse files
committed
Fixed an issue due to the introduction of lazy loading a superclass from a class.
1 parent 45da1ac commit 7322fc2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/runtime/gravity_core.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,9 +1691,11 @@ static bool class_exec (gravity_vm *vm, gravity_value_t *args, uint16_t nargs, u
16911691
mem_free(c->superlook);
16921692
c->superlook = NULL;
16931693
c->superclass = super;
1694-
1694+
}
1695+
1696+
if (c->superclass) {
16951697
STATICVALUE_FROM_STRING(key, GRAVITY_INTERNAL_EXEC_NAME, strlen(GRAVITY_INTERNAL_EXEC_NAME));
1696-
gravity_closure_t *super_closure = gravity_class_lookup_closure(gravity_class_get_meta(super), key);
1698+
gravity_closure_t *super_closure = gravity_class_lookup_closure(gravity_class_get_meta(c->superclass), key);
16971699
if (super_closure) RETURN_CLOSURE(VALUE_FROM_OBJECT(super_closure), rindex);
16981700
}
16991701

0 commit comments

Comments
 (0)