Inline if's JS output changed. Program logic "broken" since e446b40.

Issue #134 resolved
Dany Marmur created an issue

The following dwscript code:

var aAltId := 'b';
var test := (if aAltId <> '' then '_' + LowerCase(aAltId)) + 'a';

Produces this (correct) output using DWScript commit 4473120 (2018-07-24 17:14):

   aAltId = "b";
   test = ((aAltId!="")?"_"+LowerCase(aAltId):"")+"a";

but when checking out e446b40 (2018-07-26 18:00) this output is produced:

   aAltId = "b";
   test = (aAltId!="")?"_"+LowerCase(aAltId):""+"a";

As you can see, JS interprets this very differently. Unfortunately this breaks my application. I would so so appreciate if the functionality could be restored.

Many TIAs!

/Dany

Comments (2)

  1. Log in to comment