View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0031582||2.x IDE Bugs||Code Editor||Public||2020-01-10 17:22||2020-01-13 09:36|
|Reporter||Dan||Assigned To||Steven Campbell|
|Priority||Low||Severity||C - General||Reproducibility||100%|
|Platform||-||OS||Windows 10||OS Version||Pro x64|
|Target Version||Fixed in Version|
|Summary||0031582: Code Editor: Errors in if statements are always the "last" error, not the first, obscures the real issue|
|Description||As you can see in the attached sample, errors in if statements are always the "last" error relevant to that line of code, and not the first error encountered, which obscures the real (and potentially only) issue and makes it harder to understand how to fix.|
Here, the issue is that the script is not expecting an argument, but because this then makes the if() invalid, it's the unexpected && in the if which is being shown as the error on the line. The line, however, is actually formatted correctly, and so this confuses the issue.
|Steps To Reproduce||1. Import the attached sample.|
2. Open the object's Create event.
3. Observe the top if() correctly shows a syntax error that the script wasn't expecting an argument.
4. Observe the second if() has the same real error, but it's the "unexpected &" which is shown as the gutter syntax error,
|Tags||No tags attached.|
|2.x IDE Found In||22.214.171.1241|
|2.x Runtime Found In||126.96.36.1998|
|2.x IDE Verified In|
|2.x Runtime Verified In|