From 6b4143ee180bb37256210b58f8e341753fecef72 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Thu, 26 Sep 2019 02:34:11 +0200 Subject: [PATCH] :art: Remove spork_ok --- ast | 2 +- src/lib/func.c | 3 --- src/parse/check.c | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/ast b/ast index 804ab60f..c63343d7 160000 --- a/ast +++ b/ast @@ -1 +1 @@ -Subproject commit 804ab60f541728508f1363a1c0f259173248015e +Subproject commit c63343d7bf486a47001f32d71b8160bf997ae4d2 diff --git a/src/lib/func.c b/src/lib/func.c index e5badaf0..aac3ab48 100644 --- a/src/lib/func.c +++ b/src/lib/func.c @@ -262,9 +262,6 @@ static OP_CHECK(opck_spork) { const Exp_Unary* unary = (Exp_Unary*)data; if(exp_self(unary)->next) ERR_O(exp_self(unary)->pos, _("spork/fork must not have next expression")) - if(unary->op == insert_symbol("fork") && !unary->fork_ok) - ERR_O(exp_self(unary)->pos, _("forks must be stored in a value:\n" - "fork xxx @=> Fork f")) if(unary->exp && unary->exp->exp_type == ae_exp_call) return env->gwion->type[unary->op == insert_symbol("spork") ? et_shred : et_fork]; else if(unary->code) { diff --git a/src/parse/check.c b/src/parse/check.c index 4435bec7..440e10ea 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -796,9 +796,6 @@ ANN Type check_exp_call1(const Env env, const Exp_Call *exp) { } ANN static Type check_exp_binary(const Env env, const Exp_Binary* bin) { - if(bin->lhs->exp_type == ae_exp_unary && bin->lhs->d.exp_unary.op == insert_symbol("fork") && - bin->rhs->exp_type == ae_exp_decl) - bin->lhs->d.exp_unary.fork_ok = 1; CHECK_OO(check_exp(env, bin->lhs)) if(bin->rhs->exp_type == ae_exp_decl && bin->rhs->d.exp_decl.type == env->gwion->type[et_auto]) bin->rhs->type = bin->rhs->d.exp_decl.type = bin->lhs->type; -- 2.43.0