Bug 134003
Summary: | Web Inspector: JS PrettyPrinting issues with ternary statement | ||
---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> |
Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | graouts, joepeck, timothy, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | 412.x | ||
Hardware: | All | ||
OS: | All |
Joseph Pecoraro
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.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/17351457>
Joseph Pecoraro
This will be fixed by Bug 156178.
*** This bug has been marked as a duplicate of bug 156178 ***