From: ceriel Date: Thu, 6 Jun 1996 07:47:00 +0000 (+0000) Subject: Moved TryToString call into ChkAssCompat X-Git-Tag: release-5-5~45 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=1592c3638c924c689f9987609a3c8c45b3b6b955;p=ack.git Moved TryToString call into ChkAssCompat --- diff --git a/lang/m2/comp/typequiv.c b/lang/m2/comp/typequiv.c index f08a59926..1cec5ee22 100644 --- a/lang/m2/comp/typequiv.c +++ b/lang/m2/comp/typequiv.c @@ -26,6 +26,7 @@ #include "node.h" #include "warning.h" #include "main.h" +#include "Lpars.h" extern char *sprint(); @@ -289,6 +290,9 @@ ChkAssCompat(nd, tp, message) Give an error message when it fails */ + if ((*nd)->nd_symb == STRING) { + TryToString((*nd), tp); + } return CompatCheck(nd, tp, message, TstAssCompat); } diff --git a/lang/m2/comp/walk.c b/lang/m2/comp/walk.c index 094057914..05110be39 100644 --- a/lang/m2/comp/walk.c +++ b/lang/m2/comp/walk.c @@ -854,9 +854,6 @@ WalkStat(nd, exit_label, end_reached) assignment compatible with the result type of the function procedure (See Rep. 9.11). */ - if (nd->nd_RIGHT->nd_symb == STRING) { - TryToString(nd->nd_RIGHT, func_type); - } if (!ChkAssCompat(&(nd->nd_RIGHT), func_type, "RETURN")) { break; } @@ -1014,8 +1011,6 @@ DoAssign(nd) ChkVariable(&(nd->nd_LEFT), D_DEFINED))) return; tp = nd->nd_LEFT->nd_type; - if (nd->nd_RIGHT->nd_symb == STRING) TryToString(nd->nd_RIGHT, tp); - if (! ChkAssCompat(&(nd->nd_RIGHT), tp, "assignment")) { return; }