Skip to content
Snippets Groups Projects
Commit df941892 authored by James K. Lowden's avatar James K. Lowden :anchor:
Browse files

correct UAT 563

parent 3a86a785
No related branches found
No related tags found
No related merge requests found
Pipeline #2417 failed
...@@ -833,7 +833,7 @@ No BANANA here. ...@@ -833,7 +833,7 @@ No BANANA here.
prog.cob:9:20: error: name already in dictionary: X prog.cob:9:20: error: name already in dictionary: X
9 | >> DEFINE X 1 9 | >> DEFINE X 1
| ^ | ^
prog.cob:9:20: error: X previously defined in :1 prog.cob:9:20: error: X was defined on the command line
prog.cob:10:1: error: syntax error, unexpected invalid token prog.cob:10:1: error: syntax error, unexpected invalid token
10 | >> END-IF 10 | >> END-IF
| ^ | ^
......
...@@ -378,9 +378,12 @@ cdf_define: CDF_DEFINE cdf_constant NAME as cdf_expr[value] override ...@@ -378,9 +378,12 @@ cdf_define: CDF_DEFINE cdf_constant NAME as cdf_expr[value] override
if( !cdfval_add( $NAME, cdfval_t($value), $override) ) { if( !cdfval_add( $NAME, cdfval_t($value), $override) ) {
error_msg(@NAME, "name already in dictionary: %s", $NAME); error_msg(@NAME, "name already in dictionary: %s", $NAME);
const cdfval_t& entry = dictionary[$NAME]; const cdfval_t& entry = dictionary[$NAME];
assert(entry.filename); if( entry.filename ) {
error_msg(@NAME, "%s previously defined in %s:%d", error_msg(@NAME, "%s previously defined in %s:%d",
$NAME, entry.filename, entry.lineno); $NAME, entry.filename, entry.lineno);
} else {
error_msg(@NAME, "%s was defined on the command line", $NAME);
}
YYERROR; YYERROR;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment