Fix: MkCoercion did not handle error_type
authorceriel <none@none>
Fri, 20 Nov 1992 13:37:49 +0000 (13:37 +0000)
committerceriel <none@none>
Fri, 20 Nov 1992 13:37:49 +0000 (13:37 +0000)
lang/m2/comp/chk_expr.c

index ba1b236..3faefdd 100644 (file)
@@ -72,7 +72,7 @@ MkCoercion(pnd, tp)
 
        if (nd_tp == tp || nd_tp->tp_fund == T_STRING /* Why ??? */) return;
        nd_tp = BaseType(nd_tp);
-       if (nd->nd_class == Value) {
+       if (nd->nd_class == Value && nd->nd_type != error_type && tp != error_type) {
                if (nd_tp->tp_fund == T_REAL) {
                        switch(tp->tp_fund) {
                        case T_REAL: