Ternary statement in a var declaration or global scope does not pretty print as expected. There should be a space before the ":" but there is not: TEST: var x=true?a:b; // wrong var x=(true?a:b); x=true?a:b; function() {var x=true?a:b;} // wrong OUTPUTS: var x = true ? a: b; // wrong var x = (true ? a : b); x = true ? a : b; function() { var x = true ? a: b; } // wrong NOTES: - The first wrong case the previous is "block", a.k.a. global scope here. - The second wrong case the pervious is "vardef". - I would have expected both of these to have previous be vardef.
<rdar://problem/17351457>
This will be fixed by Bug 156178. *** This bug has been marked as a duplicate of bug 156178 ***