]> Nishi Git Mirror - gwion.git/commitdiff
:bug: Fix unknown enum access
authorJérémie Astor <fennecdjay@gmail.com>
Wed, 30 Mar 2022 19:49:51 +0000 (21:49 +0200)
committerJérémie Astor <fennecdjay@gmail.com>
Wed, 30 Mar 2022 19:49:51 +0000 (21:49 +0200)
src/lib/object_op.c

index fb7dba45028e09c59dd18ea5b86b08c4b08d8850..36ab071b6855b9dde88bb20ae64a394116383d70 100644 (file)
@@ -183,8 +183,7 @@ 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_check) && env->class_def != the_base) {
-      set_tflag(the_base, tflag_cdef);
+    if(tflag(the_base, tflag_cdef) && !tflag(the_base, tflag_check) && env->class_def != the_base) {
       CHECK_BN(ensure_traverse(env, the_base));
       return check_exp(env, exp_self(member));
     }