View Issue Details

IDProjectCategoryView StatusLast Update
00315822.x IDE BugsCode EditorPublic2020-01-13 09:36
ReporterDanAssigned ToSteven Campbell 
PriorityLowSeverityC - GeneralReproducibility100%
Status AssignedResolutionOpen 
Platform-OSWindows 10OS VersionPro x64
Product Version2.2.5 
Target VersionFixed in Version 
Summary0031582: Code Editor: Errors in if statements are always the "last" error, not the first, obscures the real issue
DescriptionAs 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 Reproduce1. 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,
Repro: 100%
TagsNo tags attached.
2.x IDE Found In2.2.5.481
2.x Runtime Found In2.2.5.378
2.x IDE Verified In
2.x Runtime Verified In

Activities

Dan

2020-01-10 17:22

Adminstrator  

testSyntaxErrorForAcceidentalScriptArgument.yyz (18,203 bytes)
Screenshot_1.png (30,789 bytes)
Screenshot_1.png (30,789 bytes)