]> Nishi Git Mirror - gwion.git/commitdiff
:art: Remove spork_ok
authorfennecdjay <astor.jeremie@wanadoo.fr>
Thu, 26 Sep 2019 00:34:11 +0000 (02:34 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Thu, 26 Sep 2019 00:34:11 +0000 (02:34 +0200)
ast
src/lib/func.c
src/parse/check.c

diff --git a/ast b/ast
index 804ab60f541728508f1363a1c0f259173248015e..c63343d7bf486a47001f32d71b8160bf997ae4d2 160000 (submodule)
--- a/ast
+++ b/ast
@@ -1 +1 @@
-Subproject commit 804ab60f541728508f1363a1c0f259173248015e
+Subproject commit c63343d7bf486a47001f32d71b8160bf997ae4d2
index e5badaf04f412f27415474dd297bf39b8b5bc5f2..aac3ab48ace0453b69f70c1c908b51bd64272964 100644 (file)
@@ -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) {
index 4435bec7b31032925a4d9e2a25538c7fa2536d25..440e10eaa31631bd7d173643bcd7f352f7a0c0c7 100644 (file)
@@ -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;