FLOAT did not work
This commit is contained in:
parent
f0fc857cb4
commit
6fdd5b6a6d
1 changed files with 2 additions and 5 deletions
|
@ -62,11 +62,9 @@ MkCoercion(pnd, tp)
|
||||||
if (nd_tp == tp) return;
|
if (nd_tp == tp) return;
|
||||||
if (nd_tp->tp_fund == T_STRING) return;
|
if (nd_tp->tp_fund == T_STRING) return;
|
||||||
nd_tp = BaseType(nd_tp);
|
nd_tp = BaseType(nd_tp);
|
||||||
if (nd->nd_class == Value) {
|
if (nd->nd_class == Value &&
|
||||||
if (nd_tp->tp_fund == T_REAL && tp->tp_fund != T_REAL) goto Out;
|
(nd_tp->tp_fund != T_REAL && tp->tp_fund != REAL)) {
|
||||||
switch(tp->tp_fund) {
|
switch(tp->tp_fund) {
|
||||||
case T_REAL:
|
|
||||||
break;
|
|
||||||
case T_SUBRANGE:
|
case T_SUBRANGE:
|
||||||
if (! chk_bounds(tp->sub_lb, nd->nd_INT,
|
if (! chk_bounds(tp->sub_lb, nd->nd_INT,
|
||||||
BaseType(tp)->tp_fund) ||
|
BaseType(tp)->tp_fund) ||
|
||||||
|
@ -118,7 +116,6 @@ MkCoercion(pnd, tp)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Out:
|
|
||||||
*pnd = nd = MkNode(Uoper, NULLNODE, nd, &(nd->nd_token));
|
*pnd = nd = MkNode(Uoper, NULLNODE, nd, &(nd->nd_token));
|
||||||
nd->nd_symb = COERCION;
|
nd->nd_symb = COERCION;
|
||||||
nd->nd_type = tp;
|
nd->nd_type = tp;
|
||||||
|
|
Loading…
Add table
Reference in a new issue