From c3d64838ec3e2b68108dd45c2ae0e8aa9c37f510 Mon Sep 17 00:00:00 2001 From: paladin-t Date: Fri, 11 Dec 2015 11:19:30 +0800 Subject: [PATCH] +added support to store a routine in a variable by call statement. --- core/my_basic.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/my_basic.c b/core/my_basic.c index 683faf7..c8b278e 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -10071,6 +10071,13 @@ _retry: ast = ast->next; obj = (_object_t*)(ast->data); +#ifdef MB_ENABLE_CLASS + if(obj->type == _DT_VAR) { + pathed = _search_identifier_in_scope_chain(s, 0, obj->data.variable->name, obj->data.variable->pathing); + if(pathed && pathed->data) + obj = (_object_t*)pathed->data; + } +#endif /* MB_ENABLE_CLASS */ if(!obj || obj->type != _DT_ROUTINE) { _handle_error_on_obj(s, SE_RN_ROUTINE_EXPECTED, 0, DON(ast), MB_FUNC_ERR, _exit, result); }