From 6fdd5b6a6d6ac46dcb8cb9f1556cf999a84f660b Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 24 Aug 1987 13:59:06 +0000 Subject: [PATCH] FLOAT did not work --- lang/m2/comp/chk_expr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lang/m2/comp/chk_expr.c b/lang/m2/comp/chk_expr.c index 285cadaba..54acae581 100644 --- a/lang/m2/comp/chk_expr.c +++ b/lang/m2/comp/chk_expr.c @@ -62,11 +62,9 @@ MkCoercion(pnd, tp) if (nd_tp == tp) return; if (nd_tp->tp_fund == T_STRING) return; nd_tp = BaseType(nd_tp); - if (nd->nd_class == Value) { - if (nd_tp->tp_fund == T_REAL && tp->tp_fund != T_REAL) goto Out; + if (nd->nd_class == Value && + (nd_tp->tp_fund != T_REAL && tp->tp_fund != REAL)) { switch(tp->tp_fund) { - case T_REAL: - break; case T_SUBRANGE: if (! chk_bounds(tp->sub_lb, nd->nd_INT, BaseType(tp)->tp_fund) || @@ -118,7 +116,6 @@ MkCoercion(pnd, tp) return; } } -Out: *pnd = nd = MkNode(Uoper, NULLNODE, nd, &(nd->nd_token)); nd->nd_symb = COERCION; nd->nd_type = tp; -- 2.34.1