View Issue Details

IDProjectCategoryView StatusLast Update
0027218RunnerGeneralPublic2018-02-06 14:36
ReporterStewart BishopAssigned ToMark Alexander 
PriorityLowSeverityC - GeneralReproducibility100%
Status ClosedResolutionFixed 
Product Version 
Target VersionFixed in Version 
Summary0027218: General: Bug with nested ternary operator associativity
DescriptionCurrent behavior:
The first line of code works but the second one gives a compilation error.
The IDE does not throw any linter errors. (FINE)

Expected behavior:
Both lines should compile fine. The ternary operator (a ? b : c) has a bad associativity order.
Steps To ReproduceSteps to reproduce:
Copy this code in a new script:
var c = a ? "foo" : (b ? "bar" : "wii"); //FINE
var c = a ? "foo" : b ? "bar" : "wii"; //ERROR

Run project
1.4 Found In
2.x Runtime Found In2.0.7.110
2.x Runtime Verified In


Daniel Cleaton

2017-07-31 09:46

Adminstrator   ~0054681

Will always need the brackets. Should update the manual to say this.

Piotr Gnys

2017-07-31 13:24

Updater   ~0054691

Code editor could also mark this an error then.

Mark Alexander

2017-08-04 11:47

Developer   ~0054782