]> Nishi Git Mirror - gwion.git/commitdiff
:bug: Avoid multiple traverse of a dot expression
authorfennecdjay <fennecdjay@gmail.com>
Tue, 19 Jul 2022 13:15:02 +0000 (15:15 +0200)
committerfennecdjay <fennecdjay@gmail.com>
Tue, 19 Jul 2022 13:15:02 +0000 (15:15 +0200)
src/lib/object_op.c

index 50f814cb6575b53910049a55977206bb7746ed9a..a883a272de8c236d423846d35f2ca04eaeea5d80 100644 (file)
@@ -209,10 +209,12 @@ OP_CHECK(opck_object_dot) {
           _("keyword 'this' must be associated with object instance..."));
   const Value value = get_value(env, member, the_base);
   if (!value) {
-    if(tflag(the_base, tflag_cdef) && !tflag(the_base, tflag_check) && env->class_def != the_base) {
+/*
+    if(env->class_def != the_base && tflag(the_base, tflag_cdef) && !tflag(the_base, tflag_check))
       CHECK_BN(ensure_traverse(env, the_base));
       return check_exp(env, exp_self(member));
     }
+*/
     const Value v = nspc_lookup_value1(env->curr, member->xid);
     if (v && member->is_call) {
       if (is_func(env->gwion, v->type) && (!v->from->owner_class || isa(the_base, v->from->owner_class) > 0)) // is_callable needs type