From: fennecdjay Date: Sat, 20 Jul 2019 19:23:15 +0000 (+0200) Subject: :bug: Fix nonnull X-Git-Tag: nightly~2315 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=230b136ef6fae4a0c0b8768ba5704a59161bdbc6;p=gwion.git :bug: Fix nonnull --- diff --git a/src/lib/engine.c b/src/lib/engine.c index 2fe814f9..a3f498ad 100644 --- a/src/lib/engine.c +++ b/src/lib/engine.c @@ -67,9 +67,6 @@ ANN static m_bool import_core_libs(const Gwi gwi) { GWI_OB((t_polar = gwi_mk_type(gwi, "polar", SZ_COMPLEX , NULL))) GWI_OB((t_vec3 = gwi_mk_type(gwi, "Vec3", SZ_VEC3, NULL))) GWI_OB((t_vec4 = gwi_mk_type(gwi, "Vec4", SZ_VEC4, NULL))) - GWI_BB(gwi_oper_ini(gwi, OP_ANY_TYPE, OP_ANY_TYPE, NULL)) - GWI_BB(gwi_oper_add(gwi, opck_basic_cast)) - GWI_BB(gwi_oper_end(gwi, "$", NULL)) GWI_BB(import_object(gwi)) GWI_OB((t_union = gwi_mk_type(gwi, "@Union", SZ_INT, t_object))) GWI_BB(gwi_class_ini(gwi, t_union, NULL, NULL)) diff --git a/src/lib/object.c b/src/lib/object.c index a44c4531..8df093bb 100644 --- a/src/lib/object.c +++ b/src/lib/object.c @@ -99,7 +99,7 @@ describe_logical(Eq, ==) describe_logical(Neq, !=) static inline m_bool nonnull_check(const Type l, const Type r) { - return !GET_FLAG(r, nonnull) && GET_FLAG(l, nonnull); + return !GET_FLAG(l, nonnull) && GET_FLAG(r, nonnull); } static inline Type check_nonnull(const Env env, const Type l, const Type r,