Skip to content

Commit

Permalink
Fixed an issue due to the introduction of lazy loading a superclass f…
Browse files Browse the repository at this point in the history
…rom a class.
  • Loading branch information
marcobambini committed Jun 26, 2021
1 parent 45da1ac commit 7322fc2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/runtime/gravity_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1691,9 +1691,11 @@ static bool class_exec (gravity_vm *vm, gravity_value_t *args, uint16_t nargs, u
mem_free(c->superlook);
c->superlook = NULL;
c->superclass = super;

}

if (c->superclass) {
STATICVALUE_FROM_STRING(key, GRAVITY_INTERNAL_EXEC_NAME, strlen(GRAVITY_INTERNAL_EXEC_NAME));
gravity_closure_t *super_closure = gravity_class_lookup_closure(gravity_class_get_meta(super), key);
gravity_closure_t *super_closure = gravity_class_lookup_closure(gravity_class_get_meta(c->superclass), key);
if (super_closure) RETURN_CLOSURE(VALUE_FROM_OBJECT(super_closure), rindex);
}

Expand Down

0 comments on commit 7322fc2

Please sign in to comment.