Project

General

Profile

Bug #11636

errors raised during evaluation of &IF expressions drop the entire &IF

Added by Constantin Asofiei 4 days ago. Updated 1 day ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:
4GL Preprocessor

Related issues

Related to Testing - Support #6859: preprocessor tests Test

History

#1 Updated by Constantin Asofiei 4 days ago

#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).

#3 Updated by Greg Shah 4 days ago

  • topics 4GL Preprocessor added

Octavian: Please add this to our preproc tests.

#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.xml in 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:


This is committed in testcases/1853.

Also available in: Atom PDF