Bug #11636
errors raised during evaluation of &IF expressions drop the entire &IF
0%
Related issues
History
#1 Updated by Constantin Asofiei 4 days ago
- Related to Support #6859: preprocessor tests added
#2 Updated by Constantin Asofiei 4 days ago
Errors in evaluation of a &IF expression drops the entire statement. See this:
message "before".
&IF integer("abc") = 1
&THEN message "must not emit - then".
&ELSE message "must not emit - else".
&ENDIF
message "after".
FWD preprocesses as:
message "before". message "must not emit - else". message "after".
while OE emits this:
message "before". message "after".
We need to explore other edge cases where errors can happen (like conditions on &elseif or any other statement which supports evaluating stuff).
#4 Updated by Octavian Adrian Gavril 1 day ago
Greg Shah wrote:
Octavian: Please add this to our preproc tests.
Sure. I'm currently working on it, but the Preprocessor_Testcases is no longer available. Does anyone know what happened? When I access https://proj.goldencode.com/projects/p2j/wiki/Preprocessor_Testcases, it looks like a new wiki page.
#5 Updated by Constantin Asofiei 1 day ago
Octavian Adrian Gavril wrote:
Greg Shah wrote:
Octavian: Please add this to our preproc tests.
Sure. I'm currently working on it, but the Preprocessor_Testcases is no longer available. Does anyone know what happened? When I access https://proj.goldencode.com/projects/p2j/wiki/Preprocessor_Testcases, it looks like a new wiki page.
It was moved to Preprocessor_Testcases - see #11258-163
#6 Updated by Octavian Adrian Gavril 1 day ago
Thanks! I've added the testcase as preprocessor_if_eval_error.xml in testcases/1852.
#7 Updated by Constantin Asofiei 1 day ago
Octavian Adrian Gavril wrote:
Thanks! I've added the testcase as
preprocessor_if_eval_error.xmlin testcases/1852.
We need to expand on this - use &ELSEIF, and any other preprocessor statement where an expression is evaluated.
#8 Updated by Octavian Adrian Gavril 1 day ago
Right. I expanded the cases where an expression evaluation is broken in a preprocessor statement. The initial version of the testcase looks like this: Show
This is committed in testcases/1853.